24 lines
534 B
Elixir
24 lines
534 B
Elixir
defmodule Website.BlogPage do
|
|
use Tableau.Page,
|
|
layout: Website.PageLayout,
|
|
permalink: "/blog",
|
|
title: "Blog"
|
|
|
|
use Phoenix.Component
|
|
|
|
def template(assigns) do
|
|
~H"""
|
|
<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>
|
|
:: <%= post.title %>
|
|
</h3>
|
|
</a>
|
|
</article>
|
|
</section>
|
|
"""
|
|
end
|
|
end
|