28 lines
909 B
Plaintext
28 lines
909 B
Plaintext
<h1><%= thread.title %></h1>
|
|
<p>Posted under <a href="<%= url_for("topic", {slug = topic.slug}) %>"><%= topic.name %></a>
|
|
<% for _, post in ipairs(posts) do %>
|
|
<div id="post-<%= post.id %>">
|
|
<img src="<%= post.avatar_path or "/avatars/default.webp" %>"><br>
|
|
<a href="<%= url_for("user", {username = post.username}) %>"><%= post.username %></a>
|
|
<div><p><%- post.content %></p></div>
|
|
<a href="#post-<%= post.id %>">permalink</a>
|
|
</div>
|
|
<% end %>
|
|
|
|
<% if not user:is_guest() then %>
|
|
<h1>Respond to "<%= thread.title %>"</h1>
|
|
<form method="post">
|
|
<textarea id="post_content" name="post_content" placeholder="Response body" required></textarea><br>
|
|
<input type="submit" value="Reply">
|
|
</form>
|
|
<% end %>
|
|
<span>
|
|
<% for i = 1, math.max(pages, 1) do %>
|
|
<% if i == page then %>
|
|
<%= tostring(i)%>
|
|
<% else %>
|
|
<a href="?page=<%= i %>"><%= tostring(i)%></a>
|
|
<% end %>
|
|
<% end %>
|
|
</span>
|