add admin dropdown

This commit is contained in:
vinchent 2024-07-22 13:10:17 +02:00
parent dedab91898
commit 51e3c74950

View File

@ -50,13 +50,22 @@
<li class="nav-item">
<a class="nav-link" href="/contact">Contact</a>
</li>
<li class="nav-item">
{{if eq .IsAuthenticated 1}}
<a class="nav-link" href="/user/logout">Logout</a>
{{else}}
<a class="nav-link" href="/user/login">Login</a>
{{end}}
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown"
aria-expanded="false">
Admin
</a>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="/admin/dashboard">Dashboard</a></li>
<li><a class="dropdown-item" href="/user/logout">Logout</a></li>
</ul>
</li>
{{else}}
<li class="nav-item">
<a class="nav-link" href="/user/login">Login</a>
</li>
{{end}}
</ul>
</div>
</div>