diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-11-30 19:04:11 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-11-30 19:04:11 +0100 |
commit | 63d2a8c04014762f42ab7013ebdcd0d96672348a (patch) | |
tree | 00bb7e19c402ba8f967815f729597a8d034dfeb8 | |
parent | Add maildir listing on frontpage. (diff) | |
download | mu4web-63d2a8c04014762f42ab7013ebdcd0d96672348a.tar.gz mu4web-63d2a8c04014762f42ab7013ebdcd0d96672348a.tar.xz |
Minor cleanup.
-rw-r--r-- | mu4web/main.py | 21 | ||||
-rw-r--r-- | 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; |