From 79e32a55801fc53c8d60843c6676ca05cc899299 Mon Sep 17 00:00:00 2001 From: Tim Date: Mon, 5 May 2025 21:32:52 +0200 Subject: Initial commit --- src/chef/pages/admin.clj | 10 ++++++++++ src/chef/pages/home.clj | 10 ++++++++++ src/chef/pages/utils.clj | 8 ++++++++ 3 files changed, 28 insertions(+) create mode 100644 src/chef/pages/admin.clj create mode 100644 src/chef/pages/home.clj create mode 100644 src/chef/pages/utils.clj (limited to 'src/chef/pages') diff --git a/src/chef/pages/admin.clj b/src/chef/pages/admin.clj new file mode 100644 index 0000000..c06b475 --- /dev/null +++ b/src/chef/pages/admin.clj @@ -0,0 +1,10 @@ +(ns chef.pages.admin + (:require [chef.pages.utils :as cputils] + [hiccup2.core :as html] + [ring.util.response :as ruresp])) + +(defn handler [req] + (-> (cputils/gen-page "chef - Dashboard" [:i "Coming soon..."]) + html/html + str + ruresp/response)) diff --git a/src/chef/pages/home.clj b/src/chef/pages/home.clj new file mode 100644 index 0000000..725ba2b --- /dev/null +++ b/src/chef/pages/home.clj @@ -0,0 +1,10 @@ +(ns chef.pages.home + (:require [hiccup2.core :as html] + [ring.util.response :as ruresp] + [chef.pages.utils :as cputils])) + +(defn handler [req] + (-> (cputils/gen-page "chef" [:i "Coming soon..."]) + html/html + str + ruresp/response)) diff --git a/src/chef/pages/utils.clj b/src/chef/pages/utils.clj new file mode 100644 index 0000000..72d33fd --- /dev/null +++ b/src/chef/pages/utils.clj @@ -0,0 +1,8 @@ +(ns chef.pages.utils) + +(defn gen-page [title & content] + [:html + [:head + [:meta {:name "viewport" :content "width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"}] + [:title title]] + (apply conj [:body] content [[:script {:src "/static/htmx.js"}]])]) -- cgit v1.2.3