Add header
This commit is contained in:
parent
3097b0f997
commit
9d95c74aab
1 changed files with 24 additions and 19 deletions
|
@ -7,7 +7,11 @@ defmodule ChoreTrackerWeb.Layouts do
|
||||||
def page_header(assigns) do
|
def page_header(assigns) do
|
||||||
~H"""
|
~H"""
|
||||||
<header class="border-b col-span-12">
|
<header class="border-b col-span-12">
|
||||||
<nav class="flex items-center gap-4 px-6 justify-end">
|
<nav class="flex items-center gap-4 px-6 justify-between">
|
||||||
|
<.link href={~p"/overview"}>
|
||||||
|
<strong>Chore tracker</strong>
|
||||||
|
</.link>
|
||||||
|
<div class="flex items-center gap-4">
|
||||||
<%= if @current_user do %>
|
<%= if @current_user do %>
|
||||||
<p class="text-sm font-medium mr-2">
|
<p class="text-sm font-medium mr-2">
|
||||||
<%= Accounts.display_user(@current_user) %>
|
<%= Accounts.display_user(@current_user) %>
|
||||||
|
@ -26,6 +30,7 @@ defmodule ChoreTrackerWeb.Layouts do
|
||||||
Log in
|
Log in
|
||||||
</.header_link>
|
</.header_link>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue