Show bookmarks on post page

This commit is contained in:
2024-07-10 18:57:59 +10:00
parent 98e289744a
commit 87d8e5a1fa
5 changed files with 25 additions and 13 deletions

View File

@@ -24,6 +24,10 @@ module Main
movies.map { |p| Decorators::Movies::Decorator.new(p) }
end
expose :bookmarks_this_week do |post|
post_repo.bookmarks_for_week(date: post.published_at).map { |p| Decorators::Posts::Decorator.new(p) }
end
expose :text_posts do |past_posts|
past_posts.reject(&:photos?)
end
@@ -44,11 +48,11 @@ module Main
end
expose :replies do |post|
post.webmentions.select {|w| w[:type] == "reply" }
post.webmentions.select { |w| w[:type] == "reply" }
end
expose :likes do |post|
post.webmentions.select {|w| w[:type] == "like" }
post.webmentions.select { |w| w[:type] == "like" }
end
end
end