mirror of
https://github.com/StefBuwalda/WebTech.git
synced 2025-10-30 11:19:58 +00:00
Adding flash functionality, had to make my own decorator
This commit is contained in:
@@ -38,20 +38,37 @@
|
||||
</ul>
|
||||
{% if current_user.is_authenticated %}
|
||||
<div class="dropstart">
|
||||
<button class="btn btn-outline-info" type="button" id="dropdownMenuButton1" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<button class="btn btn-outline-info" type="button" id="dropdownMenuButton1"
|
||||
data-bs-toggle="dropdown" aria-expanded="false">
|
||||
Profile
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-end dropdown-menu-lg-start" aria-labelledby="dropdownMenuButton1">
|
||||
<ul class="dropdown-menu dropdown-menu-end dropdown-menu-lg-start"
|
||||
aria-labelledby="dropdownMenuButton1">
|
||||
<li><a class="dropdown-item">Username: {{current_user.username}}</a></li>
|
||||
<li><a class="dropdown-item {% if active_page == 'update' %}active{% endif %}" href="{{url_for('auth.update')}}">Change password</a></li>
|
||||
<li><hr class="dropdown-divider"></li>
|
||||
<li><a class="dropdown-item" style="color: tomato;" data-bs-theme="dark" href="{{url_for('auth.logout')}}">Logout</a></li>
|
||||
<li><a class="dropdown-item {% if active_page == 'update' %}active{% endif %}"
|
||||
href="{{url_for('auth.update')}}">Change password</a></li>
|
||||
<li>
|
||||
<hr class="dropdown-divider">
|
||||
</li>
|
||||
<li><a class="dropdown-item" style="color: tomato;" data-bs-theme="dark"
|
||||
href="{{url_for('auth.logout')}}">Logout</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="position-fixed bottom-0 end-0 p-3" style="z-index: 1050;">
|
||||
{% for message in get_flashed_messages() %}
|
||||
<div class="alert alert-warning alert-dismissible fade show" role="alert">
|
||||
{{message}}
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user