added version + Gitea link in footer

This commit is contained in:
Louis Heredero 2025-01-26 19:48:51 +01:00
parent 029502d887
commit 500ff54537
Signed by: HEL
GPG Key ID: 8D83DE470F8544E7
6 changed files with 35 additions and 2 deletions

View File

@ -19,6 +19,10 @@
<orderEntry type="jdk" jdkName="Python 3.13 (TimeDispatcher)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="PackageRequirementsSettings">
<option name="removeUnused" value="true" />
<option name="modifyBaseFiles" value="true" />
</component>
<component name="TemplatesService">
<option name="TEMPLATE_CONFIGURATION" value="Django" />
<option name="TEMPLATE_FOLDERS">

View File

@ -15,6 +15,8 @@ from pathlib import Path
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
APP_VERSION = "0.0.1"
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/5.1/howto/deployment/checklist/
@ -64,6 +66,7 @@ TEMPLATES = [
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
'context_processors.version',
'context_processors.navbar_links'
],
},

View File

@ -1,3 +1,11 @@
from TimeDispatcher.settings import APP_VERSION
def version(request):
return {
"version": APP_VERSION
}
def navbar_links(request):
return {
"nav_links": [

View File

@ -53,7 +53,16 @@ nav a:hover {
footer {
background-color: var(--dark2);
min-height: 3em;
display: flex;
justify-content: flex-end;
align-items: center;
padding: 1.2em;
}
footer .sep {
margin: 0 0.5em;
border-left: solid var(--light1) 1px;
height: 1em;
}
main {
@ -83,4 +92,8 @@ button, select {
.template {
display: none !important;
}
a {
color: #69c935
}

1
requirements.txt Normal file
View File

@ -0,0 +1 @@
Django~=5.1.5

View File

@ -19,6 +19,10 @@
<main>
{% block main %}{% endblock %}
</main>
<footer>{% block footer %}{% endblock %}</footer>
<footer>
<span><i>Time Dispatcher v{{ version }}</i></span>
<span class="sep"></span>
<span><a href="https://git.kb28.ch/HEL/TimeDispatcher" target="_blank">Gitea</a></span>
</footer>
</body>
</html>