Add books page

This commit is contained in:
2023-06-26 21:07:29 +10:00
parent c92b74b238
commit 2e019c00f4
13 changed files with 179 additions and 2 deletions

View File

@@ -127,6 +127,15 @@ module Adamantium
.to_a
end
def books_listing(limit: nil)
posts
.where(post_type: "book")
.published
.order(Sequel.desc(:published_at))
.limit(limit)
.to_a
end
def bookmark_listing(query: nil)
base = posts
.where(post_type: "bookmark")