21 lines
785 B
Text
21 lines
785 B
Text
|
<form enctype='multipart/form-data' method='POST' action='/api/form/comment'>
|
||
|
<h1>Comments</h1>
|
||
|
<!-- probably component-ify this -->
|
||
|
<div class='form-message'></div>
|
||
|
<input name='targetId' hidden value='<%= id %>'>
|
||
|
<input name='targetType' hidden value='<%= route %>'>
|
||
|
<textarea name='content'></textarea>
|
||
|
<input type='submit'>
|
||
|
|
||
|
<% for (let comment of comments) { %>
|
||
|
<div class='comment'>
|
||
|
<div><b>
|
||
|
<a href='/client/user?id=<%= comment.username %>'><%= comment.username %></a>
|
||
|
</b></div>
|
||
|
<div><b>
|
||
|
<%= (new Date(comment.date)+'').split(/(GMT|UTC)/g)[0] %>
|
||
|
</b></div>
|
||
|
<pre><%= comment.content %></pre>
|
||
|
</div>
|
||
|
<% } %>
|
||
|
</form>
|