website/lib/pages/projects_page.ex

28 lines
712 B
Elixir
Raw Normal View History

defmodule Website.ProjectsPage do
use Tableau.Page,
2024-11-18 17:10:08 +02:00
layout: Website.ProjectsLayout,
permalink: "/projects",
title: "Projects"
use Phoenix.Component
def template(assigns) do
~H"""
2024-11-18 17:10:08 +02:00
<%= for type <- @data["projects"] do %>
<div class="projects" :for={{status, projects} <- type}>
<h2><%= status %></h2>
<article class="project" :for={project <- projects}>
<h3><%= if project["link"] do %>
<a href={project["link"]} target="_blank"><%= project["name"] %></a>
<% else %>
<%= project["name"] %>
<% end %></h3>
<%= project["description"] %>
</article>
</div>
2024-11-18 17:10:08 +02:00
<% end %>
"""
end
end
2024-11-18 17:10:08 +02:00