docs: update README.md with new content

This commit is contained in:
Hernâni Marques 2026-09-30 13:01:15 +02:00
parent ff934ce5e9
commit 8a09314eaf
No known key found for this signature in database
11 changed files with 133 additions and 60 deletions

View file

@ -0,0 +1,29 @@
.cascade-bar {
position: sticky;
top: 0;
z-index: 10;
display: flex;
flex-wrap: wrap;
gap: 0.35rem 0.85rem;
align-items: baseline;
margin: -1.5rem -1.5rem 1rem;
padding: 0.55rem 1.5rem;
background: #10141a;
border-bottom: 1px solid #243040;
}
.cascade-bar a {
color: #7ec8ff;
text-decoration: none;
}
.cascade-bar a:hover { text-decoration: underline; }
.cascade-bar a.is-active {
color: #e8eef4;
text-decoration: none;
box-shadow: inset 0 -2px 0 #e8eef4;
}
.cascade-bar a.is-active:hover { text-decoration: none; }
.cascade-bar code { color: inherit; }
.cascade-bar .tip {
color: #8a96a3;
font-size: 12px;
}

View file

@ -0,0 +1,11 @@
{% $p := .Req.URL.Path %}
<link rel="stylesheet" href="/_cascade/bar.css">
<nav class="cascade-bar" aria-label="cascade">
<a href="/" {% if or (eq $p "/") (eq $p "/index.html") %}class="is-active" aria-current="page"{% end %}>cascade</a>
<a href="/main/" {% if or (eq $p "/main") (or (eq $p "/main/") (eq $p "/main/index.html")) %}class="is-active" aria-current="page"{% end %}><code>/main/</code> <span class="tip" data-tip="main">main @ d2fbd79</span></a>
<a href="/feat-sm-content/" {% if or (eq $p "/feat-sm-content") (or (eq $p "/feat-sm-content/") (eq $p "/feat-sm-content/index.html")) %}class="is-active" aria-current="page"{% end %}><code>/feat-sm-content/</code> <span class="tip" data-tip="feat/sm-content">feat/sm-content @ 089ef1f</span></a>
<a href="/feat-website-features/" {% if or (eq $p "/feat-website-features") (or (eq $p "/feat-website-features/") (eq $p "/feat-website-features/index.html")) %}class="is-active" aria-current="page"{% end %}><code>/feat-website-features/</code> <span class="tip" data-tip="feat/website-features">feat/website-features @ 53a3176</span></a>
<a href="/feat-website-design/" {% if or (eq $p "/feat-website-design") (or (eq $p "/feat-website-design/") (eq $p "/feat-website-design/index.html")) %}class="is-active" aria-current="page"{% end %}><code>/feat-website-design/</code> <span class="tip" data-tip="feat/website-design">feat/website-design @ 2e26c80</span></a>
<a href="/feat-website-views/" {% if or (eq $p "/feat-website-views") (or (eq $p "/feat-website-views/") (eq $p "/feat-website-views/index.html")) %}class="is-active" aria-current="page"{% end %}><code>/feat-website-views/</code> <span class="tip" data-tip="feat/website-views">feat/website-views @ bbafc38</span></a>
</nav>
<script src="/_cascade/bar.js" defer></script>

View file

@ -0,0 +1,24 @@
(function () {
var nodes = document.querySelectorAll(".cascade-bar [data-tip]");
if (!nodes.length) return;
fetch("/branch-status.json", { cache: "no-store" })
.then(function (res) {
if (!res.ok) throw new Error("status");
return res.json();
})
.then(function (data) {
var tips = {};
var list = (data && data.branches) || [];
for (var i = 0; i < list.length; i++) {
var row = list[i];
if (row && row.branch && row.tip) tips[row.branch] = row.tip;
}
for (var j = 0; j < nodes.length; j++) {
var el = nodes[j];
var name = el.getAttribute("data-tip");
var tip = tips[name];
if (tip) el.textContent = name + " @ " + tip;
}
})
.catch(function () {});
})();