25 lines
1.3 KiB
Plaintext
25 lines
1.3 KiB
Plaintext
<header class="site-header">
|
|
<div class="container header-inner">
|
|
<a class="brand" href="/">🎵 <%= siteName %></a>
|
|
<nav class="nav">
|
|
<a href="/songs" class="<%= currentPath && currentPath.startsWith('/songs') ? 'active' : '' %>">Songs</a>
|
|
<a href="/playlists" class="<%= currentPath && currentPath.startsWith('/playlists') ? 'active' : '' %>">Playlists</a>
|
|
<a href="/profiles" class="<%= currentPath && currentPath.startsWith('/profiles') ? 'active' : '' %>">Profiles</a>
|
|
<% if (user) { %>
|
|
<a href="/admin/songs" class="<%= currentPath && currentPath.startsWith('/admin') && !currentPath.startsWith('/admin/users') ? 'active' : '' %>">My Music</a>
|
|
<% if (user.role === 'admin') { %>
|
|
<a href="/admin/users" class="<%= currentPath && currentPath.startsWith('/admin/users') ? 'active' : '' %>">Users</a>
|
|
<% } %>
|
|
<a href="/account">Account</a>
|
|
<form method="post" action="/logout" class="inline-form">
|
|
<input type="hidden" name="_csrf" value="<%= csrfToken %>">
|
|
<button type="submit" class="linklike">Log out</button>
|
|
</form>
|
|
<% } else { %>
|
|
<a href="/login">Log in</a>
|
|
<a href="/register" class="btn-small">Register</a>
|
|
<% } %>
|
|
</nav>
|
|
</div>
|
|
</header>
|