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"> <li class="nav-item">
<a class="nav-link" href="{{ url_for("groups") }}">groups</a> <a class="nav-link" href="{{ url_for("groups") }}">groups</a>
</li> </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> </ul>
<span class="navbar-text navbar-right">Signed in as <em>{{ CURRENT_USER["uid"] }}</em> - <a href="{{ url_for("logout") }}">logout</a></span> <span class="navbar-text navbar-right">Signed in as <em>{{ CURRENT_USER["uid"] }}</em> - <a href="{{ url_for("logout") }}">logout</a></span>
</div> </div>
@ -40,5 +52,6 @@
{% block content %} {% block content %}
{% endblock %} {% endblock %}
</div> </div>
<script src="{{ url_for("static", filename="bootstrap.bundle.min.js") }}"></script>
</body> </body>
</html> </html>