fixing navbar to be on par with shift73k work

This commit is contained in:
Adam Piontek 2021-03-26 19:14:14 -04:00
parent 2e61ee0031
commit 60d89610ce
3 changed files with 28 additions and 21 deletions

View file

@ -3,16 +3,23 @@
<h1 class="fs-4 my-0 py-0 lh-base">
<%= link to: Routes.page_path(@conn, :index), class: "navbar-brand fs-4" do %>
<%= icon_div @conn, "mdi-skull-crossbones", [class: "icon baseline fs-3"] %>
<%= icon_div @conn, "mdi-skull-crossbones", [class: "icon baseline me-1"] %>
<span class="fw-light">Bones73k</span>
<% end %>
</h1>
<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>
<%= 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 %>
<%= link nav_link_opts(@conn, to: Routes.user_session_path(@conn, :new), class: "btn btn-outline-dark d-block d-lg-none") do %>
<%= icon_div @conn, "bi-door-open", [class: "icon baseline"] %>
Log in
<% end %>
<% end %>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
@ -48,7 +55,18 @@
<%# nav RIGHT items %>
<ul class="navbar-nav">
<%= render "navbar/_user_menu.html", assigns %>
<%= if @current_user do %>
<%= render "navbar/_user_menu.html", assigns %>
<% else %>
<%= link nav_link_opts(@conn, to: Routes.user_session_path(@conn, :new), class: "btn btn-outline-dark d-none d-lg-block") do %>
<%= icon_div @conn, "bi-door-open", [class: "icon baseline"] %>
Log in
<% end %>
<% end %>
</ul>

View file

@ -1,12 +1,3 @@
<%= if !@current_user do %>
<%= link nav_link_opts(@conn, to: Routes.user_session_path(@conn, :new), class: "btn btn-outline-light") do %>
<%= icon_div @conn, "bi-door-open", [class: "icon baseline"] %>
Log in
<% end %>
<% else %>
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" id="navbarDropdownUserMenu" data-bs-toggle="dropdown" aria-expanded="false">
@ -43,5 +34,3 @@
</ul>
</li>
<% end %>

View file

@ -22,7 +22,7 @@ alias Bones73k.Properties.Property
{:ok, admin} =
Accounts.register_user(%{
email: "admin@company.com",
password: "123456789abc",
password: "123456789abC",
password_confirmation: "123456789abc",
role: Accounts.registration_role()
})
@ -30,7 +30,7 @@ alias Bones73k.Properties.Property
{:ok, user_1} =
Accounts.register_user(%{
email: "user1@company.com",
password: "123456789abc",
password: "123456789abC",
password_confirmation: "123456789abc",
role: Accounts.registration_role()
})
@ -38,7 +38,7 @@ alias Bones73k.Properties.Property
{:ok, user_2} =
Accounts.register_user(%{
email: "user2@company.com",
password: "123456789abc",
password: "123456789abC",
password_confirmation: "123456789abc",
role: Accounts.registration_role()
})