2024-11-25 14:12:44 -05:00
|
|
|
<form enctype='multipart/form-data' method='POST' action='/api/form/comment'>
|
2024-11-25 14:12:44 -05:00
|
|
|
<h1 class='content-header'>Comments</h1>
|
2024-11-25 14:12:43 -05:00
|
|
|
<div class='form-message'></div>
|
|
|
|
<input name='targetId' hidden value='<%= id %>'>
|
|
|
|
<input name='targetType' hidden value='<%= route %>'>
|
2024-11-25 14:12:44 -05:00
|
|
|
<textarea class='form-input' name='content'></textarea>
|
|
|
|
<br />
|
|
|
|
<input class='form-input' type='submit'>
|
2024-11-25 14:12:43 -05:00
|
|
|
|
|
|
|
<% for (let comment of comments) { %>
|
|
|
|
<div class='comment'>
|
2024-11-25 14:12:44 -05:00
|
|
|
<div class='avatar'>
|
|
|
|
<img src='/pfp/<%= comment.username %>.png' class='avatar-img'>
|
2024-11-25 14:12:44 -05:00
|
|
|
<div>
|
|
|
|
<div><b>
|
2024-11-25 14:12:44 -05:00
|
|
|
<a class='link' href='/client/user?id=<%= comment.username %>'>
|
2024-11-25 14:12:44 -05:00
|
|
|
<%= comment.username %>
|
|
|
|
</a>
|
|
|
|
</b></div>
|
|
|
|
<div><b>
|
|
|
|
<%= (new Date(comment.date)+'').split(/(GMT|UTC)/g)[0] %>
|
|
|
|
</b></div>
|
|
|
|
<pre><%= comment.content %></pre>
|
|
|
|
</div>
|
|
|
|
</div>
|
2024-11-25 14:12:43 -05:00
|
|
|
</div>
|
|
|
|
<% } %>
|
|
|
|
</form>
|