derv-net/views/comment.ejs
2025-02-26 20:17:33 -05:00

21 lines
No EOL
860 B
Text

<div class='main'>
<h1 class="header-big">
<% if (username) { %>
<a class='link' href='/users/<%= username %>'><%= username %></a>
<% } else { %>
Context
<% } %>
</h1>
<% for (let contentN of content) { %>
<% if (contentN[0] == 'file' && contentN [1]) { %>
<img class='art' src='<%= new URL(contentN[1], 'https://tbg.dervland.net/') %>'>
<% } else { %>
<div class='commentbox'><%= contentN[0] %></div>
<% } %>
<% } %>
<% if (!isNaN(date * 1)) { %>
<div class='sub'><b>Posted on</b> <%= new Date(date).toISOString() %> </div>
<% } %>
<%- include ('vblock.ejs', {link: `/${type}/${id}`, icon: '/icon.svg', name: 'Original'}) %>
<%- include ('vblock.ejs', {link: `/walls/get/${type}/${id}/0`, icon: '/icon.svg', name: 'Replies'}) %>
</div>