Update login/logout menus

This commit is contained in:
Booteille 2024-12-05 16:36:14 +01:00
parent de9ccbbd52
commit 2b729abc0e
No known key found for this signature in database
GPG Key ID: 0AB6C6CA01272646
4 changed files with 9 additions and 3 deletions

View File

@ -20,9 +20,10 @@ fontawesomeSubset(
"globe", "globe",
"lock", "lock",
"recycle", "recycle",
"right-from-bracket",
"right-to-bracket",
"trash", "trash",
"upload", "upload",
"user",
], ],
`${themeDir}/public/webfonts`, `${themeDir}/public/webfonts`,
{} {}

View File

@ -66,13 +66,18 @@
<div class="navbar-item"> <div class="navbar-item">
<form action="<%= url_for('/logout') %>" method="POST"> <form action="<%= url_for('/logout') %>" method="POST">
%= csrf_field %= csrf_field
<button type="submit"><%= l('Logout') %></button> <button class="has-text-weight-semibold" type="submit">
<span class="icon-text">
<span class="icon fas fa-right-from-bracket" aria-hidden="true"></span>
<span><%= l('Logout') %></span>
</span>
</button>
</form> </form>
</div> </div>
% } else { % } else {
<a href="<%= url_for('/login') %>" class="navbar-item <%= ' has-background-primary-35' if (current_route eq 'login') %>"> <a href="<%= url_for('/login') %>" class="navbar-item <%= ' has-background-primary-35' if (current_route eq 'login') %>">
<span class="icon-text"> <span class="icon-text">
<span class="icon fa-solid fa-user" aria-hidden="true"></span> <span class="icon fa-solid fa-right-to-bracket" aria-hidden="true"></span>
<span><%= l('Signin') %></span> <span><%= l('Signin') %></span>
</span> </span>
</a> </a>