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
~H"""
<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 %>
<p class="text-sm font-medium mr-2">
<%= Accounts.display_user(@current_user) %>
@ -26,6 +30,7 @@ defmodule ChoreTrackerWeb.Layouts do
Log in
</.header_link>
<% end %>
</div>
</nav>
</header>
"""