better sizing

This commit is contained in:
Yann Esposito (Yogsototh) 2024-07-29 15:52:21 +02:00
parent df730ccc65
commit d33f5d4e9c
Signed by untrusted user who does not match committer: yogsototh
GPG key ID: 7B19A4C650D59646
3 changed files with 4 additions and 4 deletions

View file

@ -1 +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(&apos;../h/img/brutalism.webp&apos;)"><a class="btn warn huge" download="brut.min.css" href="../brut.min.css"><span>Download BRUT<span>(&lt;9kB)</span></span></a></div></body>
<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(&apos;../h/img/brutalism.webp&apos;)"><a class="btn warn huge" download="brut.min.css" href="../brut.min.css"><span>Download BRUT<span>(7900 Bytes)</span></span></a></div></body>

View file

@ -1 +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 class="big">A Brutalist and Minimalist CSS Framework</h4><p class="big">This CSS framework is ideal to be used for <strong>private admin interfaces</strong>.</p><p class="big"> Just by the look of it, it will scream: <br /><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="col"><div class="row"><div class="col card"><h3>Examples</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></div><div class="card"><h3>Example</h3><img alt="A demo of brut.css with a few forms and an error message" class="card" src="h/img/brut-demo-light.webp" /></div></div><div class="row"><div class="col card"><h3>Docs</h3><a class="tb big info stretch" href="h/docs.html">Docs</a></div><div class="col card"><h3>Download</h3><a class="tb warn big stretch" download="brut.min.css" href="brut.min.css">Download (&lt;9kB)</a></div></div></div></div></div><footer><div class="container"><p>By <a href="https://yannesposito.com">Yann Esposito</a></p></div></footer></body>
<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 class="big">A Brutalist and Minimalist CSS Framework</h4><p class="big">This CSS framework is ideal to be used for <strong>private admin interfaces</strong>.</p><p class="big"> Just by the look of it, it will scream: <br /><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="col"><div class="row"><div class="col card"><h3>Examples</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></div><div class="card"><h3>Example</h3><img alt="A demo of brut.css with a few forms and an error message" class="card" src="h/img/brut-demo-light.webp" /></div></div><div class="row"><div class="col card"><h3>Docs</h3><a class="tb big info stretch" href="h/docs.html">Docs</a></div><div class="col card"><h3>Download</h3><a class="tb warn big stretch" download="brut.min.css" href="brut.min.css">Download (7900 Bytes)</a></div></div></div></div></div><footer><div class="container"><p>By <a href="https://yannesposito.com">Yann Esposito</a></p></div></footer></body>

View file

@ -12,11 +12,11 @@
(defn set-css-size! []
(let [n (size-of "./_site/brut.min.css")
[fl quant] (cond
(< n 1024) [n "Bytes"]
(< n 10000) [(float n) " Bytes"]
(< n (* 1024 1024)) (let [kb (float (/ n 1024))] [kb "kB"])
(< n (* 1024 1024 1024)) (let [mb (float (/ n (* 1024 1024)))] [mb "MB"])
:else [9001 "DBZ"])
size-str (format "<%.0f%s" (+ 1 fl) quant)]
size-str (format "%.0f%s" fl quant)]
(reset! size-of-css size-str)))
(defn html-pp [html-str]