Files
haemka e76fd935e2 Show build commit/branch in the footer
Single-line addition next to the existing Pelican/Python credit,
using the same '·' delimiter as the header toggles. Only renders when
SITE_COMMIT is set (i.e. built via the CI workflow, not a plain local
build).
2026-08-14 11:09:53 +00:00

146 lines
6.8 KiB
HTML

<!DOCTYPE html>
<html lang="{% block html_lang %}{{ DEFAULT_LANG }}{% endblock html_lang %}">
<head>
{% block head %}
<title>{% block title %}{{ SITENAME }}{% endblock title %}</title>
<meta charset="utf-8" />
<script src="{{ main_siteurl | default(SITEURL) }}/theme/js/theme-init.js"></script>
<link rel="stylesheet" type="text/css" href="{{ main_siteurl | default(SITEURL) }}/theme/css/site.css" />
{% if EXTRA_HEAD %}
{{ EXTRA_HEAD | safe }}
{% endif %}
{% if FEED_ALL_ATOM %}
<link href="{{ FEED_DOMAIN }}/{% if FEED_ALL_ATOM_URL %}{{ FEED_ALL_ATOM_URL }}{% else %}{{ FEED_ALL_ATOM }}{% endif %}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Full Atom Feed" />
{% endif %}
{% if FEED_ALL_RSS %}
<link href="{{ FEED_DOMAIN }}/{% if FEED_ALL_RSS_URL %}{{ FEED_ALL_RSS_URL }}{% else %}{{ FEED_ALL_RSS }}{% endif %}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} Full RSS Feed" />
{% endif %}
{% if FEED_ATOM %}
<link href="{{ FEED_DOMAIN }}/{%if FEED_ATOM_URL %}{{ FEED_ATOM_URL }}{% else %}{{ FEED_ATOM }}{% endif %}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Atom Feed" />
{% endif %}
{% if FEED_RSS %}
<link href="{{ FEED_DOMAIN }}/{% if FEED_RSS_URL %}{{ FEED_RSS_URL }}{% else %}{{ FEED_RSS }}{% endif %}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} RSS Feed" />
{% endif %}
{% if CATEGORY_FEED_ATOM and category %}
<link href="{{ FEED_DOMAIN }}/{% if CATEGORY_FEED_ATOM_URL %}{{ CATEGORY_FEED_ATOM_URL.format(slug=category.slug) }}{% else %}{{ CATEGORY_FEED_ATOM.format(slug=category.slug) }}{% endif %}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Categories Atom Feed" />
{% endif %}
{% if CATEGORY_FEED_RSS and category %}
<link href="{{ FEED_DOMAIN }}/{% if CATEGORY_FEED_RSS_URL %}{{ CATEGORY_FEED_RSS_URL.format(slug=category.slug) }}{% else %}{{ CATEGORY_FEED_RSS.format(slug=category.slug) }}{% endif %}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} Categories RSS Feed" />
{% endif %}
{% if TAG_FEED_ATOM and tag %}
<link href="{{ FEED_DOMAIN }}/{% if TAG_FEED_ATOM_URL %}{{ TAG_FEED_ATOM_URL.format(slug=tag.slug) }}{% else %}{{ TAG_FEED_ATOM.format(slug=tag.slug) }}{% endif %}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Tags Atom Feed" />
{% endif %}
{% if TAG_FEED_RSS and tag %}
<link href="{{ FEED_DOMAIN }}/{% if TAG_FEED_RSS_URL %}{{ TAG_FEED_RSS_URL.format(slug=tag.slug) }}{% else %}{{ TAG_FEED_RSS.format(slug=tag.slug) }}{% endif %}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} Tags RSS Feed" />
{% endif %}
{% endblock head %}
</head>
<body id="index" class="home">
<header id="banner" class="body">
<div class="header-controls">
{% if extra_siteurls is defined %}
<ul class="lang-switcher">
{% for lang, siteurl in extra_siteurls.items() %}
<li>
{% if article is defined and article %}
<a href="{{ siteurl }}/{{ article.slug }}.html">{{ lang }}</a>
{% elif page is defined and page %}
<a href="{{ siteurl }}/pages/{{ page.slug }}.html">{{ lang }}</a>
{% else %}
<a href="{{ siteurl }}/">{{ lang }}</a>
{% endif %}
</li>
{% endfor %}
</ul>
<span class="header-delimiter">·</span>
{% endif %}
<button id="font-toggle" aria-label="Toggle font">Aa</button>
<span class="header-delimiter">·</span>
<button id="theme-toggle" aria-label="Toggle color theme"></button>
<span class="header-delimiter">·</span>
<button id="accent-toggle" aria-label="Toggle accent color"></button>
</div>
<h1><a href="{{ SITEURL }}/">{{ SITENAME }} <strong>{{ SITESUBTITLE }}</strong></a></h1>
</header><!-- /#banner -->
<div id="container">
<nav id="menu">
{% for title, link in MENUITEMS %}
<ul class="menuitems">
<li><a href="{{ link }}">{{ title }}</a></li>
</ul>
{% endfor %}
{% if DISPLAY_PAGES_ON_MENU %}
<ul id="pages" class="menuitems">
{% for p in pages %}
<li{% if p == page %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a></li>
{% endfor %}
</ul>
{% endif %}
{% if DISPLAY_RECENT_ARTICLES_ON_MENU | default(true) and articles is defined and articles %}
<ul id="recent-articles" class="menuitems">
{% for recent_article in articles[:(RECENT_ARTICLES_COUNT | default(10))] %}
<li{% if article is defined and recent_article == article %} class="active"{% endif %}>
<a href="{{ SITEURL }}/{{ recent_article.url }}">{{ recent_article.title }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
{% if DISPLAY_CATEGORIES_ON_MENU %}
<ul id="categories" class="menuitems">
{% for cat, null in categories %}
<li{% if cat == category %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ cat.url }}">{{ cat }}</a></li>
{% endfor %}
</ul>
{% endif %}
{% if DISPLAY_TAG_CLOUD_ON_MENU | default(true) and tags is defined and tags %}
{% set tag_counts = tags | map('last') | map('length') | list %}
{% set max_count = tag_counts | max %}
{% if max_count and max_count > 0 %}
<ul id="tag-cloud" class="menuitems">
{% for tag, articles_in_tag in tags | sort %}
{% set weight = ((articles_in_tag | length) / max_count * 4) | round(0, 'ceil') | int %}
<li class="tag-weight-{{ weight }}">
<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
{% endif %}
{% include "includes/social_links.html" %}
</nav><!-- /#menu -->
<main id="content">
{% block content %}
{% endblock %}
</main><!-- /#content -->
</div>
<footer id="contentinfo" class="body">
<address id="about" class="vcard body">
Proudly powered by <a href="http://getpelican.com/">Pelican</a>, which takes great advantage of <a href="http://python.org">Python</a>.
{% if SITE_COMMIT %}
<span class="header-delimiter">·</span> Build <a href="https://git.haemka.in/hmk/haemka.de/commit/{{ SITE_COMMIT }}">{{ SITE_COMMIT }}</a> ({{ SITE_BRANCH }})
{% endif %}
</address><!-- /#about -->
</footer><!-- /#contentinfo -->
<div class="lightbox-overlay" id="lightbox-overlay">
<div class="lightbox-content">
<div id="lightbox-media"></div>
<p id="lightbox-caption"></p>
</div>
</div>
<script src="{{ main_siteurl | default(SITEURL) }}/theme/js/lightbox.js" defer></script>
<script src="{{ main_siteurl | default(SITEURL) }}/theme/js/toggles.js" defer></script>
<script src="{{ main_siteurl | default(SITEURL) }}/theme/js/svg-inject.js" defer></script>
</body>
</html>