diff options
Diffstat (limited to 'mu4web/main.py')
-rw-r--r-- | mu4web/main.py | 21 |
1 files changed, 15 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), |