mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-03-25 09:05:47 +00:00
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.
24 lines
553 B
Ruby
24 lines
553 B
Ruby
require "phlex"
|
|
require "pressa/views/year_posts_view"
|
|
|
|
module Pressa
|
|
module Views
|
|
class ArchiveView < Phlex::HTML
|
|
def initialize(posts_by_year:, site:)
|
|
@posts_by_year = posts_by_year
|
|
@site = site
|
|
end
|
|
|
|
def view_template
|
|
div(class: "container") do
|
|
h1 { "Archive" }
|
|
end
|
|
|
|
@posts_by_year.sorted_years.each do |year|
|
|
year_posts = @posts_by_year.by_year[year]
|
|
render Views::YearPostsView.new(year:, year_posts:, site: @site)
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|