2024-11-08 18:33:02 +02:00
|
|
|
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>
|
2024-11-08 18:33:02 +02:00
|
|
|
<section>
|
|
|
|
<article :for={post <- @posts} class="mt-8">
|
2024-11-08 19:01:09 +02:00
|
|
|
<a href={post.permalink}>
|
2024-11-08 18:33:02 +02:00
|
|
|
<h3>
|
|
|
|
<time><%= post.date |> Calendar.strftime("%d.%b.%Y") %></time>
|
2024-11-18 17:10:08 +02:00
|
|
|
:: <%= post.title %>
|
2024-11-08 18:33:02 +02:00
|
|
|
</h3>
|
|
|
|
</a>
|
|
|
|
</article>
|
|
|
|
</section>
|
|
|
|
"""
|
|
|
|
end
|
|
|
|
end
|