diff --git a/hdyc-svelte/src/app.css b/hdyc-svelte/src/app.css index bd4ddfc..dbd1aae 100644 --- a/hdyc-svelte/src/app.css +++ b/hdyc-svelte/src/app.css @@ -343,11 +343,16 @@ a:focus-visible { justify-content: space-between; padding: 0 1.5rem; background: var(--header-bg); - backdrop-filter: blur(16px); - -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); } +@media (min-width: 1025px) { + .site-header { + backdrop-filter: blur(16px); + -webkit-backdrop-filter: blur(16px); + } +} + .header-left { display: flex; align-items: center; diff --git a/hdyc-svelte/src/app.html b/hdyc-svelte/src/app.html index 409a589..93fe6a0 100644 --- a/hdyc-svelte/src/app.html +++ b/hdyc-svelte/src/app.html @@ -12,7 +12,7 @@ /> = {}; @@ -76,7 +87,12 @@ $: categoryUnitGroups = Object.entries(categories).map(([key, meta]) => { const buckets = new Map(); - const calcs = getCalculatorsByCategory(key); + + if (!isLoaded) { + return { key, meta, units: [] }; + } + + const calcs = allCalculators.filter(c => c.category === key && !c.hidden); const canonicalByPair = new Map(); calcs.forEach(calc => { @@ -161,6 +177,11 @@ } export let open = false; + + $: if (browser && (isDesktop || open)) { + loadData(); + } + $: isSidebarHidden = !isDesktop && !open; function closeSidebar() {