diff --git a/src/main/blog/handlers.cljs b/src/main/blog/handlers.cljs index 246cee7..9c72a2e 100644 --- a/src/main/blog/handlers.cljs +++ b/src/main/blog/handlers.cljs @@ -24,6 +24,25 @@ (res/status 500) (res/send (ex-message err)))))))) +(defn about-page-handler-factory + [client] + (fn [req res] + (let [channel (chan) + session (.-user (.-session req))] + (go + (try + (let [about ( {:content content + :authorized (some? session) + :url "/about"} + (clj->js)))) + (catch js/Error err + (res/status 500) + (res/send (ex-message err)))))))) + (defn login-page-handler-factory [] (fn [req res] @@ -95,10 +114,12 @@ (try (let [articles (if (nil? search) ( {:articles articles + :about-content about-content :authorized (some? session) :url "/admin"} (clj->js)))) @@ -237,6 +258,20 @@ (res/status 500) (res/send (ex-message err)))))))) +(defn htmx-update-about-handler-factory + [client] + (fn [req res] + (let [channel (chan) + content (.-content (.-body req))] + (go + (try + (let [id (
+
+
+ +
+ +
+ +
+
+
+ + +
+
+ +
+
+
+