summaryrefslogtreecommitdiff
path: root/src/chef/pages/home.clj
diff options
context:
space:
mode:
authorTim <contact@bytim.eu>2025-05-11 12:12:50 +0200
committerTim <contact@bytim.eu>2025-05-11 12:12:50 +0200
commit06ecbc8c6d52f3e832683e68a52461c5f7c6cb84 (patch)
tree25f4a4f6881549ca1d6fdd1da0a4b8ff2965e9e0 /src/chef/pages/home.clj
parent77594fd2b62e4ea3e6a55fed2dabcce50e618bd3 (diff)
downloadchef-06ecbc8c6d52f3e832683e68a52461c5f7c6cb84.tar.xz
chef-06ecbc8c6d52f3e832683e68a52461c5f7c6cb84.zip
Add basic home page; TODO: use real data for home page
Diffstat (limited to 'src/chef/pages/home.clj')
-rw-r--r--src/chef/pages/home.clj28
1 files changed, 25 insertions, 3 deletions
diff --git a/src/chef/pages/home.clj b/src/chef/pages/home.clj
index 84f643f..210fbed 100644
--- a/src/chef/pages/home.clj
+++ b/src/chef/pages/home.clj
@@ -1,12 +1,34 @@
(ns chef.pages.home
(:require [hiccup2.core :as html]
[ring.util.response :as ruresp]
- [chef.utils :as cutils]
- [ring.middleware.session :as rmsession]))
+ [chef.utils :as cutils]))
+
+(defn render []
+ (cutils/gen-page "chef"
+ [:div {:style {:text-align :center}}
+ [:h1 "chef"]
+ [:h2 "Finde das perfekte Gericht für dich!"]
+ [:b "Welchen Gang suchst du?"]
+ ;; TODO: Dummy data; replace with data from db
+ [:div
+ [:button {:style {:margin-bottom "1em"}} "Vorspeise"]
+ [:br]
+ [:button {:style {:margin-bottom "1em"}} "Hauptgang"]
+ [:br]
+ [:button {:style {:margin-bottom "1em"}} "Nachtisch"]
+ [:br]]
+ [:input {:type :text
+ :style {:width "90%" :margin :auto}
+ :placeholder "Suche"
+ :hx-get "/components/search"
+ :name "query"
+ :hx-swap "innerHTML"
+ :hx-target "#search-results"}]
+ [:div {:id "search-results"}]]))
(defn handler [req]
(let [access-token (get-in req [:oauth2/access-tokens :auth])
- resp (-> (cutils/gen-page "chef" [:i "Coming soon..."])
+ resp (-> (render)
html/html
str
ruresp/response)]