Add a layout for the public pages

This commit is contained in:
Thelonius Kort
2023-01-19 22:16:18 +01:00
parent c0fe63588c
commit 8d1c08bfb4
2 changed files with 22 additions and 1 deletions

View File

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="csrf-token" content={get_csrf_token()} />
<.live_title suffix=" · Ausblick">
<%= assigns[:page_title] %>
</.live_title>
<link phx-track-static rel="stylesheet" href={~p"/assets/app.css"} />
<script defer phx-track-static type="text/javascript" src={~p"/assets/app.js"}>
</script>
</head>
<body class="bg-white antialiased max-h-screen">
<%= @inner_content %>
</body>
</html>

View File

@ -13,6 +13,10 @@ defmodule OutlookWeb.Router do
plug :fetch_current_user plug :fetch_current_user
end end
pipeline :public_root_layout do
plug :put_root_layout, "proot.html"
end
pipeline :api do pipeline :api do
plug :accepts, ["json"] plug :accepts, ["json"]
end end
@ -101,7 +105,7 @@ defmodule OutlookWeb.Router do
end end
scope "/", OutlookWeb do scope "/", OutlookWeb do
pipe_through [:browser] pipe_through [:browser, :public_root_layout]
delete "/users/log_out", UserSessionController, :delete delete "/users/log_out", UserSessionController, :delete