Initial commit

This commit is contained in:
2023-01-27 22:55:09 +11:00
commit 833f3ea8b2
130 changed files with 5637 additions and 0 deletions

15
app/views/posts/index.rb Normal file
View File

@@ -0,0 +1,15 @@
module Adamantium
module Views
module Posts
class Index < Adamantium::View
include Deps["repos.post_repo"]
expose :posts do
post_repo.post_listing.map do |post|
Decorators::Posts::Decorator.new(post)
end
end
end
end
end
end

13
app/views/posts/show.rb Normal file
View File

@@ -0,0 +1,13 @@
module Adamantium
module Views
module Posts
class Show < Adamantium::View
include Deps["repos.post_repo"]
expose :post do |slug:|
Decorators::Posts::Decorator.new(post_repo.fetch!(slug))
end
end
end
end
end