diff --git a/helwasm/index.html b/helwasm/index.html index 3b88973..0470af9 100644 --- a/helwasm/index.html +++ b/helwasm/index.html @@ -206,6 +206,14 @@ const masterEl = () => document.getElementById("master"); 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) ---- // 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 diff --git a/helwasm/style.css b/helwasm/style.css index 80d6976..efc3cf2 100644 --- a/helwasm/style.css +++ b/helwasm/style.css @@ -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:hover { color: var(--ocean); border-color: var(--ocean); background: rgba(27, 65, 97, 0.05); } .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 {