|
|
|
<header>
|
|
|
|
<nav class="navbar navbar-expand-lg navbar-light bg-primary">
|
|
|
|
<a class="navbar-brand" href="<%= root_path %>">
|
|
|
|
<%= image_tag("logo.png") %> The only movies that actually matter
|
|
|
|
</a>
|
|
|
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
|
|
|
<span class="navbar-toggler-icon"></span>
|
|
|
|
</button>
|
|
|
|
<div class="collapse navbar-collapse" id="navbarNav">
|
|
|
|
<ul class="navbar-nav mr-auto">
|
|
|
|
<li class="nav-item">
|
|
|
|
<%= link_to "All Movies", movies_path, class: "nav-link" %>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<ul class="navbar-nav">
|
|
|
|
<% if current_user %>
|
|
|
|
<li class="nav-item">
|
|
|
|
<%= link_to current_user.name, current_user %>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<%= link_to "Sign Out", session_path,
|
|
|
|
data: { turbo_method: :delete },
|
|
|
|
class: "button" %>
|
|
|
|
</li>
|
|
|
|
<% else %>
|
|
|
|
<li class="nav-item">
|
|
|
|
<%= link_to "Sign In", new_session_path, class: "nav-link" %>
|
|
|
|
</li>
|
|
|
|
<li class="nav-item">
|
|
|
|
<%= link_to "Sign Up", signup_path, class: "nav-link" %>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</nav>
|
|
|
|
</header>
|