Bookshelf

This commit is contained in:
2023-06-27 20:59:11 +10:00
parent c9e54bfc04
commit e248cb9146
14 changed files with 91 additions and 38 deletions

View File

@@ -21,6 +21,21 @@ module Adamantium
def template_type
:book
end
def authors
self.book_author.split(";").join(" ")
end
def status_colour
case book_status
when "read"
"text-green-100 bg-green-500"
when "to-read"
"text-blue-100 bg-blue-500"
when "reading"
"text-orange-100 bg-orange-500"
end
end
end
end
end