Add base UI elements

This commit is contained in:
Matthias 2021-11-27 21:23:56 +01:00
parent a9995087ac
commit c4c43135f1
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076
3 changed files with 25 additions and 0 deletions

View File

@ -121,6 +121,7 @@
</div>
{% include 'modals.html' %}
{% include 'about.html' %}
{% include "notifications.html" %}
</div>
<!-- Scripts -->

View File

@ -71,6 +71,16 @@
</button>
</li>
{% endif %}
<li class='nav-item me-2'>
<button data-bs-toggle="offcanvas" data-bs-target="#offcanvasRight" class='btn position-relative' title='{% trans "Show Notifications" %}'>
<span class='fas fa-bell'></span>
<span class="position-absolute top-100 start-100 translate-middle p-2 bg-danger border border-light rounded-circle d-none" id="notification-alert">
<span class="visually-hidden">{% trans "New Notifications" %}</span>
</span>
</button>
</li>
<li class='nav-item me-2'>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar-objects" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>

View File

@ -0,0 +1,14 @@
{% load i18n %}
<div class="offcanvas offcanvas-end" tabindex="-1" id="offcanvasRight" data-bs-scroll="true" aria-labelledby="offcanvasRightLabel">
<div class="offcanvas-header">
<h5 id="offcanvasRightLabel">{% trans "Notifications" %}</h5>
<button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<div id="notification-center">
<p class='text-muted'>Notifications will load here</p>
</div>
<hr>
<a href="{% url 'notifications' %}">{% trans "Show all notifications and history" %}</a>
</div>
</div>