summaryrefslogtreecommitdiffstats
path: root/src/view/book.phel
blob: 802c46fc5c681d5135696368b870cc0e2e700303 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
(ns lezer.view.book
  (:require phel.html :refer [html doctype]))

(defn book-html [book]
  (html
   (doctype :html5)
   [:html
    [:head
     [:title (str "Book: " (:title book) " - Lezer")]]
    [:body
     [:h1 (:title book)]
     [:h2 "Authors"]
     [:ul
      (for [author :in (:authors book)]
        [:li (:name author)])]
     [:h2 "Sessions"]
     [:ul
      (for [session :in (:sessions book)]
        [:li
         (:status session)
         ": "
         (:started_at session)])]]]))