helwasm: hide back-to-Kaizenkodo link when launched as an installed app

In standalone/home-screen launch, leaving the app context feels wrong, so hide the
back link. Detected via navigator.standalone (older iOS) + display-mode:standalone
media query / html.standalone class.
This commit is contained in:
Oleksandr Kozachuk
2026-06-10 00:24:45 +02:00
parent b25408d283
commit 507335168c
2 changed files with 11 additions and 0 deletions
+8
View File
@@ -206,6 +206,14 @@
const masterEl = () => document.getElementById("master"); const masterEl = () => document.getElementById("master");
const CATALOG_KEY = "hel_catalog"; const CATALOG_KEY = "hel_catalog";
// When launched as an installed app (home-screen / standalone), hide the
// "back to Kaizenkodo" link — leaving the app context would feel wrong there.
// navigator.standalone covers older iOS; the media query covers the rest.
if (window.navigator.standalone === true ||
(window.matchMedia && window.matchMedia("(display-mode: standalone)").matches)) {
document.documentElement.classList.add("standalone");
}
// ---- host imports (wasm calls these by bare name → must be globals) ---- // ---- host imports (wasm calls these by bare name → must be globals) ----
// The master field is the single ROOT master. hel's read_master prompts "/" for // The master field is the single ROOT master. hel's read_master prompts "/" for
// the root and the parent's NAME when climbing a ^parent chain; by answering only // the root and the parent's NAME when climbing a ^parent chain; by answering only
+3
View File
@@ -72,6 +72,9 @@ body {
.backlink { display: inline-flex; align-items: center; gap: 5px; flex: none; font-family: var(--mono); font-size: 12px; letter-spacing: 0.03em; color: var(--muted); text-decoration: none; white-space: nowrap; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line); } .backlink { display: inline-flex; align-items: center; gap: 5px; flex: none; font-family: var(--mono); font-size: 12px; letter-spacing: 0.03em; color: var(--muted); text-decoration: none; white-space: nowrap; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line); }
.backlink:hover { color: var(--ocean); border-color: var(--ocean); background: rgba(27, 65, 97, 0.05); } .backlink:hover { color: var(--ocean); border-color: var(--ocean); background: rgba(27, 65, 97, 0.05); }
.backlink .arr { font-size: 14px; line-height: 1; } .backlink .arr { font-size: 14px; line-height: 1; }
/* Installed as a home-screen app (standalone launch): hide the back-to-site link. */
@media (display-mode: standalone) { .backlink { display: none; } }
html.standalone .backlink { display: none; }
/* Eyebrow label */ /* Eyebrow label */
.eyebrow { .eyebrow {