From 894659f8c00782a186dc0888eef14094c732bb9c Mon Sep 17 00:00:00 2001 From: MiguelCarino Date: Wed, 4 Nov 2026 15:13:06 -0600 Subject: [PATCH] Navbar: mark + Carino + product name, About window replaces the bar's buttons The shared navbar (canonical CVE/carino-navbar.js) now shows the mark, the Carino wordmark and the product name, the clock, and one About button. The About window has tabs: About (one-liner, large mark, Disclaimer, version), How to use, Contact, Licence (summary, buttons, third-party), Language (grid plus the product's key words floating in Carino gold), Legal. The privacy line moved from the page into the About disclaimer. --- carino-lang.js | 13 +- carino-navbar.js | 992 +++++++++++++++++++++++++++++++++-------------- carino-theme.css | 9 +- index.html | 8 + 4 files changed, 735 insertions(+), 287 deletions(-) diff --git a/carino-lang.js b/carino-lang.js index f639ef3..c283f83 100644 --- a/carino-lang.js +++ b/carino-lang.js @@ -7,10 +7,12 @@ - It injects a compact language button (a language glyph + AUTO, - or the picked code: EN / ES / PT / 日本語 / RU) into the header's - right cluster, left of the Sys. Status control. Clicking it opens - a dropdown: Auto (follow the browser) plus the five languages. + Next to the shared navbar it draws no button: the navbar's About + window has a Language tab that calls CarinoLang.set(). Only a bespoke + header (the hub's inline one) still gets the compact language button + (a language glyph + AUTO, or the picked code: EN / ES / PT / 日本語 / + RU), left of its Sys. Status control, which opens a dropdown: Auto + (follow the browser) plus the five languages. AUTOMATIC: the language resolves without any user action — ?lang= in the URL > fleet-wide choice > browser language @@ -336,6 +338,9 @@ // injected navbar's .cn-right (carino-navbar.js). Sit LEFT of Sys. Status. function tryAttach() { var nav = document.getElementById('carinoNav'); + // The shared navbar shows the languages in its About window (a Language + // tab that calls CarinoLang.set), so it gets no button here. + if (nav && nav.hasAttribute('data-cn-lang')) return true; if (nav) { var right = nav.querySelector('.cn-right'); if (right) { build(right, document.getElementById('cnDiagBtn') || right.querySelector('.social-row')); return true; } diff --git a/carino-navbar.js b/carino-navbar.js index 5a9099a..0aef917 100644 --- a/carino-navbar.js +++ b/carino-navbar.js @@ -5,72 +5,103 @@ - data-app is the little tag next to the brand; data-repo is the - GitHub repository the header's GitHub button points at. They - differ on the few sites whose repo name is longer than the tag - (Netplan/NetplanConfig, Setup/SimpleSetup, Software/ - SoftwareCatalog, SyncSubs/SyncSubsStudio), so data-repo falls - back to data-app and, failing that, to the profile page. + Attributes on the script tag: + data-app the product's name, shown beside "Carino" (required) + data-name a display name when it differs from data-app (optional) + data-repo the GitHub repository (falls back to data-app) + data-license the repo's licence as an SPDX id (AGPL-3.0, MIT, …) + data-mark the page's mark, for a page WITHOUT carino-theme.js. + With carino-theme.js the mark is its theme switch, + which it inserts in the same place; this file then + draws none. + data-version the version shown at the foot of the About tab. A page + may also set it at run time: CarinoNav.version('1.3.1'). + Without one the version is 0.0.YYYYMMDD, the date the + page was last modified (its Last-Modified header). + data-changelog a link to the changelog, shown under the version + data-immersive see "Immersive mode" below - It injects its own (scoped) styles + the canonical top-header - markup and runs the greeting. The live CLOCK (Local/UTC/Epoch/ - TAI/.beats + click-to-cycle) lives in the companion file - carino-clock.js, which this script loads from the SAME site — both - files ship together in every project, so there is no external/CDN - dependency and each site works standalone/offline. To change the - clock, edit carino-clock.js and re-copy it to each site (see - propagate.sh). All styles are scoped under #carinoNav so nothing - leaks into (or clashes with) the app. + The bar, left to right: + [mark] Carino Product 12:04 LOCAL [app controls] [status] [⋯] [About] - The Status diagnostics dropdown lives only on carino.systems - itself — every sub-project's navbar omits it. + "Carino" goes to the hub (carino.systems); the product name links to + the app's own root, so clicking it reloads the site. Below 360px the + word "Carino" is dropped: the mark is already the gold C. + + It injects its own (scoped) styles + the markup. The live CLOCK + (Local/UTC/Epoch/TAI/.beats + click-to-cycle) lives in the companion + file carino-clock.js, which this script loads from the SAME site, so + there is no external/CDN dependency and each site works standalone/ + offline. To change it, edit the canonical copy and run propagate.sh. + All styles are scoped under #carinoNav so nothing leaks into the app. The bar stays on screen: it sticks to the top of the page at every width, so anything else a page makes sticky sits under it, at top: var(--nav-h) (carino-ui.css), never at top: 0. - Brand links: "Carino" goes to the hub (carino.systems); the - app-tag next to it links to the app's own root — clicking it - acts as a fresh reload of the current site. - - Right-cluster order is fixed by CSS `order`, not by DOM - position, because four different scripts insert into it and - none of them can rely on the others having run yet. Read it - from the right edge inwards — the socials anchor the row and - language sits immediately beside them: + Right-cluster order is fixed by CSS `order`, not by DOM position, + because several scripts insert into it: 1 the app's own controls (.cn-actions) 2 status (carino-diag.js, or an app's own toggle) - 3 language (carino-lang.js) - 4 About + GitHub + LinkedIn — always last + 5 "⋯" (only while something is folded into it) + 6 About (never folds) - The labelled About button that leads that last group opens the about - popup (after the hub's help pane). Sites - carry no footer: whatever a page must say (a data credit, a "not - advice" line, a trademark notice, which outside services it calls, its - licence and version, a changelog or manual link) goes in a -