about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorelioat <hi@eli.li>2023-12-09 09:58:25 -0500
committerelioat <hi@eli.li>2023-12-09 09:58:25 -0500
commit932739c7762ce061f5a003284003d6571ad2afdf (patch)
treeb9bf277e58eac58990df965f427454bee6971ff3
parent7c6fd4b424d5ec1701a5a42f4e305bb2e4492145 (diff)
downloaddecember-2023-932739c7762ce061f5a003284003d6571ad2afdf.tar.gz
*
-rw-r--r--bb/web/htmx.clj21
1 files changed, 19 insertions, 2 deletions
diff --git a/bb/web/htmx.clj b/bb/web/htmx.clj
index 3294e2d..c534dd1 100644
--- a/bb/web/htmx.clj
+++ b/bb/web/htmx.clj
@@ -15,16 +15,33 @@
    (h/html
     [:head
      [:meta {:charset "UTF-8"}]
-     [:title "Babashka"]]
+     [:title "Babashka go brrr"]]
     [:body
      [:section.main
       [:header.header
-       [:h1 "hullo, frodo!"]]]])))
+       [:h1 "Hullo, Frodo!"]]]])))
+
+(defn about []
+  (list
+   "<!DOCTYPE html>"
+   (h/html
+    [:head
+     [:meta {:charset "UTF-8"}]
+     [:title "Aboot"]]
+    [:body
+     [:section.main
+      [:header.header
+       [:h1 "Don't touch them Frodo!"]]]])))
 
 (def routes [{:path     "/"
               :method   :get
               :response {:body (index)
                          :status 200
+                         :headers {"Content-Type" "text/html; charset=utf-8"}}}
+             {:path     "/about"
+              :method   :get
+              :response {:body (about)
+                         :status 200
                          :headers {"Content-Type" "text/html; charset=utf-8"}}}])
 
 ;; Server