bigly-chat/views/comments.ejs

27 lines
1 KiB
Text
Raw Normal View History

2024-11-25 14:12:43 -05:00
<form enctype='multipart/form-data' method='POST' action='/api/form/comment'>
<h1>Comments</h1>
<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'>
2024-11-25 14:12:44 -05:00
<div class='pfp-wrapper'>
<img src='/pfp/<%= comment.username %>.png' class='avatar'>
<div>
<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>
</div>
2024-11-25 14:12:43 -05:00
</div>
<% } %>
</form>