Enhance login and navigation templates with authentication checks

This commit is contained in:
2025-04-23 23:35:08 +02:00
parent 4712c01688
commit 9bae324447
2 changed files with 17 additions and 15 deletions

View File

@@ -10,6 +10,7 @@
aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
{% if is_granted('IS_AUTHENTICATED') %}
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
@@ -24,5 +25,6 @@
</li>
</ul>
</div>
{% endif %}
</div>
</nav>

View File

@@ -9,7 +9,7 @@
</div>
{% else %}
<form method="post">
<h1 class="h3 mb-3 font-weight-normal">{{ 'Please sign in'|trans }}</h1>
<h1 class="py-2 h3 mb-3 font-weight-normal">{{ 'Please sign in'|trans }}</h1>
<div class="mb-3">
<label for="username" class="form-label">{{ 'Email'|trans }}</label>
<input type="email" value="{{ last_username }}" name="_username" id="username" class="form-control"