new style, dark style

This commit is contained in:
veclav talica
2024-02-10 20:48:22 +05:00
parent 7807619d58
commit 952a773875
2 changed files with 32 additions and 9 deletions

View File

@ -2,8 +2,7 @@
HEAD_EMBED = """
<div class="container">
<header>
<nav>
<nav class="custom-nav">
<ul>
<li><a href="/"><strong>mjestečko</strong></a></li>
<li><a href="https://git.poto.cafe/veclavtalica/mjestecko">source</a></li>
@ -11,14 +10,14 @@ HEAD_EMBED = """
<li><a href="/articles/mjestečko.html">about</a></li>
</ul>
</nav>
</header>
"""
NOTICE = """
<footer>
<a href="#top">Back to top ↑</a>
<a href="#top">Take me home ↑</a>
</footer>
"""
TAIL_EMBED = """
@ -54,5 +53,11 @@ WEEKDAYS = {
6: "Sunday"
}
def mixin_tag(content: str, tag: str) -> str:
return f"""<{tag}>
{content}</{tag}>
"""
def wrap_page(page: str) -> str:
return HEAD_EMBED + page + NOTICE + TAIL_EMBED
return HEAD_EMBED + mixin_tag(page, "main") + NOTICE + TAIL_EMBED