shift73k/lib/shift73k_web/templates/layout/_navbar.html.heex

87 lines
3.2 KiB
Text
Raw Normal View History

<nav class="navbar navbar-expand-lg navbar-dark bg-secondary mb-4">
<div class="container">
2021-03-03 08:15:14 -05:00
<h1 class="fs-4 my-0 py-0 lh-base">
<%= link to: "/", class: "navbar-brand fs-4" do %>
<i class="bi bi-calendar2-week me-1"></i>
2021-03-05 19:23:32 -05:00
<span class="fw-light">Shift73k</span>
<% end %>
2021-03-03 08:15:14 -05:00
</h1>
2021-03-10 11:44:33 -05:00
<%= if @current_user do %>
<button class="hamburger hamburger--squeeze collapsed navbar-toggler" id="navbarSupportedContentToggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="hamburger-box d-flex">
<span class="hamburger-inner"></span>
</span>
</button>
<% else %>
2021-03-11 13:30:30 -05:00
<%= link nav_link_opts(@conn, to: Routes.user_session_path(@conn, :new), class: "btn btn-outline-light d-block d-lg-none") do %>
<i class="bi bi-door-open me-1"></i> Log in
2021-03-10 11:44:33 -05:00
<% end %>
<% end %>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<%# nav LEFT items %>
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<%#= if @current_user do %>
<%# <li class="nav-item"> %>
<%#= link nav_link_opts(@conn, to: Routes.shift_template_index_path(@conn, :index), class: "nav-link") do %>
<%#= icon_div @conn, "bi-clock-history", [class: "icon baseline me-1"] %>
<%# Templates %>
<%# end %>
<%# </li> %>
<%# end %>
2021-03-05 22:35:17 -05:00
<%# normal navbar link example %>
<%# <li class="nav-item"> %>
<%#= link "Properties", nav_link_opts(@conn, to: Routes.property_index_path(@conn, :index), class: "nav-link") %>
<%# </li> %>
<%# ACTIVE page link example %>
<%# <li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">Home</a>
</li> %>
<%# DISABLED page link example %>
<%# <li class="nav-item">
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
</li> %>
2021-03-05 22:35:17 -05:00
<%# normal dropdown menu example %>
<%# <li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownExample" data-bs-toggle="dropdown" aria-expanded="false">Dropdown</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdownExample">
<li><a class="dropdown-item" href="#">Action</a></li>
<li><a class="dropdown-item" href="#">Another action</a></li>
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="#">Something else here</a></li>
</ul>
2021-03-05 22:35:17 -05:00
</li> %>
</ul>
<%# nav RIGHT items %>
<ul class="navbar-nav">
<%= if @current_user do %>
<%= render "navbar/_shifts_menu.html", assigns %>
<%= render "navbar/_user_menu.html", assigns %>
<% else %>
2021-03-11 13:30:30 -05:00
<%= link nav_link_opts(@conn, to: Routes.user_session_path(@conn, :new), class: "btn btn-outline-light d-none d-lg-block") do %>
<i class="bi bi-door-open me-1"></i> Log in
2021-03-11 13:30:30 -05:00
<% end %>
2021-03-11 13:30:30 -05:00
<% end %>
</ul>
</div>
</div>
</nav>