update to 1.6

This commit is contained in:
2022-01-22 13:01:36 -05:00
committed by oliviasculley
parent 3dc255b7c2
commit a2dea04668
37 changed files with 610 additions and 770 deletions

View File

@ -1,19 +1,19 @@
<main role="main" class="container min-h-full min-w-full">
<main class="container min-h-full min-w-full">
<header class="mb-4 px-8 py-4 w-full bg-primary-400">
<%= render "topbar.html", assigns %>
<%= if get_flash(@conn, :info) do %>
<p class="alert alert-info" role="alert">
<%= get_flash(@conn, :info) %>
</p>
<% end %>
<%= if get_flash(@conn, :error) do %>
<p class="alert alert-danger" role="alert">
<%= get_flash(@conn, :error) %>
</p>
<% end %>
</header>
<%= @inner_content %>
</main>

View File

@ -0,0 +1,19 @@
<main class="container">
<LokalWeb.Component.Topbar.topbar
current_user={assigns[:current_user]}>
</LokalWeb.Component.Topbar.topbar>
<%= if @flash && @flash |> Map.has_key?(:info) do %>
<p class="alert alert-info" role="alert"
phx-click="lv:clear-flash"
phx-value-key="info"><%= live_flash(@flash, :info) %></p>
<% end %>
<%= if @flash && @flash |> Map.has_key?(:error) do %>
<p class="alert alert-danger" role="alert"
phx-click="lv:clear-flash"
phx-value-key="error"><%= live_flash(@flash, :error) %></p>
<% end %>
<%= @inner_content %>
</main>

View File

@ -1,5 +0,0 @@
<main role="main" class="container min-w-full min-h-full">
<%= live_component LokalWeb.Live.Component.Topbar, current_user: assigns[:current_user] %>
<%= @inner_content %>
</main>

View File

@ -6,8 +6,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<%= csrf_meta_tag() %>
<%= live_title_tag assigns[:page_title] || "Lokal", suffix: "" %>
<link phx-track-static rel="stylesheet" href="<%= Routes.static_path(@conn, "/css/app.css") %>"/>
<script defer phx-track-static type="text/javascript" src="<%= Routes.static_path(@conn, "/js/app.js") %>"></script>
<link phx-track-static rel="stylesheet" href={Routes.static_path(@conn, "/css/app.css")}/>
<script defer phx-track-static type="text/javascript" src={Routes.static_path(@conn, "/js/app.js")}></script>
</head>
<body class="m-0 p-0 min-w-full min-h-full">
<%= @inner_content %>

View File

@ -1,15 +1,16 @@
<nav role="navigation">
<div class="flex flex-row justify-between items-center space-x-4">
<%= link to: Routes.page_path(LokalWeb.Endpoint, :index) do %>
<%= link to: Routes.live_path(LokalWeb.Endpoint, PageLive) do %>
<h1 class="leading-5 text-xl text-white hover:underline">Lokal</h1>
<% end %>
<ul class="flex flex-row flex-wrap justify-center items-center
space-x-4 text-lg text-white">
<%# user settings %>
<%= if assigns |> Map.has_key?(:current_user) && @current_user do %>
<li>
<%= @current_user.email %></li>
<%= @current_user.email %>
</li>
<li>
<%= link "Settings", class: "hover:underline",
to: Routes.user_settings_path(LokalWeb.Endpoint, :edit) %>
@ -37,4 +38,4 @@
<% end %>
</ul>
</div>
</nav>
</nav>