Implement replies in post header

This commit is contained in:
Dominic Ferrando
2025-04-19 16:40:43 -04:00
parent 656595e47e
commit 34d3ec5366
5 changed files with 82 additions and 24 deletions
+3 -1
View File
@@ -34,8 +34,9 @@ templ ThreadPost(post database.Post, thread *database.Thread) {
_={ fmt.Sprintf("on click set #newPostBody.value to #newPostBody.value + '>>%d\n'", post.Id) }
class=" post-num"
>
No. { strconv.Itoa(post.Id) }
No.{ strconv.Itoa(post.Id) }
</span>
<div class="post-replies"></div>
</header>
<p>
@templ.Raw(util.EnrichPost(post.Body))
@@ -52,6 +53,7 @@ templ ThreadPosts(posts []database.Post) {
templ Thread(board database.Board, thread database.Thread, posts []database.Post) {
@shared.Layout() {
<script src="/static/thread.js" defer></script>
@BoardHeader(board)
<div class="new-post-container">
<form