Skip to content

Commit

Permalink
style(header): Update user dropdown styles and add horizontal rule
Browse files Browse the repository at this point in the history
  • Loading branch information
wajeht committed Nov 28, 2024
1 parent 86b060d commit e9982b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/views/components/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ <h1><a href="/apps">🔔 Notify</a></h1>

<details style="position: relative;">
<summary><%= state.user.username %> 👤</summary>
<div style="position: absolute; top: 100%; left: 0; z-index: 1; border: dashed; display: flex; flex-direction: column; padding: 10px; background-color: var(--background-color); border-radius: 5px;">
<div style="position: absolute; top: 100%; right: 0; z-index: 1; border: dashed; display: flex; flex-direction: column; padding: 10px; background-color: var(--background-color); border-radius: 5px; min-width: 150px; gap: 10px;">
<% if (state.user.is_admin) { %>
<a style="font-weight: <%= (path === '/admin' || path === '/admin/users') ? 'bold' : 'normal' %>; <%= (path === '/admin' || path === '/admin/users') ? 'text-decoration: underline' : null %>" href="/admin">🛡️ Admin</a>
<% } %>

<a style="font-weight: <%= path === '/settings' ? 'bold' : 'normal' %>; <%= path === '/settings' ? 'text-decoration: underline' : null %>" href="/settings">⚙️ Settings</a>

<hr style="border: none; border-top: dashed 1px; margin: 5px 0;">
<a href="/logout">🚪 Logout</a>
</div>
</details>
Expand Down

0 comments on commit e9982b0

Please sign in to comment.