Adds breadcrumbs and navigation, moves QR code to its own page.

This commit is contained in:
Ana Custura 2026-02-18 13:17:22 +00:00
parent d9f4c6d597
commit 947b4ac59a
7 changed files with 93 additions and 27 deletions

View file

@ -0,0 +1,15 @@
<div class="breadcrumbs">
<nav class="breadcrumb" aria-label="breadcrumbs">
{% set ns = namespace(crumb_path=request.url_root[:-1])%}
{# We use a namespace since jinja 2 variables cannot persist outside loops
The crumb_path var dynamically constructs urls for each breadcrumb based on request.path (removing the trailing slash),
We need to do this for the file viewer, as it can have many nested directories, but works for all other pages. #}
<ul>
{% set breadcrumbs = request.path[1:].split('/') %} {# request.path starts with / #}
{% for crumb in breadcrumbs %}
{% set ns.crumb_path = ns.crumb_path + "/" +crumb %}
<li><a href="{{ ns.crumb_path }}">{{crumb}}</a></li>
{% endfor %}
</ul>
</nav>
</div>