From c1d47fcdcc787339e62618bc15de399915c80caf Mon Sep 17 00:00:00 2001 From: lichenblankie Date: Fri, 5 Jun 2026 04:21:13 +0000 Subject: [PATCH] better forum page button layout: flex actions, bordered action links, cleaner thread list --- tinyweb_forum/handlers.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/tinyweb_forum/handlers.py b/tinyweb_forum/handlers.py index 4d8f6a6..93fa597 100644 --- a/tinyweb_forum/handlers.py +++ b/tinyweb_forum/handlers.py @@ -45,12 +45,21 @@ FORUM_CSS = """ .forum-form label.checkbox-label { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; } .forum-form label.inline-label { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 8px; white-space: nowrap; } .forum-form small { display: block; margin-bottom: 8px; } -.forum-actions { margin: 0.5rem 0; } +.forum-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0.5rem 0; } +.forum-actions form { display: inline; } +.forum-actions input[name=q] { width: 180px; padding: 6px 10px; } a.forum-action, a.forum-action-inline { color: #5a7880; text-decoration: none; border-bottom: none; font-size: 0.85rem; + padding: 6px 12px; border: 1px solid rgba(40, 70, 65, 0.3); border-radius: 4px; + transition: background 0.2s, color 0.2s, border-color 0.2s; } -a.forum-action:hover, a.forum-action-inline:hover { color: #90b4ac; border-bottom: none; } +a.forum-action:hover, a.forum-action-inline:hover { color: #90b4ac; border-color: rgba(80, 130, 110, 0.5); background: rgba(10, 22, 25, 0.6); } +a.forum-action-inline { padding: 2px 6px; border: none; } +a.forum-action-inline:hover { border: none; } p.meta { font-size: 0.85rem; color: #3a5560; } +.forum-list { list-style: none; padding-left: 0; } +.forum-list li { padding: 0.6rem 0; border-bottom: 1px solid rgba(30, 55, 50, 0.2); } +.forum-list li:last-child { border-bottom: none; } .forum-form input[type=text], .forum-form input[type=url] { font-family: inherit; } .forum .post { border-left-color: rgba(40, 70, 65, 0.3); } """ @@ -263,7 +272,7 @@ class ForumHandlers: f' {muted_link}' f"" f"

{total} threads{new_label}

" - f"" + f'' f"{self._page_nav(page, total, page_url)}" )