From 98426773b78f2d0fd57d538c6ec30072a2838459 Mon Sep 17 00:00:00 2001 From: Thelonius Kort Date: Tue, 31 Jan 2023 18:02:10 +0100 Subject: [PATCH] Add layout for public pages --- lib/outlook_web/components/layouts/public.html.heex | 13 +++++++++++++ lib/outlook_web/router.ex | 1 + 2 files changed, 14 insertions(+) create mode 100644 lib/outlook_web/components/layouts/public.html.heex diff --git a/lib/outlook_web/components/layouts/public.html.heex b/lib/outlook_web/components/layouts/public.html.heex new file mode 100644 index 0000000..bbd1d6c --- /dev/null +++ b/lib/outlook_web/components/layouts/public.html.heex @@ -0,0 +1,13 @@ +
+ + + +
+
+
+ <.flash kind={:info} title="Success!" flash={@flash} /> + <.flash kind={:error} title="Error!" flash={@flash} /> + <%= @inner_content %> +
+
diff --git a/lib/outlook_web/router.ex b/lib/outlook_web/router.ex index aaf2dd0..1ec95e1 100644 --- a/lib/outlook_web/router.ex +++ b/lib/outlook_web/router.ex @@ -15,6 +15,7 @@ defmodule OutlookWeb.Router do pipeline :public_root_layout do plug :put_root_layout, "proot.html" + plug :put_layout, {OutlookWeb.Layouts, :public} end pipeline :api do