2
0
Fork 0

Move notifications into container

This commit is contained in:
Luca 2022-04-20 00:42:02 +02:00
parent 4e035fb888
commit 472bd6f629
4 changed files with 13 additions and 15 deletions

View File

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

View File

@ -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>

View File

@ -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>

View File

@ -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 %}