diff options
| author | 2026-09-09 22:57:41 -0700 | |
|---|---|---|
| committer | 2026-09-09 22:57:41 -0700 | |
| commit | 3ee724eb0c4d681e81f6d915b88fa5985957b27a (patch) | |
| tree | 9acc75aceaadf2d1ead9f26bd184eeb9e69f5398 /src/view | |
| parent | f78b4b0eedbcff9994580bfddaead52301cca37f (diff) | |
| download | lezer-3ee724eb0c4d681e81f6d915b88fa5985957b27a.tar.gz lezer-3ee724eb0c4d681e81f6d915b88fa5985957b27a.zip | |
Add page for each book
Diffstat (limited to 'src/view')
| -rw-r--r-- | src/view/book.phel | 11 | ||||
| -rw-r--r-- | src/view/main.phel | 4 |
2 files changed, 14 insertions, 1 deletions
diff --git a/src/view/book.phel b/src/view/book.phel new file mode 100644 index 0000000..79341ad --- /dev/null +++ b/src/view/book.phel @@ -0,0 +1,11 @@ +(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)]]])) diff --git a/src/view/main.phel b/src/view/main.phel index e25a079..9301bbc 100644 --- a/src/view/main.phel +++ b/src/view/main.phel @@ -31,7 +31,9 @@ [:main [:ul (for [b :in books] - [:li (:title (:book b)) + [:li + [:a {:href (r/generate router :book {:id (:id (:book b))})} + (:title (:book b))] " by " (authors-list (:authors b) router) " " |
