diff --git a/lib/atomic_web/templates/layout/app.html.heex b/lib/atomic_web/templates/layout/app.html.heex index 169aed956..79aeb0d75 100644 --- a/lib/atomic_web/templates/layout/app.html.heex +++ b/lib/atomic_web/templates/layout/app.html.heex @@ -1,5 +1,37 @@ -
- - +
+ <%= if get_flash(@conn, :info) do %> +
+
+
+
+
+ +
+
+ <%= get_flash(@conn, :info) %> +
+
+
+
+
+ <% end %> + + <%= if get_flash(@conn, :error) do %> +
+
+
+
+
+ +
+
+ <%= get_flash(@conn, :error) %> +
+
+
+
+
+ <% end %> + <%= @inner_content %>
diff --git a/lib/atomic_web/templates/layout/live.html.heex b/lib/atomic_web/templates/layout/live.html.heex index cc12d940b..bf76b873d 100644 --- a/lib/atomic_web/templates/layout/live.html.heex +++ b/lib/atomic_web/templates/layout/live.html.heex @@ -1,4 +1,60 @@
+
+ <%= for {key, message} <- @flash do %> +
+
+
+
+
+ <%= case key do + "info" -> + ~H""" + + """ + + "success" -> + ~H""" + + """ + + "warning" -> + ~H""" + + """ + + "error" -> + ~H""" + + """ + end %> +
+
+ <%= if is_binary(message) do %> +

+ <%= live_flash(@flash, key) %> +

+ <% else %> +

+ <%= message.title %> +

+

+ <%= message.description %> +

+ <% end %> +
+
+ +
+
+
+
+
+ <% end %> +
+