rename from llmex to monotab

This commit is contained in:
2025-07-26 13:27:35 -04:00
parent 8da394b2a0
commit c993c04cdb
18 changed files with 105 additions and 85 deletions

View File

@@ -1,25 +1,25 @@
defmodule Llmex.IndexLayout do
use Tableau.Layout, layout: Llmex.RootLayout
defmodule MonoTab.IndexLayout do
use Tableau.Layout, layout: MonoTab.RootLayout
use Phoenix.Component
def template(assigns) do
~H"""
<h1><%= @page[:title] || "Latest Posts" %></h1>
<h1>{@page[:title] || "Latest Posts"}</h1>
<%= if @page[:description] do %>
<p><%= @page[:description] %></p>
<p>{@page[:description]}</p>
<% end %>
<%= if assigns[:posts] && length(@posts) > 0 do %>
<ul>
<%= for post <- @posts do %>
<li>
<h2><a href={post.permalink}><%= post.title %></a></h2>
<h2><a href={post.permalink}>{post.title}</a></h2>
<%= if post[:date] do %>
<time datetime={post[:date]}><%= format_date(post[:date]) %></time>
<time datetime={post[:date]}>{format_date(post[:date])}</time>
<% end %>
<%= if post[:description] do %>
<p><%= post[:description] %></p>
<p>{post[:description]}</p>
<% end %>
</li>
<% end %>
@@ -28,7 +28,7 @@ defmodule Llmex.IndexLayout do
<p>No posts found.</p>
<% end %>
<%= {:safe, render(@inner_content)} %>
{{:safe, render(@inner_content)}}
"""
end

View File

@@ -1,10 +1,10 @@
defmodule Llmex.PageLayout do
use Tableau.Layout, layout: Llmex.RootLayout
defmodule MonoTab.PageLayout do
use Tableau.Layout, layout: MonoTab.RootLayout
use Phoenix.Component
def template(assigns) do
~H"""
<%= {:safe, render(@inner_content)} %>
{{:safe, render(@inner_content)}}
"""
end
end

View File

@@ -1,12 +1,12 @@
defmodule Llmex.PostLayout do
use Tableau.Layout, layout: Llmex.RootLayout
defmodule MonoTab.PostLayout do
use Tableau.Layout, layout: MonoTab.RootLayout
use Phoenix.Component
def template(assigns) do
~H"""
<%= {:safe, render(@inner_content)} %>
{{:safe, render(@inner_content)}}
<%= if @page[:date] do %>
<time datetime={@page[:date]}><%= format_date(@page[:date]) %></time>
<time datetime={@page[:date]}>{format_date(@page[:date])}</time>
<% end %>
"""
end

View File

@@ -1,11 +1,10 @@
defmodule Llmex.RootLayout do
defmodule MonoTab.RootLayout do
use Tableau.Layout
use Phoenix.Component
def template(assigns) do
~H"""
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
@@ -13,21 +12,24 @@ defmodule Llmex.RootLayout do
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>
<%= [@page[:title], "Llmex Blog"]
|> Enum.filter(& &1)
|> Enum.intersperse("|")
|> Enum.join(" ") %>
{[@page[:title], "MonoTab Blog"]
|> Enum.filter(& &1)
|> Enum.intersperse("|")
|> Enum.join(" ")}
</title>
<link rel="stylesheet" href="/css/mono.css" />
<link rel="stylesheet" href="/css/responsive.css" />
<meta name="description" content={@page[:description] || "A simple blog built with Elixir and Tableau"} />
<meta
name="description"
content={@page[:description] || "A simple blog built with Elixir and Tableau"}
/>
</head>
<body class="mono-all">
<aside>
<nav>
<h1><a href="/">Llmex Blog</a></h1>
<h1><a href="/">MonoTab Blog</a></h1>
<ul>
<li><a href="/">Home</a></li>
<li><a href="/posts">Posts</a></li>
@@ -37,16 +39,20 @@ defmodule Llmex.RootLayout do
</aside>
<main>
<%= render @inner_content %>
{render(@inner_content)}
<footer>
<p>&copy; <%= Date.utc_today().year %> Llmex Blog. Built with <a href="https://github.com/artalar/mono" target="_blank">Mono</a> and <a href="https://github.com/elixir-tools/tableau" target="_blank">Tableau</a></p>
<p>
&copy; {Date.utc_today().year} MonoTab Blog. Built with
<a href="https://github.com/artalar/mono" target="_blank">Mono</a>
and <a href="https://github.com/elixir-tools/tableau" target="_blank">Tableau</a>
</p>
</footer>
</main>
</body>
<%= if Mix.env() == :dev do %>
<%= Phoenix.HTML.raw(Tableau.live_reload(assigns)) %>
{Phoenix.HTML.raw(Tableau.live_reload(assigns))}
<% end %>
</html>
"""