diff --git a/tinyweb_forum/handlers.py b/tinyweb_forum/handlers.py index acf937a..c2678f9 100644 --- a/tinyweb_forum/handlers.py +++ b/tinyweb_forum/handlers.py @@ -45,9 +45,18 @@ 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 { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0.5rem 0; } -.forum-actions form { display: inline; } -.forum-actions input[name=q] { width: 200px; padding: 8px 12px; } +.forum-search { margin: 0.5rem 0; } +.forum-search form { display: block; } +.forum-search input[name=q] { + width: 100%; box-sizing: border-box; padding: 10px 12px; + background: rgba(8, 18, 22, 0.8); border: 1px solid rgba(40, 70, 65, 0.4); + border-radius: 4px; color: #90b4ac; font-size: 0.95rem; + transition: border-color 0.2s, box-shadow 0.3s; +} +.forum-search input[name=q]:focus { + outline: none; border-color: rgba(80, 140, 110, 0.5); box-shadow: 0 0 18px rgba(100, 200, 150, 0.06); +} +.forum-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0.5rem 0; } a.forum-action, a.forum-action-inline { color: #5a7880; text-decoration: none; border-bottom: none; font-size: 0.88rem; padding: 8px 14px; border: 1px solid rgba(40, 70, 65, 0.3); border-radius: 4px; @@ -255,7 +264,7 @@ class ForumHandlers: items = "

No threads yet.

" new_label = f" ({new_count} new)" if new_count else "" search_form = ( - f'
' + f'' f'' f'
' ) @@ -264,12 +273,14 @@ class ForumHandlers: page_url = f'/forum?q={esc(search)}&tag={esc(tag)}&muted=1' if show_muted else (f'/forum?q={esc(search)}&tag={esc(tag)}' if search or tag else '/forum') return self._respond( f"

forum{tag_label}

" - f'
' + f'" + f'
' + f'+ new' + f'mod' + f'sync now' + f'{muted_link}' f"
" f"

{total} threads{new_label}

" f''