init commit
This commit is contained in:
10
lib/layouts/post_layout.ex
Normal file
10
lib/layouts/post_layout.ex
Normal file
@@ -0,0 +1,10 @@
|
||||
defmodule Llmex.PostLayout do
|
||||
use Tableau.Layout, layout: Llmex.RootLayout
|
||||
use Phoenix.Component
|
||||
|
||||
def template(assigns) do
|
||||
~H"""
|
||||
<%= {:safe, render(@inner_content)} %>
|
||||
"""
|
||||
end
|
||||
end
|
38
lib/layouts/root_layout.ex
Normal file
38
lib/layouts/root_layout.ex
Normal file
@@ -0,0 +1,38 @@
|
||||
defmodule Llmex.RootLayout do
|
||||
use Tableau.Layout
|
||||
use Phoenix.Component
|
||||
|
||||
def template(assigns) do
|
||||
~H"""
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http_equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>
|
||||
<%= [@page[:title], Llmex]
|
||||
|> Enum.filter(& &1)
|
||||
|> Enum.intersperse("|")
|
||||
|> Enum.join(" ") %>
|
||||
</title>
|
||||
|
||||
<link rel="stylesheet" href="/css/simple.css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<main>
|
||||
<%= render @inner_content %>
|
||||
</main>
|
||||
</body>
|
||||
|
||||
<%= if Mix.env() == :dev do %>
|
||||
<%= Phoenix.HTML.raw(Tableau.live_reload(assigns)) %>
|
||||
<% end %>
|
||||
</html>
|
||||
"""
|
||||
|> Phoenix.HTML.Safe.to_iodata()
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user