return (
bicephalus.Status.OK,
"text/html",
- html.html_template(*itertools.chain(posts), full=True),
+ html.html_template(*itertools.chain(posts), path=self.request.path, full=True),
)
def feed(self):
html.html_template(
*self.entry.html(),
page_title=f"{self.entry.title} - {self.entry.posted}",
+ path=self.request.path,
full=False,
),
)
from blog import meta, pretty, gemtext
-def html_template(*content, page_title=None, full):
+def html_template(*content, page_title=None, path, full):
title = [h.A(meta.TITLE, href=f"{meta.SCHEMA}://{meta.HOST}")]
if page_title:
title += f" - {page_title}"
h.P(*links),
]
+ gemini_url = f"gemini://alex.corcoles.net{path}"
+
return pretty.pretty_html(h.render(
h.HTML(
h.HEAD(
""").lstrip())
),
h.BODY(
+ h.P(
+ "Contenido tambien disponible en Gemini en ",
+ h.A(gemini_url, href=gemini_url),
+ ". ",
+ h.A("Información sobre Gemini.", href="https://geminiprotocol.net/"),
+ ),
h.H1(title),
*full_part,
*content,