Add header

This commit is contained in:
Ondřej 2024-08-10 12:33:48 +02:00
parent 3097b0f997
commit 9d95c74aab

View file

@ -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>
""" """