add support for external sites in menu

This commit is contained in:
Franzi 2021-12-22 10:01:01 +01:00
parent d8c0b28cab
commit fcb6a8f6ca
Signed by: kunsi
GPG Key ID: 12E3D2136B818350
2 changed files with 20 additions and 0 deletions

File diff suppressed because one or more lines are too long

View File

@ -25,6 +25,18 @@
<li class="nav-item">
<a class="nav-link" href="{{ url_for("groups") }}">groups</a>
</li>
{% if APP_CONFIG.external_links %}
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
Other Sites
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
{% for text, link in APP_CONFIG.external_links.items()|sort %}
<a class="dropdown-item" href="{{ link }}">{{ text }}</a>
{% endfor %}
</div>
</li>
{% endif %}
</ul>
<span class="navbar-text navbar-right">Signed in as <em>{{ CURRENT_USER["uid"] }}</em> - <a href="{{ url_for("logout") }}">logout</a></span>
</div>
@ -40,5 +52,6 @@
{% block content %}
{% endblock %}
</div>
<script src="{{ url_for("static", filename="bootstrap.bundle.min.js") }}"></script>
</body>
</html>