This commit is contained in:
46
src/net/deertopia/doerg/html.clj
Normal file
46
src/net/deertopia/doerg/html.clj
Normal file
@@ -0,0 +1,46 @@
|
||||
(ns net.deertopia.doerg.html
|
||||
"Common HTML elements and utilities"
|
||||
(:require [clojure.java.io :as io]
|
||||
[babashka.fs :as fs]))
|
||||
|
||||
#_
|
||||
(def navbar
|
||||
"Hiccup element for Deertopia.net's navbar."
|
||||
[:nav.navbar
|
||||
[:ol.navbar-list
|
||||
[:li
|
||||
[:a.home-link {:href "/"}
|
||||
"🦌 deertopia.net"]]
|
||||
[:li
|
||||
[:a.home-link {:href "/graph"}
|
||||
"graph"]]
|
||||
#_
|
||||
[:li
|
||||
[:a.home-link {:onclick "alert('unimplemented }:(')"}
|
||||
"search"]]]])
|
||||
|
||||
(def viewport
|
||||
[:meta {:name "viewport"
|
||||
:content "width=device-width, initial-scale=1.0"}])
|
||||
|
||||
(def charset
|
||||
[:meta {:charset "utf-8"}])
|
||||
|
||||
(defn external-stylesheet [href]
|
||||
[:link {:rel "stylesheet" :type "text/css" :href (str "/resource/" href)}])
|
||||
|
||||
(def ibm-plex
|
||||
(concat
|
||||
(for [family ["serif" "sans-kr" "math"]]
|
||||
(external-stylesheet
|
||||
(format "ibm-plex-web/css/ibm-plex-%s-all.min.css" family)))
|
||||
[(external-stylesheet "Temml-Plex.css")]))
|
||||
|
||||
(def deerstar
|
||||
(external-stylesheet "deerstar.css"))
|
||||
|
||||
(def tuftesque
|
||||
(external-stylesheet "tuftesque.css"))
|
||||
|
||||
(def head
|
||||
(list viewport charset ibm-plex deerstar tuftesque))
|
||||
Reference in New Issue
Block a user