add thread view
This commit is contained in:
26
views/threads/post.etlua
Normal file
26
views/threads/post.etlua
Normal file
@ -0,0 +1,26 @@
|
||||
<div class="post" id="post-<%= post.id %>">
|
||||
<div class="usercard">
|
||||
<a href="<%= url_for("user", {username = post.username}) %>" style="display: contents;">
|
||||
<img src="<%= post.avatar_path or "/avatars/default.webp" %>" class="avatar">
|
||||
</a>
|
||||
<a href="<%= url_for("user", {username = post.username}) %>" class="username-link"><%= post.username %></a>
|
||||
<% if post.status ~= "" then %>
|
||||
<em class="user-status"><%= post.status %></em>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="post-content-container"<%= is_latest and 'id=latest-post' or "" %>>
|
||||
<div class="post-info">
|
||||
<div><a href="<%= "#post-" .. post.id %>" title="Permalink"><i>
|
||||
<% if tonumber(post.edited_at) > tonumber(post.created_at) then -%>
|
||||
Edited at <%= os.date("%c", post.edited_at) %>
|
||||
<% else -%>
|
||||
Posted at <%= os.date("%c", post.created_at) %>
|
||||
<% end -%>
|
||||
</i></a></div>
|
||||
<div><button>Reply</button></div>
|
||||
</div>
|
||||
<div class="post-content">
|
||||
<%- post.content %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
Reference in New Issue
Block a user