add commit to bottom nav
This commit is contained in:
parent
c22aa1036f
commit
a12fd0a904
@ -85,10 +85,14 @@ def create_app():
|
|||||||
|
|
||||||
@app.context_processor
|
@app.context_processor
|
||||||
def inject_constants():
|
def inject_constants():
|
||||||
|
commit = ""
|
||||||
|
with open('.git/refs/heads/main') as f:
|
||||||
|
commit = f.read().strip()
|
||||||
return {
|
return {
|
||||||
"InfoboxIcons": InfoboxIcons,
|
"InfoboxIcons": InfoboxIcons,
|
||||||
"InfoboxHTMLClass": InfoboxHTMLClass,
|
"InfoboxHTMLClass": InfoboxHTMLClass,
|
||||||
"InfoboxKind": InfoboxKind,
|
"InfoboxKind": InfoboxKind,
|
||||||
|
"__commit": commit,
|
||||||
}
|
}
|
||||||
|
|
||||||
@app.context_processor
|
@app.context_processor
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
{% endwith %}
|
{% endwith %}
|
||||||
{% block content %}{% endblock %}
|
{% block content %}{% endblock %}
|
||||||
<footer class="darkbg">
|
<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>
|
</footer>
|
||||||
<script src="/static/js/copy-code.js"></script>
|
<script src="/static/js/copy-code.js"></script>
|
||||||
<script src="/static/js/ui.js"></script>
|
<script src="/static/js/ui.js"></script>
|
||||||
|
Loading…
Reference in New Issue
Block a user