From e7583ac9782b006139188ebe6a3c2d33b980bf33 Mon Sep 17 00:00:00 2001 From: Jake Zerrer Date: Tue, 12 Aug 2025 11:42:46 -0400 Subject: Flesh out page outline --- src/pages.clj | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 src/pages.clj (limited to 'src/pages.clj') diff --git a/src/pages.clj b/src/pages.clj new file mode 100644 index 0000000..4b9a617 --- /dev/null +++ b/src/pages.clj @@ -0,0 +1,56 @@ +(ns pages + (:require [borkdude.html :refer [html]])) + +(def home-uri "/") +(def books-2025-uri "/books-2025") + +(defn template [body] + (html + [:html + {:style {:font-family "monospace"}} + [:head + [:meta {:charset "UTF-8"}]] + [:body + [:<> body]]])) + +(defn home [] + (template + (html + [:<> + [:p "Hello."] + [:p "My name is Jake Zerrer. This is where I keep things online. Look around."] + [:ul + (map + (fn [[uri name]] + (html + [:li [:a {:href (str uri)} name]])) + [[books-2025-uri "2025 reading list"]])]]))) + +(defn page [body] + (template + (html + [:<> + [:p [:a {:href "/"} "< home"]] + body]))) + +(defn books-2025 + [] + (page + (html + [:<> + [:h1 "Incomplete 2025 reading list"] + [:ul + [:li "The Places in Between (Rory Stewart)"] + [:li "Either/Or: A Fragment of Life (Søren Kierkegaard)"] + [:li "The Philosophy of History (G. W. F. Hegel)"] + [:li "This Life: Secular Faith and Spiritual Freedom (Martin Hägglund)"] + [:li "Mating (Normal Rush)"]]]))) + +(defn pages [] + {home-uri home + books-2025-uri books-2025}) + +(comment + (require '[repl :refer [restart build]]) + (restart) + (build)) -- cgit v1.2.3