2024-11-08 18:33:02 +02:00
|
|
|
defmodule Website.ProjectsPage do
|
|
|
|
use Tableau.Page,
|
2024-11-18 17:10:08 +02:00
|
|
|
layout: Website.ProjectsLayout,
|
2024-11-08 18:33:02 +02:00
|
|
|
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>
|
2024-11-08 18:33:02 +02:00
|
|
|
</div>
|
2024-11-18 17:10:08 +02:00
|
|
|
<% end %>
|
2024-11-08 18:33:02 +02:00
|
|
|
"""
|
|
|
|
end
|
|
|
|
end
|
2024-11-18 17:10:08 +02:00
|
|
|
|