Conform to navbar structure as described in Bulma docs
This commit is contained in:
parent
1c3edb3129
commit
78e9b85ff0
|
@ -3,23 +3,19 @@
|
||||||
{% block title %}Help!{% endblock %}
|
{% block title %}Help!{% endblock %}
|
||||||
|
|
||||||
{% block navbar %}
|
{% block navbar %}
|
||||||
|
<div class="navbar-start">
|
||||||
{% if not helper%}
|
{% if not helper%}
|
||||||
<a class="navbar-item" href="{% url 'register' %}">Anmelden</a>
|
<a class="navbar-item" href="{% url 'register' %}">Anmelden</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="navbarfoo">
|
|
||||||
<span aria-hidden="true"></span>
|
|
||||||
<span aria-hidden="true"></span>
|
|
||||||
<span aria-hidden="true"></span>
|
|
||||||
</a>
|
|
||||||
<div class="navbar-menu" id="navbarfoo">
|
|
||||||
{% if not helper.number_validated %}
|
{% if not helper.number_validated %}
|
||||||
<p class="navbar-item has-text-danger">Bestätige deine Telefonnummer über den Link in der SMS</p>
|
<p class="navbar-item has-text-danger">Bestätige deine Telefonnummer über den Link in der SMS</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if helper.important_shift %}
|
{% if helper.important_shift %}
|
||||||
<a class="navbar-item" href="{% url 'shift' helper.important_shift.pk %}">{%if helper.important_shift.is_running%}Laufende{% else %}Nächste{% endif %} Schicht({{ helper.important_shift.start_at|date:"H:m" }})</a>
|
<a class="navbar-item" href="{% url 'shift' helper.important_shift.pk %}">{%if helper.important_shift.is_running%}Laufende{% else %}Nächste{% endif %} Schicht({{ helper.important_shift.start_at|date:"H:m" }})</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
<div class="navbar-end"></div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
|
|
|
@ -3,9 +3,12 @@
|
||||||
{% block title %}Team{% endblock %}
|
{% block title %}Team{% endblock %}
|
||||||
|
|
||||||
{% block navbar %}
|
{% block navbar %}
|
||||||
<a class="navbar-item" href="{% url 'team:shift_overview' %}">Schichtübersicht</a>
|
<div class="navbar-start">
|
||||||
<a class="navbar-item" href="{% url 'team:shift_free' %}">Freie Schichten</a>
|
<a class="navbar-item" href="{% url 'team:shift_overview' %}">Schichtübersicht</a>
|
||||||
<a class="navbar-item" href="{% url 'team:shift_all' %}">Alle Schichten</a>
|
<a class="navbar-item" href="{% url 'team:shift_free' %}">Freie Schichten</a>
|
||||||
|
<a class="navbar-item" href="{% url 'team:shift_all' %}">Alle Schichten</a>
|
||||||
|
</div>
|
||||||
|
<div class="navbar-end"></div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
|
|
|
@ -14,6 +14,13 @@
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="navbar-brand">
|
<div class="navbar-brand">
|
||||||
<a class="navbar-item has-text-weight-bold" href="{% url 'index' %}">Helfer*innen</a>
|
<a class="navbar-item has-text-weight-bold" href="{% url 'index' %}">Helfer*innen</a>
|
||||||
|
<a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="main-nav">
|
||||||
|
<span aria-hidden="true"></span>
|
||||||
|
<span aria-hidden="true"></span>
|
||||||
|
<span aria-hidden="true"></span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="navbar-menu" id="main-nav">
|
||||||
{% block navbar %}
|
{% block navbar %}
|
||||||
{% endblock navbar %}
|
{% endblock navbar %}
|
||||||
</div>
|
</div>
|
||||||
|
@ -24,17 +31,12 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
<script>
|
<script>
|
||||||
document.querySelectorAll('.delete').forEach(btn => btn.addEventListener('click', event => event.target.parentElement.remove()));
|
document.querySelectorAll('.delete').forEach(btn => btn.addEventListener('click', event => event.target.parentElement.remove()));
|
||||||
const $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll('.navbar-burger'), 0);
|
document.querySelectorAll('.navbar-burger').forEach(el => el.addEventListener('click', () => {
|
||||||
if ($navbarBurgers.length > 0) {
|
if (el.dataset.target) {
|
||||||
$navbarBurgers.forEach( el => {
|
|
||||||
el.addEventListener('click', () => {
|
|
||||||
const target = el.dataset.target;
|
|
||||||
const $target = document.getElementById(target);
|
|
||||||
el.classList.toggle('is-active');
|
el.classList.toggle('is-active');
|
||||||
$target.classList.toggle('is-active');
|
document.getElementById(el.dataset.target).classList.toggle('is-active');
|
||||||
});
|
}
|
||||||
});
|
}));
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in New Issue