diff --git a/web/static/index.css b/web/static/index.css index 7972be4..5e4ad15 100644 --- a/web/static/index.css +++ b/web/static/index.css @@ -53,6 +53,10 @@ body { width: 300px; } +#boardActionBar { + font-size: 12px; +} + /* THREAD CATALOG */ #catalog { @@ -65,8 +69,8 @@ body { margin: 10px; text-align: center; padding: 10px; - width: 200px; - max-height: 192px; + width: 250px; + max-height: 300px; overflow: scroll; } @@ -87,12 +91,19 @@ body { } .catalog-preview-img { - max-height: 70%; - max-width: 80%; + max-width: 95%; border: 1px solid #B7C5D9; box-shadow: 0 0 3px rgba(0, 0, 0, 0.25); } +.catalog-preview-img-small { + max-height: 50%; +} + +.catalog-preview-img-large { + max-height: 90%; +} + .catalog-preview-counts { display: block; font-size: 12px; @@ -132,6 +143,7 @@ body { width: max-content; margin: auto; margin-top: 16px; + margin-bottom: 20px; } .new-post-form-field th { @@ -227,6 +239,10 @@ body { cursor: pointer; } +.post-filename:hover { + color: #ff0000; +} + .reply-link { color: #D00; text-decoration: underline; @@ -297,8 +313,7 @@ hr { border-top-width: medium; border-top-style: none; border-top-color: currentcolor; - border-top: - 1px solid #B7C5D9; + border-top: 1px solid #B7C5D9; height: 0; clear: left; } diff --git a/web/static/index.js b/web/static/index.js index 4a6d449..18688ab 100644 --- a/web/static/index.js +++ b/web/static/index.js @@ -55,3 +55,20 @@ function highlightPost(postId, e, status = true) { } } } + +function resizeCatalogPreviewImgs() { + const value = $("selectSortBy").value; + const postsImages = Array.from(document.querySelectorAll(".catalog-preview img")); + for (const postImage of postsImages) { + switch (value) { + case "small": + postImage.classList.remove("catalog-preview-img-large") + postImage.classList.add("catalog-preview-img-small") + break; + case "large": + postImage.classList.remove("catalog-preview-img-small") + postImage.classList.add("catalog-preview-img-large") + break; + } + } +} diff --git a/web/views/board.templ b/web/views/board.templ index e154a08..9a9f2bc 100644 --- a/web/views/board.templ +++ b/web/views/board.templ @@ -68,7 +68,20 @@ templ Board(board database.Board) { @NewThreadForm(board) -
+
+
+ Image size: + +
+
+
} } diff --git a/web/views/thread.templ b/web/views/thread.templ index febbc7e..8cd68f5 100644 --- a/web/views/thread.templ +++ b/web/views/thread.templ @@ -109,7 +109,7 @@ templ Thread(board database.Board, thread database.Thread, posts []database.Post
-