diff --git a/uffd/static/style.css b/uffd/static/style.css index 8aecff42d658fadbe38c2c58b82e5fc70f9cd88e..dde08a5904cab0ab11c51d03f75566d4cb03df85 100644 --- a/uffd/static/style.css +++ b/uffd/static/style.css @@ -1,5 +1,5 @@ .footer { - position: absolute; + position: fixed; bottom: 0; width: 100%; height: 2em; diff --git a/uffd/template_helper.py b/uffd/template_helper.py index 3dcfbd273c9ee41b336e6668fec54b5d81479d36..66e1e3347bef06a68854d34207b8c4c487904635 100644 --- a/uffd/template_helper.py +++ b/uffd/template_helper.py @@ -8,7 +8,7 @@ def register_template_helper(app): return a == b @app.url_defaults - def static_version_inject(endpoint, values): + def static_version_inject(endpoint, values): #pylint: disable=unused-variable if endpoint == 'static': values['v'] = app.jinja_env.globals['gitversion']['longhash'] #pylint: disable=no-member @@ -23,5 +23,5 @@ def register_template_helper(app): app.add_template_global(equalto, name='equalto') # get git commit - GITOUTPUT = subprocess.check_output(['git', "log", "-g", "-1", "--pretty=%H#%h#%d#%s"]).decode('UTF-8').split('#', 3) - app.jinja_env.globals['gitversion'] = {'hash': GITOUTPUT[1], 'longhash': GITOUTPUT[0], 'branch': GITOUTPUT[2], 'msg': GITOUTPUT[3]} #pylint: disable=no-member + git_output = subprocess.check_output(['git', "log", "-g", "-1", "--pretty=%H#%h#%d#%s"]).decode('UTF-8').split('#', 3) + app.jinja_env.globals['gitversion'] = {'hash': git_output[1], 'longhash': git_output[0], 'branch': git_output[2], 'msg': git_output[3]} #pylint: disable=no-member diff --git a/uffd/templates/base.html b/uffd/templates/base.html index 66f90a7d18ee2a6c1162b3227a9241c627ed4418..22360863a86963433f02f9b1ea527c7cdd64c9c7 100644 --- a/uffd/templates/base.html +++ b/uffd/templates/base.html @@ -102,6 +102,10 @@ {% for link in config["FOOTER_LINKS"]%} <li class="list-inline-item"><a href="{{ link.url }}">{{ link.title }}</a></li> {% endfor %} + <li class="list-inline-item float-right"> + <a href="https://git.cccv.de/infra/uffd/uffd/">Sourcecode</a> + <a target="_blank" href="https://git.cccv.de/infra/uffd/uffd/-/commit/{{ gitversion.longhash }}"><span title="{{ gitversion.branch }} {{ gitversion.hash }}: {{ gitversion.msg }}" data-toggle="tooltip">Version: {{ gitversion.hash }}</span></a> + </li> </ul> </div> {% endblock footer %}