website/lib/pages/blog_page.ex

25 lines
534 B
Elixir
Raw Permalink Normal View History

defmodule Website.BlogPage do
use Tableau.Page,
layout: Website.PageLayout,
permalink: "/blog",
title: "Blog"
use Phoenix.Component
def template(assigns) do
~H"""
2024-11-18 17:10:08 +02:00
<h2>Blog posts</h2>
<section>
<article :for={post <- @posts} class="mt-8">
<a href={post.permalink}>
<h3>
<time><%= post.date |> Calendar.strftime("%d.%b.%Y") %></time>
2024-11-18 17:10:08 +02:00
:: <%= post.title %>
</h3>
</a>
</article>
</section>
"""
end
end