Skip to content

Commit

Permalink
refactored some code due to rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
Oluwabukolab committed Dec 1, 2023
1 parent 5e24486 commit d22a910
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ocamlorg_frontend/components/book.eml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ let render
(book : Data.Book.t) =
<div class="flex flex-col gap-y-4">
<div class="relative w-64 sm:w-72 lg:w-64 max-w-full space-y-5">
<%s! if book.pricing = "free" then Learn_components.pricing_tag else "" %>
<%s! Learn_components.book_cover ~free:(book.pricing = "free") book.cover %>

<img src="<%s Ocamlorg_static.Media.url book.cover %>"
class="w-full border z-10"
alt="">
<%s! Learn_components.skill_tag book.difficulty "w-full" %>
<%s! Learn_components.skill_tag (match book.difficulty with | Data.Book.Beginner -> Beginner | Intermediate -> Intermediate | Advanced -> Advanced) %>
</div>
</div>

0 comments on commit d22a910

Please sign in to comment.