From babb027f8f925fb7d4a85a51fb918496546112ae Mon Sep 17 00:00:00 2001 From: alex Date: Sat, 11 Nov 2023 13:14:08 +0100 Subject: [PATCH] Make body narrow --- blog/blog/html.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/blog/blog/html.py b/blog/blog/html.py index ca3e8e0..f9b9d88 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), -- 2.47.3