aboutsummaryrefslogtreecommitdiff
path: root/blog
diff options
context:
space:
mode:
authoralex <alex@pdp7.net>2023-11-11 13:14:08 +0100
committeralex <alex@pdp7.net>2023-11-11 13:14:08 +0100
commitbabb027f8f925fb7d4a85a51fb918496546112ae (patch)
tree72fa243f0eb39c3535db9c54497f9ad6cf864fb4 /blog
parentf54c277c42b79711315ef614de2e5b28c14bd93e (diff)
Make body narrow
Diffstat (limited to 'blog')
-rw-r--r--blog/blog/html.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/blog/blog/html.py b/blog/blog/html.py
index ca3e8e04..f9b9d88c 100644
--- a/blog/blog/html.py
+++ b/blog/blog/html.py
@@ -1,4 +1,5 @@
import itertools
+import textwrap
import htmlgenerator as h
@@ -28,6 +29,15 @@ def html_template(*content, page_title=None, full):
h.HEAD(
h.TITLE(meta.TITLE + (f" - {page_title}" if page_title else "")),
h.LINK(rel="alternate", type="application/rss+xml", title=meta.TITLE, href=f"{meta.SCHEMA}://{meta.HOST}/feed/"),
+ h.STYLE(textwrap.dedent("""
+ body {
+ max-width: 60em;
+ margin-left: auto;
+ margin-right: auto;
+ padding-left: 2em;
+ padding-right: 2em;
+ }
+ """).lstrip())
),
h.BODY(
h.H1(title),