website/lib/pages/home_page.ex

26 lines
567 B
Elixir

defmodule Website.HomePage do
use Tableau.Page,
layout: Website.PageLayout,
permalink: "/",
title: "Criminally Cute"
use Phoenix.Component
def template(assigns) do
~H"""
<p>Hello! Need to put stuff here...</p>
<section class="recent-posts">
<h2>Recent posts</h2>
<div :for={post <- @posts}>
<a href={post.permalink}>
<h3>
<time><%= post.date |> Calendar.strftime("%d.%b.%Y") %></time>
:: <%= post.title %>
</h3>
</a>
</div>
</section>
"""
end
end