diff --git a/web/static/index.css b/web/static/index.css index 38bf901..e3dadb4 100644 --- a/web/static/index.css +++ b/web/static/index.css @@ -389,3 +389,10 @@ hr { height: 0; clear: left; } + +footer { + margin-top: 50px; + margin-bottom: 10px; + font-size: 10px; + text-align: center; +} diff --git a/web/static/index.js b/web/static/index.js index 1ab34ad..d7ed31f 100644 --- a/web/static/index.js +++ b/web/static/index.js @@ -13,6 +13,10 @@ function isOffScreen(el) { ); } +function scrollToBottom() { + window.scrollTo({ top: document.body.scrollHeight, behavior: 'smooth' }); +} + function isHttpWarningStatus(code) { const warningStatuses = [429, 400, 413]; return warningStatuses.includes(code); diff --git a/web/views/board.templ b/web/views/board.templ index 44e21c4..aee25fc 100644 --- a/web/views/board.templ +++ b/web/views/board.templ @@ -118,4 +118,5 @@ templ ThreadsCatalog(previews []CatalogThreadPreview, catalogContext CatalogCont } +
} diff --git a/web/views/shared/layout.templ b/web/views/shared/layout.templ index 017a08d..a7a0b2d 100644 --- a/web/views/shared/layout.templ +++ b/web/views/shared/layout.templ @@ -28,5 +28,8 @@ templ Layout() { { children... } + } diff --git a/web/views/thread.templ b/web/views/thread.templ index 9893de3..dce3c0a 100644 --- a/web/views/thread.templ +++ b/web/views/thread.templ @@ -185,6 +185,15 @@ type ThreadContext struct { IsAdmin bool } +templ ThreadActionBar(thread database.Thread) { +
+
+ [Catalog] + [Refresh] +
+
+} + templ Thread(board database.Board, thread database.Thread, posts []database.Post, threadContext ThreadContext) { @shared.Layout() { @@ -192,19 +201,15 @@ templ Thread(board database.Board, thread database.Thread, posts []database.Post
@shared.NewPostForm(board, fmt.Sprintf("/%s/threads/%d", board.Slug, thread.Id), false)
-
-
- [Catalog] - [Refresh] -
-
+ @ThreadActionBar(thread)
@Posts(posts, thread, threadContext)
+ @ThreadActionBar(thread) } }