From 3cdd7729a64d8b89bfe128534b0fa7be9ad3523d Mon Sep 17 00:00:00 2001 From: shibao Date: Fri, 10 Sep 2021 00:35:36 -0400 Subject: [PATCH] style flashes --- lib/cannery_web/templates/layout/app.html.eex | 4 +++- .../templates/layout/live.html.leex | 18 +++++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/lib/cannery_web/templates/layout/app.html.eex b/lib/cannery_web/templates/layout/app.html.eex index 615ab8fb..69799212 100644 --- a/lib/cannery_web/templates/layout/app.html.eex +++ b/lib/cannery_web/templates/layout/app.html.eex @@ -1,7 +1,9 @@
<%= render "topbar.html", assigns %> +
+
<%= if get_flash(@conn, :info) do %> <% end %> - +
<%= @inner_content %>
diff --git a/lib/cannery_web/templates/layout/live.html.leex b/lib/cannery_web/templates/layout/live.html.leex index c886d893..efd084d7 100644 --- a/lib/cannery_web/templates/layout/live.html.leex +++ b/lib/cannery_web/templates/layout/live.html.leex @@ -1,5 +1,21 @@
- <%= live_component CanneryWeb.Live.Component.Topbar, current_user: assigns[:current_user] %> +
+ <%= live_component CanneryWeb.Live.Component.Topbar, current_user: assigns[:current_user] %> + +
+ <%= if live_flash(@flash, :info) do %> + + <% end %> + + <%= if live_flash(@flash, :error) do %> + + <% end %> +
+
<%= @inner_content %>