diff --git a/deps.edn b/deps.edn index 9629c5a..338e83f 100644 --- a/deps.edn +++ b/deps.edn @@ -5,6 +5,7 @@ compojure/compojure {:mvn/version "1.7.1"} ring-logger/ring-logger {:mvn/version "1.1.1"} org.slf4j/slf4j-api {:mvn/version "2.0.17"} + hiccup/hiccup {:mvn/version "2.0.0"} org.slf4j/slf4j-simple {:mvn/version "2.0.17"}} :paths [:clj-paths :resource-paths] :aliases diff --git a/resources/public/index.html b/resources/public/index.html deleted file mode 100644 index 9db9868..0000000 --- a/resources/public/index.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - Ajet Dashboard - - - - -

Public Services:

- - -

Personal Quicklist:

- - - diff --git a/src/ajet/www/core.clj b/src/ajet/www/core.clj index 1198d28..f3c658b 100644 --- a/src/ajet/www/core.clj +++ b/src/ajet/www/core.clj @@ -5,11 +5,37 @@ [ring.middleware.content-type :refer [wrap-content-type]] [ring.middleware.not-modified :refer [wrap-not-modified]] [ring.middleware.resource :refer [wrap-resource]] - [ring.util.response :refer [resource-response]]) + [hiccup2.core :as h]) (:gen-class)) +(def index + (str (h/html [:title "Ajet Dashboard"] + [:link {:rel "stylesheet", :href "/css/style.css"}] + [:link + {:rel "icon", + :type "image/x-icon", + :href + "https://data-star.dev/cdn-cgi/image/format=auto/static/images/rocket-48x48-4c739bfaffe86a6ffcc3a6d77e3c5547730f03d74c11aa460209596d1811f7a3.png"}] + [:h2 "Public Services:"] + [:ul + [:li [:a {:href "https://git.ajet.fyi/"} "git"]] + [:li [:a {:href "https://status.ajet.fyi/"} "status"]]] + [:h2 "Personal Quicklist:"] + [:ul + [:li [:a {:href "https://devbox.ajet.fyi"} "devbox"]] + [:li + [:a + {:href "https://git.ajet.fyi/ajet-industries"} + "Ajet Industries"]] + [:li [:a {:href "https://git.ajet.fyi/explore/repos"} "repos"]] + [:li [:a {:href "https://ebooks.ajet.fyi"} "ebooks"]] + [:li [:a {:href "https://uptime.ajet.fyi"} "uptime"]] + [:li [:a {:href "https://service-manager.ajet.fyi"} "ci"]] + [:li [:a {:href "https://mini:8006"} "cluster"]] + [:li [:a {:href "http://192.168.1.124:8081"} "mp4"]]]))) + (defroutes approutes - (GET "/" [] (resource-response "public/index.html"))) + (GET "/" [] index)) (def app (-> #'approutes