add reply button functionality

This commit is contained in:
2025-05-24 01:07:58 +03:00
parent e7260090ac
commit ec3f144b4e
3 changed files with 22 additions and 4 deletions

View File

@ -43,8 +43,10 @@
show_reply = false
end
if show_reply then
local d = post.created_at < post.edited_at and post.edited_at or post.created_at
local reply_text = ("On %s, %s said:\n%s\n\n---\n\n"):format(os.date("%c", d), post.username, post.original_markup)
%>
<button>Reply</button>
<button value="<%= reply_text %>" class="reply-button">Reply</button>
<% end %>
</span>
</div>