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
+1 -1
View File
@@ -8,7 +8,7 @@ templ Layout() {
<title>Comfychan</title>
<script src="https://unpkg.com/htmx.org@2.0.4"></script>
<script src="https://unpkg.com/hyperscript.org@0.9.14"></script>
<script src="/static/index.js" defer></script>
<script src="/static/index.js"></script>
<link rel="stylesheet" href="/static/reset.css"/>
<link rel="stylesheet" href="/static/index.css"/>
</head>
+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