updated to improve uploading website
This commit is contained in:
parent
c66dfade4d
commit
7b0e2df9ed
14
README.md
14
README.md
|
@ -24,5 +24,19 @@ Then
|
|||
```
|
||||
|
||||
If you don't have `nix` you need to manually install:
|
||||
|
||||
- [babashka](https://babashka.org)
|
||||
- [`lessc`](https://lesscss.org),
|
||||
- and [`minify`](https://www.minifier.org).
|
||||
|
||||
### Develop
|
||||
|
||||
```
|
||||
nix develop
|
||||
```
|
||||
|
||||
all tasks
|
||||
|
||||
```
|
||||
bb tasks
|
||||
```
|
||||
|
|
0
brut.min.css → _site/brut.min.css
vendored
0
brut.min.css → _site/brut.min.css
vendored
1158
_site/h/docs.html
Normal file
1158
_site/h/docs.html
Normal file
File diff suppressed because one or more lines are too long
1
_site/h/download.html
Normal file
1
_site/h/download.html
Normal file
|
@ -0,0 +1 @@
|
|||
<head><meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /><meta content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no" name="viewport" /><title>BRUT - download</title><link href="../brut.min.css" rel="stylesheet" type="text/css" /></head><body class="col gapless"><div><nav class="nav" onclick="this.focus()" tabindex="-1"><div class="container"><a class="pagename" href="../index.html">BRUT</a><a href="../h/docs.html">Docs</a><a href="../h/download.html">Download</a><a href="https://gitea.esy.fun/yogsototh/brutcss">Code</a></div></nav><button class="btn sn btn-close">×</button></div><div class="central fill" style="background:url('../h/img/brutalism.webp')"><a class="btn warn huge" href="../brut.min.css">Download BRUT</a></div></body>
|
BIN
_site/h/img/brutalism.webp
Normal file
BIN
_site/h/img/brutalism.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 25 KiB |
1
_site/index.html
Normal file
1
_site/index.html
Normal file
|
@ -0,0 +1 @@
|
|||
<head><meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /><meta content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no" name="viewport" /><title>BRUT</title><link href="brut.min.css" rel="stylesheet" type="text/css" /></head><body class="col gapless"><div><nav class="nav" onclick="this.focus()" tabindex="-1"><div class="container"><a class="pagename" href="index.html">BRUT</a><a href="h/docs.html">Docs</a><a href="h/download.html">Download</a><a href="https://gitea.esy.fun/yogsototh/brutcss">Code</a></div></nav><button class="btn sn btn-close">×</button></div><div><div class="hero" style="background: url(h/img/brutalism.webp)"><div class="container col middle"><div class="row middle"><div class="c2"></div><div class="c8 col block bg-neutral"><h1 class="tight huge">BRUT</h1><h4>A Brutalist and Minimalist CSS Framework</h4><p>This CSS framework is ideal to be used for <strong>private admin interfaces</strong>.</p><p> Just by the look of it, it will scream: <span class="hl">THIS IS NOT FOR NON-TECHNICAL PEOPLE!!!</span></p></div><div class="c2"></div></div></div></div><div class="container"><div class="row"><div class="card"><h3>Docs</h3><p>A few quick examples to show every components. This should be quick and straightforward.</p><p>This CSS framework makes its best to respect some expected composability accross classes. Here are a few examples:</p><div class="row"><div><p class="tight">A block: </p><div class="card"><div class="tb">textual btn</div><br /><div class="btn">classic btn</div><br /><div class="msg">Some message block</div></div></div><div><p class="tight">Then add the class <code>big</code>: </p><div class="card big"><div class="tb">textual btn</div><br /><div class="btn">classic btn</div><br /><div class="msg">Some message block</div></div></div></div><a class="btn big push" href="h/docs.html">Docs</a></div><div class="col card"><h3>Download</h3><p>Download BRUT</p><a class="btn warn big push" href="h/download.html">Download</a></div></div></div></div><footer><div class="container"><p>By <a href="https://yannesposito.com">Yann Esposito</a></p></div></footer></body>
|
4
bb.edn
4
bb.edn
|
@ -6,8 +6,8 @@
|
|||
{clean {:doc "clean temporary assets"
|
||||
:requires ([babashka.fs :as fs])
|
||||
:task (do (fs/delete-tree "_build")
|
||||
(fs/delete-if-exists "brut.min.css")
|
||||
(fs/delete-if-exists "brut-nocolors.min.css"))}
|
||||
(fs/delete-tree "_site")
|
||||
(fs/delete-if-exists "brut.min.css"))}
|
||||
build-site {:doc "build the HTML"
|
||||
:requires ([brut.site])
|
||||
:task (brut.site/-main)}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
tmp-dir (-> (fs/create-temp-dir)
|
||||
(fs/delete-on-exit))
|
||||
tmp-css (fs/file tmp-dir "tmp.css")
|
||||
brut-css "brut.min.css"
|
||||
brut-css "_site/brut.min.css"
|
||||
sub-css ["colors"
|
||||
"extended-colors"
|
||||
"general"
|
||||
|
@ -37,6 +37,7 @@
|
|||
(spit min-css minified)
|
||||
(when-not (= "extended-colors" item)
|
||||
(spit tmp-css minified :append true))))
|
||||
(fs/create-dirs (fs/parent brut-css))
|
||||
(fs/move tmp-css brut-css {:replace-existing true
|
||||
:atomic-move true})
|
||||
(println "built: " brut-css)))
|
||||
|
|
|
@ -51,6 +51,8 @@
|
|||
(when footer?
|
||||
(footer))])))
|
||||
|
||||
(def dest "_site")
|
||||
|
||||
(defn gen-page [file-path metas content-fn]
|
||||
(let [depth (or (some-> file-path
|
||||
fs/parent
|
||||
|
@ -58,9 +60,11 @@
|
|||
count)
|
||||
0)
|
||||
rel-pref (apply str (repeat depth "../"))
|
||||
html (mk-page rel-pref metas (content-fn rel-pref metas))]
|
||||
(println "Generates: " file-path)
|
||||
(spit file-path html)))
|
||||
html (mk-page rel-pref metas (content-fn rel-pref metas))
|
||||
dst (str dest "/" file-path)]
|
||||
(fs/create-dirs (fs/parent dst))
|
||||
(println "Generates: " dst)
|
||||
(spit dst html)))
|
||||
|
||||
(defn mk-index [rel-pref _metas]
|
||||
(let [to (fn [path] (str rel-pref path))
|
||||
|
@ -526,6 +530,12 @@
|
|||
[:summary.bg-neutral "code"]
|
||||
(to-pre c2)]])])])]))
|
||||
|
||||
(defn brut-copy
|
||||
[path]
|
||||
(let [dst (str dest "/" path)]
|
||||
(println "Copying: " path " to " dst)
|
||||
(fs/copy-tree path dst)))
|
||||
|
||||
(defn -main [& _args]
|
||||
(gen-page "index.html"
|
||||
{:title "BRUT"
|
||||
|
@ -539,4 +549,4 @@
|
|||
(gen-page "h/docs.html"
|
||||
{:title "BRUT - documentation"}
|
||||
mk-docs)
|
||||
)
|
||||
(brut-copy "h/img"))
|
||||
|
|
2
build.sh
2
build.sh
|
@ -20,11 +20,9 @@ for item in "${subtypes[@]}"; do
|
|||
done
|
||||
|
||||
[ -f $DISTCSS.bak ] && rm -f $DISTCSS.bak
|
||||
[ -f $DISTFULLCSS.bak ] && rm -f $DISTFULLCSS.bak
|
||||
[ -f $DISTCSS ] && mv $DISTCSS $DISTCSS.bak
|
||||
mv $TMPCSS $DISTCSS
|
||||
# cleanup
|
||||
rm -f $DISTCSS.bak
|
||||
rm -f $DISTFULLCSS.bak
|
||||
rm -f $TMPCSS
|
||||
echo "Built: $DISTCSS"
|
||||
|
|
14
deploy.sh
Executable file
14
deploy.sh
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
cd "$(git rev-parse --show-toplevel)" || exit 1
|
||||
webdir="_site"
|
||||
|
||||
[[ -d $webdir ]] || { echo "no $webdir directory"; exit 1 }
|
||||
|
||||
echo -n "Uploading website"
|
||||
rsync --progress\
|
||||
--partial \
|
||||
--delete \
|
||||
--exclude '.git' \
|
||||
-avHe ssh ${webdir}/ root@esy.fun:/var/www/brut.esy.fun/
|
||||
echo " [done]"
|
30
flake.lock
30
flake.lock
|
@ -1,12 +1,15 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1659877975,
|
||||
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
|
||||
"lastModified": 1694529238,
|
||||
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
|
||||
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -17,11 +20,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1664058032,
|
||||
"narHash": "sha256-djifox1rDQ2x+ujJCHiXyPAl2bXk+GlYorA0Clfhfko=",
|
||||
"lastModified": 1699725108,
|
||||
"narHash": "sha256-NTiPW4jRC+9puakU4Vi8WpFEirhp92kTOSThuZke+FA=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "f2ea9a9fcd41b65651fd89c1b9198798f4362f66",
|
||||
"rev": "911ad1e67f458b6bcf0278fa85e33bb9924fed7e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -34,6 +37,21 @@
|
|||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
|
Loading…
Reference in a new issue