Rail: secondary entries use class rsec (the generic .sec eyebrow rule upper-cased Training/Pipeline/Profile)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-10-11 06:56:14 -05:00
parent f562cc50be
commit 67f38daac4
11 changed files with 20 additions and 20 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ window.CR = (function () {
const page = $('page'); if (!page) return;
const app = document.createElement('div'); app.className = 'app'; let railWide = true; try { railWide = localStorage.getItem('cr.rail') !== 'narrow'; } catch (e) {} if (railWide) app.classList.add('wide'); // expanded by default (Marty 2026-10-08), the choice remembered per browser
app.innerHTML = '<nav class="rail" aria-label="LinkSpin"><a class="mark" href="/" aria-label="LinkSpin home" title="LinkSpin"></a>'
+ NAV.map(([k, label, href, svg, sec]) => '<a href="' + (BUILT.has(k) ? href : FALLBACK[k]) + '"' + (k === o.active ? ' class="on' + (sec ? ' sec' : '') + '" aria-current="page"' : (sec ? ' class="sec"' : '')) + ' title="' + label + '" aria-label="' + label + '"><svg viewBox="0 0 24 24">' + svg + '</svg><span class="lbl">' + label + '</span></a>').join('')
+ NAV.map(([k, label, href, svg, sec]) => '<a href="' + (BUILT.has(k) ? href : FALLBACK[k]) + '"' + (k === o.active ? ' class="on' + (sec ? ' rsec' : '') + '" aria-current="page"' : (sec ? ' class="rsec"' : '')) + ' title="' + label + '" aria-label="' + label + '"><svg viewBox="0 0 24 24">' + svg + '</svg><span class="lbl">' + label + '</span></a>').join('')
+ '<span class="sp"></span><button class="railtog" type="button" id="crRailTog" title="Collapse or expand the menu" aria-label="Collapse or expand the menu"><svg viewBox="0 0 24 24"><path d="M15 6l-6 6 6 6"/></svg><span class="lbl">Collapse</span></button></nav>'
+ '<div class="main"><div class="topbar"><div><div class="crumb">' + esc(o.crumb || 'Control room') + '</div><h1>' + esc(o.title || '') + '</h1></div><span class="readout" id="crSub">' + esc(o.sub || '') + '</span><span class="grow"></span><span id="crActions">' + (o.actions || '') + '</span><button class="who" type="button" id="crUserBtn" title="Account"><i id="crAv"></i><span id="crWho">Sign in</span></button></div><div id="crBody"></div>'
+ '<div class="strip" id="crStrip"><span><span class="dot off" id="stDot"></span>rotator <b id="stHealth">checking</b></span><span>served today <b id="stServed">·</b></span><span>zones live <b id="stZones">·</b></span><span>network <b id="stNet">·</b></span><span class="grow"></span><span id="stClock"></span></div></div>';
+1 -1
View File
@@ -174,7 +174,7 @@ label.lbl{display:grid;gap:5px;font-size:10.5px;font-weight:700;letter-spacing:.
@media (max-width:760px){
.app{grid-template-columns:1fr}
.rail{position:fixed;top:auto;bottom:0;left:0;right:0;height:auto;flex-direction:row;justify-content:space-around;padding:6px 6px calc(6px + env(safe-area-inset-bottom,0px));border-right:0;border-top:1px solid var(--chrome-line);z-index:30}
.rail .mark,.rail .sp,.railtog,.rail .lbl,.rail a.sec{display:none} .rail a.on::before{display:none}
.rail .mark,.rail .sp,.railtog,.rail .lbl,.rail a.rsec{display:none} .rail a.on::before{display:none}
.app.wide{grid-template-columns:1fr} .app.wide .rail{align-items:center;padding:6px 6px calc(6px + env(safe-area-inset-bottom,0px))} .app.wide .rail a{width:40px;justify-content:center;padding:0}
.main{padding-bottom:64px;min-height:auto}
.topbar{padding:10px 16px;flex-wrap:wrap;gap:10px 14px} .topbar .readout{display:none}