From 63d2a8c04014762f42ab7013ebdcd0d96672348a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Wed, 30 Nov 2022 19:04:11 +0100 Subject: Minor cleanup. --- mu4web/main.py | 21 +++++++++++++++------ mu4web/static/style.css | 4 ++++ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/mu4web/main.py b/mu4web/main.py index de2bbd4..60ebbb8 100644 --- a/mu4web/main.py +++ b/mu4web/main.py @@ -122,21 +122,30 @@ def include_stylesheet(path): def page_base(title: Optional[str] = None, body: HTML = []) -> HTML: - return ('html', + return ('html', {'lang': 'sv'}, ('head', ('meta', {'charset': 'utf-8'}), + ('meta', {'name': 'viewport', + 'content': 'width=device-width, initial-scale=0.5'}), ('title', title), include_stylesheet('/static/style.css'), ), ('body', ('nav', ('menu', + ('li', ('h1', ('a', {'href': '/'}, 'Mu4Web'))), + ('hr',), + ('li', ('form', {'action': '/search', + 'method': 'GET'}, + ('input', {'type': 'text', + 'placeholder': 'Sök...', + 'name': 'q'}), + ('input', {'type': 'Submit', + 'value': 'Sök'}))), ('li', - ('h1', ('a', {'href': '/'}, 'Mu4Web')), - ('li', - user_info(current_user.get_id()) - if current_user.is_authenticated else login_prompt()) - ))), + user_info(current_user.get_id()) + if current_user.is_authenticated else login_prompt()) + )), ('main', flashed_messages(), body), diff --git a/mu4web/static/style.css b/mu4web/static/style.css index e8d16c2..00db380 100644 --- a/mu4web/static/style.css +++ b/mu4web/static/style.css @@ -15,6 +15,10 @@ nav { background-color: darkgrey; } +nav hr { + border: none; +} + nav, footer { width: 100%; padding-left: 1em; -- cgit v1.2.3