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"> <li class="nav-item">
<a class="nav-link" href="/contact">Contact</a> <a class="nav-link" href="/contact">Contact</a>
</li> </li>
<li class="nav-item"> {{if eq .IsAuthenticated 1}}
{{if eq .IsAuthenticated 1}} <li class="nav-item dropdown">
<a class="nav-link" href="/user/logout">Logout</a> <a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown"
{{else}} aria-expanded="false">
<a class="nav-link" href="/user/login">Login</a> Admin
{{end}} </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> </li>
{{else}}
<li class="nav-item">
<a class="nav-link" href="/user/login">Login</a>
</li>
{{end}}
</ul> </ul>
</div> </div>
</div> </div>