return (
bicephalus.Status.OK,
"text/html",
- html.html_template(*itertools.chain(posts)),
+ html.html_template(*itertools.chain(posts), full=True),
)
def feed(self):
html.html_template(
*self.entry.html(),
page_title=f"{self.entry.title} - {self.entry.posted}",
+ full=False,
),
)
from blog import meta, pretty, gemtext
-def html_template(*content, page_title=None):
+def html_template(*content, page_title=None, full):
title = [h.A(meta.TITLE, href=f"{meta.SCHEMA}://{meta.HOST}")]
if page_title:
title += f" - {page_title}"
links += h.BaseElement(f" {meta.EMAIL_TEXT}")
+ full_part = []
+ if full:
+ full_part = [
+ h.H2(meta.SUBTITLE),
+ h.P(*links),
+ ]
+
return pretty.pretty_html(h.render(
h.HTML(
h.HEAD(
),
h.BODY(
h.H1(title),
- h.H2(meta.SUBTITLE),
- h.P(*links),
+ *full_part,
*content,
),
doctype="html",