build docs
This commit is contained in:
parent
9230e92585
commit
ebf52c1398
1 changed files with 38 additions and 9 deletions
|
@ -1,7 +1,10 @@
|
|||
(ns brut.main
|
||||
(:require [hiccup.core :as h]
|
||||
[babashka.fs :as fs]
|
||||
))
|
||||
(:require [hiccup2.core :as h]
|
||||
[clojure.string :as string]
|
||||
[babashka.fs :as fs]))
|
||||
|
||||
(def brutalism-img
|
||||
"h/img/brutalism.webp")
|
||||
|
||||
(defn nav [rel-pref]
|
||||
(let [to (fn [path] (str rel-pref path))]
|
||||
|
@ -55,14 +58,14 @@
|
|||
(let [to (fn [path] (str rel-pref path))
|
||||
hero [:div.hero.bg-neutral
|
||||
[:div.row.middle
|
||||
[:img.c3.no-grow {:src (to "h/img/brutalism.webp") :alt "brutalism"}]
|
||||
[:img.c3.no-grow {:src (to brutalism-img) :alt "brutalism"}]
|
||||
[:div.col.block.c6
|
||||
[:h1.title "BRUT"]
|
||||
[:h4 "A Brutalist and Minimalist CSS Framework"]
|
||||
[:p (str "This CSS framework is ideal to be used for admin interface where you"
|
||||
"want to make it clear, this is not for any kind of end user but only"
|
||||
"advanced technical people.")]]
|
||||
[:img.c3.no-grow {:src (to "h/img/brutalism.webp") :alt "brutalism"}]
|
||||
[:img.c3.no-grow {:src (to brutalism-img) :alt "brutalism"}]
|
||||
]]
|
||||
cards [:div.row
|
||||
[:div.col.card
|
||||
|
@ -84,10 +87,32 @@
|
|||
(defn mk-download [rel-pref _metas]
|
||||
(let [to (fn [path] (str rel-pref path))]
|
||||
[:div.central.fill
|
||||
{:style (str "background:url('" (to "h/img/brutalism.webp") "')")}
|
||||
{:style (str "background:url('" (to brutalism-img) "')")}
|
||||
[:a.btn.warn.huge {:href (to "brut.min.css")}
|
||||
"Download BRUT"]])
|
||||
)
|
||||
"Download BRUT"]]))
|
||||
|
||||
(defn mk-docs [rel-pref _metas]
|
||||
(let [to (fn [path] (str rel-pref path))
|
||||
images [:div {:id "images"}
|
||||
[:h1 "Images"]
|
||||
[:h2 "Inside a grid"]
|
||||
[:div.row
|
||||
[:div.card
|
||||
[:p "Inside a card"]
|
||||
[:img {:src (to brutalism-img)}]]
|
||||
[:div
|
||||
[:p "Directly a card"]
|
||||
[:img {:src (to brutalism-img)}]]
|
||||
[:div.block
|
||||
[:p "In a block"]
|
||||
[:img {:src (to brutalism-img)}]]]]
|
||||
pre-img (h/html {:escape-strings? true}
|
||||
[:pre (-> (str (h/html images))
|
||||
(string/replace #"><" ">\n<")
|
||||
)])
|
||||
img-block (conj images pre-img)]
|
||||
[:div.container
|
||||
img-block]))
|
||||
|
||||
(defn -main [& _args]
|
||||
(gen-page "index.html"
|
||||
|
@ -97,4 +122,8 @@
|
|||
{:title "BRUT - download"
|
||||
:footer? false
|
||||
:gapless? true}
|
||||
mk-download))
|
||||
mk-download)
|
||||
(gen-page "h/g-docs.html"
|
||||
{:title "BRUT - documentation"}
|
||||
mk-docs)
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue