Add “more” page

This commit is contained in:
2023-04-25 20:45:16 +10:00
parent 7155d19d84
commit ad3f557dc2
14 changed files with 140 additions and 7 deletions

8
app/views/more/index.rb Normal file
View File

@@ -0,0 +1,8 @@
module Adamantium
module Views
module More
class Index < View
end
end
end
end

View File

@@ -0,0 +1,21 @@
module Adamantium
module Views
module Posts
class Archive < View
include Deps["repos.post_repo"]
expose :year do |year:|
year
end
expose :posts do |year:|
post_repo.by_year(year: year).map { |post| Decorators::Posts::Decorator.new(post) }
end
expose :post_years do
post_repo.post_years.map { |py| py[:year].to_i }
end
end
end
end
end

View File

@@ -9,6 +9,10 @@ module Adamantium
Decorators::Posts::Decorator.new(post)
end
end
expose :post_years do
post_repo.post_years.map { |py| py[:year].to_i }
end
end
end
end