add commit to bottom nav

This commit is contained in:
Lera Elvoé 2025-06-30 22:34:19 +03:00
parent c22aa1036f
commit a12fd0a904
Signed by: yagich
SSH Key Fingerprint: SHA256:6xjGb6uA7lAVcULa7byPEN//rQ0wPoG+UzYVMfZnbvc
2 changed files with 5 additions and 1 deletions

View File

@ -85,10 +85,14 @@ def create_app():
@app.context_processor
def inject_constants():
commit = ""
with open('.git/refs/heads/main') as f:
commit = f.read().strip()
return {
"InfoboxIcons": InfoboxIcons,
"InfoboxHTMLClass": InfoboxHTMLClass,
"InfoboxKind": InfoboxKind,
"__commit": commit,
}
@app.context_processor

View File

@ -21,7 +21,7 @@
{% endwith %}
{% block content %}{% endblock %}
<footer class="darkbg">
<span>Pyrom commit</span>
<span>Pyrom commit <a href="{{ "https://git.poto.cafe/yagich/porom/commit/" + __commit }}">{{ __commit[:8] }}</a></span>
</footer>
<script src="/static/js/copy-code.js"></script>
<script src="/static/js/ui.js"></script>