aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-11-30 19:04:11 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2022-11-30 19:04:11 +0100
commit63d2a8c04014762f42ab7013ebdcd0d96672348a (patch)
tree00bb7e19c402ba8f967815f729597a8d034dfeb8
parentAdd maildir listing on frontpage. (diff)
downloadmu4web-63d2a8c04014762f42ab7013ebdcd0d96672348a.tar.gz
mu4web-63d2a8c04014762f42ab7013ebdcd0d96672348a.tar.xz
Minor cleanup.
-rw-r--r--mu4web/main.py21
-rw-r--r--mu4web/static/style.css4
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;