Add footer
This commit is contained in:
@@ -118,4 +118,5 @@ templ ThreadsCatalog(previews []CatalogThreadPreview, catalogContext CatalogCont
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<hr/>
|
||||
}
|
||||
|
||||
@@ -28,5 +28,8 @@ templ Layout() {
|
||||
</div>
|
||||
{ children... }
|
||||
</body>
|
||||
<footer>
|
||||
<p>All trademarks, copyrights, comments, and images on this page are owned by and are the responsibility of their respective parties.</p>
|
||||
</footer>
|
||||
</html>
|
||||
}
|
||||
|
||||
+12
-7
@@ -185,6 +185,15 @@ type ThreadContext struct {
|
||||
IsAdmin bool
|
||||
}
|
||||
|
||||
templ ThreadActionBar(thread database.Thread) {
|
||||
<hr/>
|
||||
<div style="margin-left: 25px;">
|
||||
<a href={ templ.URL("/" + thread.BoardSlug) } style="margin-right: 5px;" class="link-button">[Catalog]</a>
|
||||
<a _="on click trigger refreshPosts on body" class="link-button">[Refresh]</a>
|
||||
</div>
|
||||
<hr/>
|
||||
}
|
||||
|
||||
templ Thread(board database.Board, thread database.Thread, posts []database.Post, threadContext ThreadContext) {
|
||||
@shared.Layout() {
|
||||
<script src="/static/thread.js" defer></script>
|
||||
@@ -192,19 +201,15 @@ templ Thread(board database.Board, thread database.Thread, posts []database.Post
|
||||
<div class="new-post-container">
|
||||
@shared.NewPostForm(board, fmt.Sprintf("/%s/threads/%d", board.Slug, thread.Id), false)
|
||||
</div>
|
||||
<hr/>
|
||||
<div style="margin-left: 25px;">
|
||||
<a href={ templ.URL("/" + thread.BoardSlug) } style="margin-right: 5px;" class="link-button">[Catalog]</a>
|
||||
<a _="on click trigger refreshPosts on body" class="link-button">[Refresh]</a>
|
||||
</div>
|
||||
<hr/>
|
||||
@ThreadActionBar(thread)
|
||||
<div
|
||||
class="thread"
|
||||
hx-get={ fmt.Sprintf("/hx/%s/threads/%d/posts", thread.BoardSlug, thread.Id) }
|
||||
hx-trigger="refreshPosts from:body"
|
||||
_="on htmx:afterSwap call insertHeaderReplies()"
|
||||
_="on htmx:afterSwap call insertHeaderReplies() then scrollToBottom()"
|
||||
>
|
||||
@Posts(posts, thread, threadContext)
|
||||
</div>
|
||||
@ThreadActionBar(thread)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user