From 507335168c600f2f17867f123e97a9c7a8b7bde8 Mon Sep 17 00:00:00 2001 From: Oleksandr Kozachuk <201152+ok2@users.noreply.github.com> Date: Wed, 10 Jun 2026 00:24:45 +0200 Subject: [PATCH] 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. --- helwasm/index.html | 8 ++++++++ helwasm/style.css | 3 +++ 2 files changed, 11 insertions(+) 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 {