fix: navigation blink root-caused — defer search-client.js (was parser-blocking mid-body), npm run demo serves the production build through the tunnel; DESIGN.md documents the VT removal + font-swap decision

This commit is contained in:
ctao
2026-07-25 17:48:48 +02:00
parent c9161af655
commit 1ef2cab89e
4 changed files with 41 additions and 5 deletions
+7 -2
View File
@@ -107,8 +107,13 @@ const links = [
</details>
</div>
</header>
<script is:inline src="/search-client.js"></script>
<script is:inline>
{/* Search enhancement is deferred — a synchronous script here would stall
the parser mid-body on every navigation (blank below the header until
it arrives). `defer` + the inline `type="module"` init join the same
after-parse in-order queue (HTML spec), so newsSearch is defined first.
The forms are plain GET /search, so nothing user-facing waits on JS. */}
<script is:inline src="/search-client.js" defer></script>
<script is:inline type="module">
// Header search suggestions (desktop field + mobile reveal); the forms
// are plain GET /search, so everything below is progressive enhancement.
newsSearch({ input: 'hdr-q', list: 'hdr-suggest', status: 'hdr-suggest-status', limit: 6, unit: 'suggestion', dismiss: true });