From: alex Date: Sat, 11 Nov 2023 12:14:08 +0000 (+0100) Subject: Make body narrow X-Git-Tag: 20240214-emacs~101 X-Git-Url: https://xn--ix-yja.es/gitweb/?a=commitdiff_plain;h=babb027f8f925fb7d4a85a51fb918496546112ae;p=alex.git Make body narrow --- 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),