samhuri.net/lib/pressa/views/projects_view.rb
Sami Samhuri 007b1058b6
Migrate from Swift to Ruby (#33)
Replace the Swift site generator with a Ruby and Phlex implementation.
Loads site and projects from TOML, derive site metadata from posts.

Migrate from make to bake and add standardrb and code coverage tasks.

Update CI and docs to match the new workflow, and remove unused
assets/dependencies plus obsolete tooling.
2026-02-07 21:19:03 -08:00

34 lines
756 B
Ruby

require "phlex"
require "pressa/views/icons"
module Pressa
module Views
class ProjectsView < Phlex::HTML
def initialize(projects:, site:)
@projects = projects
@site = site
end
def view_template
article(class: "container") do
h1 { "Projects" }
@projects.each do |project|
div(class: "project-listing") do
h4 do
a(href: @site.url_for(project.path)) { project.title }
end
p(class: "description") { project.description }
end
end
end
div(class: "row clearfix") do
p(class: "fin") do
raw(safe(Icons.code))
end
end
end
end
end
end