Skip to content

Commit

Permalink
Merge pull request #3 from Nerajno/2024/25_Refactoring
Browse files Browse the repository at this point in the history
Update _header.html.erb
  • Loading branch information
Nerajno authored Dec 29, 2024
2 parents af869ca + b89ada2 commit 730eb05
Showing 1 changed file with 19 additions and 21 deletions.
40 changes: 19 additions & 21 deletions app/views/home/_header.html.erb
Original file line number Diff line number Diff line change
@@ -1,35 +1,33 @@
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<%= link_to 'Trapper Keepr', root_path, class:"navbar-brand" %>
<div class="container-fluid justify-content-end">
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
<div class="container-fluid">
<%= link_to 'Trapper Keepr', root_path, class:"navbar-brand" %>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse nav-items navbar-collapse justify-content-end" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav ms-auto mb-2 mb-lg-0">
<li class="nav-item">
<%= link_to "About Us", home_about_path, class:"nav-link"%>
<%= link_to "About Us", home_about_path, class:"nav-link"%>
</li>
<% if user_signed_in? %>
<li class="nav-item">
<%= link_to "Add Friend", new_friend_path, class:"nav-link"%>
</li>
<%= link_to "Add Friend", new_friend_path, class:"nav-link"%>
</li>
<li class="nav-item">
<%= link_to "Sign Out", destroy_user_session_path, method: :delete, class:"nav-link"%>
</li>
</li>
<%= link_to "Sign Out", destroy_user_session_path, method: :delete, class:"nav-link"%>
</li>
<li class="nav-item">
<%= link_to "Edit Profile", edit_user_registration_path, class:"nav-link"%>
</li>
<%else%>
<%= link_to "Edit Profile", edit_user_registration_path, class:"nav-link"%>
</li>
<% else %>
<li class="nav-item">
<%= link_to "Sign Up", new_user_registration_path, class:"nav-link"%>
</li>
<li class="nav-item">
<%= link_to "Sign In", new_user_session_path, class:"nav-link"%>
</li>
<%end%>
<%= link_to "Sign Up", new_user_registration_path, class:"nav-link"%>
</li>
<li class="nav-item">
<%= link_to "Sign In", new_user_session_path, class:"nav-link"%>
</li>
<% end %>
</ul>

</div>
</div>
</nav>

0 comments on commit 730eb05

Please sign in to comment.