-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_navbar.ejs
57 lines (55 loc) · 2.04 KB
/
_navbar.ejs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<nav class="navbar navbar-expand-lg">
<a class="navbar-brand" href="/">SongSave</a>
<button
class="navbar-toggler"
type="button"
data-toggle="collapse"
data-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent"
aria-expanded="false"
aria-label="Toggle navigation"
>
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item">
<a class="nav-link<%= locals.path && locals.path === '/' ? ' active' : '' %>" href="/"
>Home</a
>
</li>
<li class="nav-item">
<a class="nav-link<%= locals.path && locals.path === '/playlists' ? ' active' : '' %>" href="/playlists/my">Minhas Coleções</a>
</li>
<li class="nav-item">
<a class="nav-link<%= locals.path && locals.path === '/playlists' ? ' active' : '' %>" href="/playlists/public">Coleções Públicas</a>
</li>
<li class="nav-item">
<a class="nav-link<%= locals.path && locals.path === '/playlists/new' ? ' active' : '' %>" href="/playlists/new">Nova Coleção</a>
</li>
</li>
</ul>
<% if (!!locals.user) { %>
<div class="nav-item dropdown dropdown-right">
<a
class="nav-link dropdown-toggle"
href="#"
id="navbarDropdown"
role="button"
data-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false"
>
<%= user.firstName %>
</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
<a class="dropdown-item<%= locals.path && locals.path === '/profile' ? ' active' : '' %>" href="/profile">Meu Perfil</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="/auth/logout">Logout</a>
</div>
</div>
<% } else { %>
<a class="nav-link" href="/auth">Login</a>
<% } %>
</div>
</nav>