66 lines
1.2 KiB
Python
66 lines
1.2 KiB
Python
|
|
HEAD_EMBED = """
|
|
|
|
<div class="container">
|
|
<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>
|
|
<li><a href="/feed.xml">rss</a></li>
|
|
<li><a href="/articles/mjestečko.html">about</a></li>
|
|
<li><a href="https://modarchive.org/index.php?request=view_artist_modules&query=96070">tracks</a></li>
|
|
<li><a rel="me" href="https://poto.cafe/@veclavtalica">mastodon</a></li>
|
|
</ul>
|
|
</nav>
|
|
|
|
"""
|
|
|
|
NOTICE = """
|
|
<footer>
|
|
<a href="#top">Take me home ↑</a>
|
|
</footer>
|
|
|
|
"""
|
|
|
|
TAIL_EMBED = """
|
|
|
|
</div>
|
|
|
|
"""
|
|
|
|
ADJECTIVES = ["*wild*", "**wacky**", "very humble", "**most serious**"]
|
|
|
|
MONTHS = {
|
|
1: "January",
|
|
2: "February",
|
|
3: "March",
|
|
4: "April",
|
|
5: "May",
|
|
6: "June",
|
|
7: "July",
|
|
8: "August",
|
|
9: "September",
|
|
10: "October",
|
|
11: "November",
|
|
12: "December"
|
|
}
|
|
|
|
WEEKDAYS = {
|
|
0: "Monday",
|
|
1: "Tuesday",
|
|
2: "Wednesday",
|
|
3: "Thursday",
|
|
4: "Friday",
|
|
5: "Saturday",
|
|
6: "Sunday"
|
|
}
|
|
|
|
def mixin_tag(content: str, tag: str) -> str:
|
|
return f"""<{tag}>
|
|
{content}</{tag}>
|
|
|
|
"""
|
|
|
|
def wrap_page(page: str) -> str:
|
|
return HEAD_EMBED + mixin_tag(page, "main") + NOTICE + TAIL_EMBED
|