73 lines
1.4 KiB
HTML

{include "layout.html"}
{block "content"}
<div class="thread-title mb-05">
<h2>{thread.Title}</h2>
<div>
<a href="/forum"><button class="btn">Back</button></a>
<a href="/forum/{thread.ID}/reply"><button class="btn btn-primary">Reply</button></a>
</div>
</div>
<!-- Original Thread Post -->
<div>
<div>
<div>{threadAuthor.Username}</div>
<div>
Level {threadAuthor.Level}<br>
{threadAuthor.Class().Name}
</div>
</div>
<div>
<div>
{md(thread.Content)}
</div>
<div>
Posted: {thread.PostedTime().Format("Jan 2, 2006 3:04 PM")}
</div>
</div>
</div>
<!-- Replies -->
{if #replyInfos > 0}
{for replyInfo in replyInfos}
<div>
<div>
<div>{replyInfo.Author.Username}</div>
<div>
Level {replyInfo.Author.Level}<br>
{replyInfo.Author.Class().Name}
</div>
</div>
<div>
<div>
{markdown(replyInfo.Post.Content)}
</div>
<div>
Posted: {replyInfo.Post.PostedTime().Format("Jan 2, 2006 3:04 PM")}
</div>
</div>
</div>
{/for}
{/if}
<!-- Pagination -->
{if totalPages > 1}
<div>
{if hasPrev}
<a href="/forum/{thread.ID}?page={currentPage - 1}"><button class="btn">Previous</button></a>
{/if}
<span>Page {currentPage} of {totalPages}</span>
{if hasNext}
<a href="/forum/{thread.ID}?page={currentPage + 1}"><button class="btn">Next</button></a>
{/if}
</div>
{/if}
<!-- Reply Button at Bottom -->
<div>
<a href="/forum/{thread.ID}/reply"><button class="btn btn-primary">Reply to Thread</button></a>
</div>
{/block}