derv-net/views/comment.ejs

25 lines
1.1 KiB
Text
Raw Normal View History

2025-02-26 01:10:09 -05:00
<div class='main'>
2025-02-26 16:37:48 -05:00
<h1 class="header-big">
<% if (username) { %>
2025-02-26 22:12:46 -05:00
<img src="/uploads/pfp_<%= username %>.png" class="avatar-img">
2025-02-26 16:37:48 -05:00
<a class='link' href='/users/<%= username %>'><%= username %></a>
<% } else { %>
Context
<% } %>
</h1>
2025-02-28 02:01:59 -05:00
<div>
<% for (let contentN of content) { %>
<% if (contentN[0] == 'file') { %>
<img class='art' src='<%= new URL(contentN[1], 'https://tbg.dervland.net/') %>'>
<% } else if (contentN[0] == 'link') { %>
<a class='link' href='<%= contentN[1] %>.'><%= contentN[1] %></a>
<% } else if (contentN[0].replaceAll(' ','').length > 0) { %>
<span class='commentbox'><%= contentN[0] %></span>
<% } } %>
</div>
2025-02-26 16:37:48 -05:00
<% if (!isNaN(date * 1)) { %>
2025-02-26 13:54:25 -05:00
<div class='sub'><b>Posted on</b> <%= new Date(date).toISOString() %> </div>
2025-02-26 16:37:48 -05:00
<% } %>
2025-02-26 13:54:25 -05:00
<%- include ('vblock.ejs', {link: `/${type}/${id}`, icon: '/icon.svg', name: 'Original'}) %>
2025-02-27 11:51:22 -05:00
<%- include ('vblock.ejs', {link: `/walls/get/${type}/${id}/0`, icon: '/walls.svg', name: 'Replies'}) %>
2025-02-26 01:10:09 -05:00
</div>