From 19bfebecb962c8cb81d5340f2839979675878626 Mon Sep 17 00:00:00 2001 From: "Yann Esposito (Yogsototh)" Date: Mon, 3 Oct 2022 16:53:52 +0200 Subject: [PATCH] use babashka --- bb.edn | 10 ++++++++ bb/brut/main.clj | 61 ++++++++++++++++++++++++++++++++++++++++++++++++ gen.sh | 7 ++++++ shell.nix | 1 + 4 files changed, 79 insertions(+) create mode 100644 bb.edn create mode 100644 bb/brut/main.clj create mode 100755 gen.sh diff --git a/bb.edn b/bb.edn new file mode 100644 index 0000000..d46ba54 --- /dev/null +++ b/bb.edn @@ -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"))}} diff --git a/bb/brut/main.clj b/bb/brut/main.clj new file mode 100644 index 0000000..f81ced8 --- /dev/null +++ b/bb/brut/main.clj @@ -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))) diff --git a/gen.sh b/gen.sh new file mode 100755 index 0000000..10666ae --- /dev/null +++ b/gen.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bb + +(require '[]) + +(defn build-css + [] + ) diff --git a/shell.nix b/shell.nix index ce3880c..6ac7967 100644 --- a/shell.nix +++ b/shell.nix @@ -4,6 +4,7 @@ mkShell { buildInputs = [ lessc minify + babashka ]; shellHook = '' echo "shell with lessc and minify"