style flashes

This commit is contained in:
shibao 2021-09-10 00:35:36 -04:00 committed by oliviasculley
parent 3eebba17c4
commit 3cdd7729a6
2 changed files with 20 additions and 2 deletions

View File

@ -1,7 +1,9 @@
<main role="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 %>
</header>
<div class="mx-8 my-2 flex flex-col space-y-4 text-center">
<%= if get_flash(@conn, :info) do %>
<p class="alert alert-info" role="alert">
<%= get_flash(@conn, :info) %>
@ -13,7 +15,7 @@
<%= get_flash(@conn, :error) %>
</p>
<% end %>
</header>
</div>
<%= @inner_content %>
</main>

View File

@ -1,5 +1,21 @@
<main role="main" class="container min-w-full min-h-full">
<%= live_component CanneryWeb.Live.Component.Topbar, current_user: assigns[:current_user] %>
<header>
<%= live_component CanneryWeb.Live.Component.Topbar, current_user: assigns[:current_user] %>
<div class="mx-8 my-2 flex flex-col space-y-4 text-center">
<%= if live_flash(@flash, :info) do %>
<p class="alert alert-info" role="alert">
<%= live_flash(@flash, :info) %>
</p>
<% end %>
<%= if live_flash(@flash, :error) do %>
<p class="alert alert-danger" role="alert">
<%= live_flash(@flash, :error) %>
</p>
<% end %>
</div>
</header>
<%= @inner_content %>
</main>