<%- include("extra/meta", {title: thread.title }) %> <%- include("extra/navbar") %>
<%= thread.title %>
<%= new Date(thread.time).toLocaleString() %> • Views: <%= thread.views %>
<%= thread.author.name %> <%= "• "+(thread.edited ? "Edited" : "Not edited")%>
<% if ((user.id === thread.authorID || user.admin ) && thread.state !== "DELETED"){ %> DELETE EDIT <% } else if (thread.state == "DELETED") { %>

This thread has been deleted

UNDELETE <% }; %>
<% messages.filter(Boolean).forEach(message=>{ %>
<%= new Date(message.time).toLocaleDateString() %>
<%= new Date(message.time).toLocaleTimeString() %>
<%= message.content %>
<% if(user){ %> <% if(user.id === message.authorID || user.admin){ %>
<% if (message.deleted){ %> <% } %> <% if (message.edited){ %> <% } %>
<% if (!message.deleted){ %> Delete Edit <% }else { %> Undelete <% } %>
<% } %>
style="color: var(--main)" <% } %> >
<%=message.react.like.length %>
style="color: var(--main)" <% } %>>
<%=message.react.dislike.length %>
<% }; %>
<% }); %>
<% if (user){ %>
<% }%> <%- include("extra/footer") %>