use babashka
This commit is contained in:
parent
81eea93929
commit
19bfebecb9
4 changed files with 79 additions and 0 deletions
10
bb.edn
Normal file
10
bb.edn
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{:paths ["bb"]
|
||||||
|
:deps {hiccup/hiccup {:mvn/version "1.0.5"}}
|
||||||
|
:min-bb-version "0.4.0"
|
||||||
|
:tasks
|
||||||
|
{:requires ([babashka.fs :as fs])
|
||||||
|
tst (prn "TST")
|
||||||
|
clean (do (fs/delete-tree "_build")
|
||||||
|
(fs/delete "brut.min.css")
|
||||||
|
(fs/delete "brut-nocolors.min.css"))
|
||||||
|
build (do (shell "./build.sh"))}}
|
61
bb/brut/main.clj
Normal file
61
bb/brut/main.clj
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
(ns brut.main
|
||||||
|
(:require [hiccup.core :as h]))
|
||||||
|
|
||||||
|
(defn nav []
|
||||||
|
[:div
|
||||||
|
[:nav.nav {:tabindex "-1" :onclick "this.focus()"}
|
||||||
|
[:div.container
|
||||||
|
[:a.pagename {:href "index.html"} "BRUT"]
|
||||||
|
[:a {:href "h/docs.html"} "Docs"]
|
||||||
|
[:a {:href "h/download.html"} "Download"]
|
||||||
|
[:a {:href "https://gitea.esy.fun/yogsototh/brutcss"} "Code"]]]
|
||||||
|
[:button.btn.sn.btn-close "×"]])
|
||||||
|
|
||||||
|
(defn footer []
|
||||||
|
[:div.row
|
||||||
|
[:div.block
|
||||||
|
[:span "By"
|
||||||
|
[:a {:href "https://yannesposito.com"}
|
||||||
|
"Yann Esposito"]]]])
|
||||||
|
|
||||||
|
(defn index []
|
||||||
|
(h/html
|
||||||
|
[:head
|
||||||
|
[:meta {:http-equiv "Content-Type" :content "text/html; charset=UTF-8"}]
|
||||||
|
[:meta {:name "viewport" :content "width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no"}]
|
||||||
|
[:title "BRUT"]
|
||||||
|
[:link {:href "brut.min.css" :rel "stylesheet" :type "text/css"}]]
|
||||||
|
[:body
|
||||||
|
(nav)
|
||||||
|
[:div.container
|
||||||
|
[:div.hero.bg-neutral
|
||||||
|
[:div.row
|
||||||
|
[:div.col.c3 [:img {:src "h/img/brutalism.webp" :alt "brutalism"}]]
|
||||||
|
[:div.col.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.")]]
|
||||||
|
[:div.col.c3 [:img {:src "h/img/brutalism.webp" :alt "brutalism"}]]]]
|
||||||
|
[:div.row
|
||||||
|
[:div.col.c4
|
||||||
|
[:div.card
|
||||||
|
[:h3 "Docs"]
|
||||||
|
[:div.block
|
||||||
|
[:p "Docs"]]
|
||||||
|
[:a.btn.err.big.push {:href "h/docs.html"}
|
||||||
|
"Docs"]]]
|
||||||
|
[:div.col.c4
|
||||||
|
[:div.card
|
||||||
|
[:h3 "Download"]
|
||||||
|
[:div.block
|
||||||
|
[:p "Download BRUT"]]
|
||||||
|
[:a.btn.err.big.push {:href "h/download.html"}
|
||||||
|
"Download"]]
|
||||||
|
|
||||||
|
]]
|
||||||
|
(footer)]]))
|
||||||
|
|
||||||
|
(defn -main [& _args]
|
||||||
|
(spit "gen-index.html" (index)))
|
7
gen.sh
Executable file
7
gen.sh
Executable file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/usr/bin/env bb
|
||||||
|
|
||||||
|
(require '[])
|
||||||
|
|
||||||
|
(defn build-css
|
||||||
|
[]
|
||||||
|
)
|
|
@ -4,6 +4,7 @@ mkShell {
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
lessc
|
lessc
|
||||||
minify
|
minify
|
||||||
|
babashka
|
||||||
];
|
];
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
echo "shell with lessc and minify"
|
echo "shell with lessc and minify"
|
||||||
|
|
Loading…
Reference in a new issue