@@ 0,0 1,5 @@
<%= if assigns[:route] do %>
<%= link @content, to: @route, class: "font-medium text-gray-500 hover:text-gray-900" %>
<% else %>
<a class="font-medium text-gray-500"><%= @content %></a>
<% end %>
\ No newline at end of file
@@ 1,10 1,8 @@
<ul>
<%= if @current_user do %>
<li><%= @current_user.email %></li>
<li><%= link "Settings", to: Routes.user_settings_path(@conn, :edit) %></li>
<li><%= link "Log out", to: Routes.user_session_path(@conn, :delete), method: :delete %></li>
<%= render "_menu_item.html", content: @current_user.email %>
<%= render "_menu_item.html", content: "Settings", route: Routes.user_settings_path(@conn, :edit) %>
<%= render "_menu_item.html", content: "Log out", route: Routes.user_session_path(@conn, :delete), method: :delete %>
<% else %>
<li><%= link "Register", to: Routes.user_registration_path(@conn, :new) %></li>
<li><%= link "Log in", to: Routes.user_session_path(@conn, :new) %></li>
<%= render "_menu_item.html", content: "Register", route: Routes.user_registration_path(@conn, :new) %>
<%= render "_menu_item.html", content: "Log in", route: Routes.user_session_path(@conn, :new) %>
<% end %>
</ul>
@@ 18,10 18,10 @@
<img class="h-8 w-auto sm:h-10" src={Routes.static_path(@conn, "/images/phoenix.png")} alt="Phoenix Framework Logo"/>
</a>
<div class="md:ml-10 md:pr-4 md:space-x-8">
- <a href="https://hexdocs.pm/phoenix/overview.html">Get Started</a>
- <%= link "LiveDashboard", to: Routes.live_dashboard_path(@conn, :home), class: "font-medium text-gray-500 hover:text-gray-900" %>
+ <%= render "_menu_item.html", content: "Get Started", route: "https://hexdocs.pm/phoenix/overview.html"%>
+ <%= render "_menu_item.html", content: "LiveDashboard", route: Routes.live_dashboard_path(@conn, :home)%>
+ <%= render "_user_menu.html", assigns %>
</div>
- <%= render "_user_menu.html", assigns %>
</nav>
</div>
</header>