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>
"""

View File

@@ -1,4 +1,4 @@
defmodule Mix.Tasks.Llmex.Gen.Post do
defmodule Mix.Tasks.MonoTab.Gen.Post do
use Mix.Task
@shortdoc "Generate a new post"
@@ -30,7 +30,7 @@ defmodule Mix.Tasks.Llmex.Gen.Post do
front_matter = """
---
layout: Llmex.PostLayout
layout: MonoTab.PostLayout
title: \"#{post_title}\"
date: #{post_date} #{post_time}
permalink: /:title/
@@ -42,4 +42,3 @@ defmodule Mix.Tasks.Llmex.Gen.Post do
Mix.shell().info("Succesfully created #{file_path}!")
end
end

View File

@@ -1,7 +1,8 @@
defmodule Llmex.Pages.About do
defmodule MonoTab.Pages.About do
use Tableau.Page,
layout: Llmex.PageLayout,
layout: MonoTab.PageLayout,
permalink: "/about"
use Phoenix.Component
def template(assigns) do
@@ -9,8 +10,7 @@ defmodule Llmex.Pages.About do
<section>
<h2>About</h2>
<p>
Welcome to Llmex Blog, a demonstration of building static sites with Elixir's Tableau generator.
This blog showcases the power and elegance of functional programming applied to web development.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi velit felis, fermentum id dolor luctus, pellentesque aliquam dui. In hac habitasse platea dictumst. Cras non erat sed risus aliquet molestie eu eget massa.
</p>
</section>
@@ -18,17 +18,21 @@ defmodule Llmex.Pages.About do
<h2>Technology Stack</h2>
<p>This blog is built using:</p>
<ul>
<li><a href="https://github.com/elixir-tools/tableau" target="_blank">Tableau</a> - Static site generator for Elixir</li>
<li><a href="https://github.com/artalar/mono" target="_blank">Mono</a> - A brutalist CSS framework for clean, semantic styling</li>
<li>
<a href="https://github.com/elixir-tools/tableau" target="_blank">Tableau</a>
- Static site generator for Elixir
</li>
<li>
<a href="https://github.com/artalar/mono" target="_blank">Mono</a>
- A brutalist CSS framework for clean, semantic styling
</li>
</ul>
</section>
<section>
<h2>Our Philosophy</h2>
<p>
We believe in the power of functional programming to create maintainable,
scalable, and elegant solutions. Through this blog, we aim to share insights,
tutorials, and experiences from the world of Elixir and functional web development.
Proin nec sem vitae neque vehicula sagittis. Curabitur placerat, magna vel sodales rutrum, turpis massa cursus justo, quis faucibus nisl ante non est. Quisque eget dui venenatis, luctus ligula eget, malesuada nisl.
</p>
</section>

View File

@@ -1,16 +1,16 @@
defmodule Llmex.Pages.Index do
defmodule MonoTab.Pages.Index do
use Tableau.Page,
layout: Llmex.RootLayout,
layout: MonoTab.RootLayout,
permalink: "/"
use Phoenix.Component
def template(assigns) do
~H"""
<section>
<h2>Welcome to Llmex Blog</h2>
<h2>Welcome</h2>
<p>
A simple blog built with Elixir, Phoenix LiveView, and Tableau static site generator.
Explore our latest posts and insights on functional programming, web development, and more.
</p>
</section>
"""

View File

@@ -1,7 +1,8 @@
defmodule Llmex.Pages.Posts do
defmodule MonoTab.Pages.Posts do
use Tableau.Page,
layout: Llmex.IndexLayout,
layout: MonoTab.IndexLayout,
permalink: "/posts"
use Phoenix.Component
def template(assigns) do