Move notifications into container

pull/1/head
Luca 3 years ago
parent 4e035fb888
commit 472bd6f629

@ -9,17 +9,12 @@
{% endblock %} {% endblock %}
{% block body %} {% block body %}
{% if helper %} <section class="section">
<section class="hero">
<div class="container"> <div class="container">
<div class="hero-body"> {% include 'notifications.html' %}
{% if helper %}
<h1 class="title">Hallo {{ helper.name }}!</h1> <h1 class="title">Hallo {{ helper.name }}!</h1>
</div>
</div>
</section>
{% endif %} {% endif %}
<section class="section">
<div class="container">
{% block content %}{% endblock %} {% block content %}{% endblock %}
</div> </div>
</section> </section>

@ -10,6 +10,7 @@
{% block body %} {% block body %}
<section class="section"> <section class="section">
<div class="container"> <div class="container">
{% include 'notifications.html' %}
{% block content %}{% endblock %} {% block content %}{% endblock %}
</div> </div>
</section> </section>

@ -18,13 +18,9 @@
</div> </div>
</div> </div>
</nav> </nav>
{% for message in messages %}
<div class="notification{% for tag in message.tags.split %} is-{{ tag }}{% endfor %}">
<button class="delete"></button>
{{ message }}
</div>
{% endfor %}
{% block body %} {% block body %}
{% include 'notifications.html' %}
{% endblock %} {% endblock %}
<script>document.querySelectorAll('.delete').forEach(btn => btn.addEventListener('click', event => event.target.parentElement.remove()));</script>
</body> </body>
</html> </html>

@ -0,0 +1,6 @@
{% for message in messages %}
<div class="notification{% for tag in message.tags.split %} is-{{ tag }}{% endfor %}">
<button class="delete"></button>
{{ message }}
</div>
{% endfor %}
Loading…
Cancel
Save