Add a layout for the public pages
This commit is contained in:
17
lib/outlook_web/components/layouts/proot.html.heex
Normal file
17
lib/outlook_web/components/layouts/proot.html.heex
Normal 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>
|
||||
@ -13,6 +13,10 @@ defmodule OutlookWeb.Router do
|
||||
plug :fetch_current_user
|
||||
end
|
||||
|
||||
pipeline :public_root_layout do
|
||||
plug :put_root_layout, "proot.html"
|
||||
end
|
||||
|
||||
pipeline :api do
|
||||
plug :accepts, ["json"]
|
||||
end
|
||||
@ -101,7 +105,7 @@ defmodule OutlookWeb.Router do
|
||||
end
|
||||
|
||||
scope "/", OutlookWeb do
|
||||
pipe_through [:browser]
|
||||
pipe_through [:browser, :public_root_layout]
|
||||
|
||||
delete "/users/log_out", UserSessionController, :delete
|
||||
|
||||
|
||||
Reference in New Issue
Block a user