start: show the normal site header on /start (with the owner dashboard button, highlighted there); no footer on the new-tab page
All checks were successful
Deploy production / deploy (push) Successful in 2m36s

/start is no longer immersive, so it loads the lazily imported SiteChrome like other pages.
Only the book reader still skips the chrome. hidesFooter() keeps the footer off /start.
This commit is contained in:
2026-10-24 16:03:06 +00:00
parent b757269151
commit bc58e97776
5 changed files with 60 additions and 46 deletions

View File

@@ -2,7 +2,7 @@
import { onMount, type Snippet } from 'svelte';
import { resolve } from '$app/paths';
import logo from '#lib/assets/brand/favicon-32x32.png?url';
import { isTyping } from '#lib/chrome.js';
import { hidesFooter, isTyping } from '#lib/chrome.js';
import { page } from '$app/state';
import CopyButton from '#lib/components/CopyButton.svelte';
import ProjectIcon from '#lib/components/ProjectIcon.svelte';
@@ -36,6 +36,7 @@
version: string;
};
let { data, children }: { data: ChromeData; children: Snippet } = $props();
const showFooter = $derived(!hidesFooter(page.url.pathname));
let menuOpen = $state(false);
// Which header dropdown is open (desktop): '/projects', '/trackers' or none.
let openMenu = $state<string | null>(null);
@@ -266,7 +267,7 @@
{#if data.isOwner}
<Button
href={resolve('/start')}
variant="ghost"
variant={current('/start') ? 'secondary' : 'ghost'}
size="sm"
class="gap-1.5"
title="Dashboard (g then d)"
@@ -369,40 +370,42 @@
</div>
</header>
<main id="main" class="isolate min-w-0 flex-1">{@render children()}</main>
<footer
class="mt-16 border-t border-[var(--site-border)]"
class:tracker-footer={page.route.id === '/projects/game-tracker'}
class:cod-footer={page.route.id === '/projects/game-tracker/call-of-duty/[slug]'}
>
<div class="mx-auto max-w-6xl space-y-5 px-4 py-8 text-[var(--site-muted)] sm:px-6">
<div class="flex flex-wrap items-center justify-between gap-3 text-base">
<span
>stan runge <span class="ml-2 font-mono text-xs" title="Deployed commit"
>{data.version.slice(0, 7)}</span
></span
>
<a
href="https://git.stanrunge.dev/stan/website"
rel="external"
class="inline-flex items-center gap-1 hover:text-[var(--site-text)]"
>source <ExternalLink size={14} aria-hidden="true" /></a
>
</div>
<nav class="flex flex-wrap items-center justify-center gap-1" aria-label="Social links">
{#each socialLinks as { icon: Icon, label, href } (label)}
<Button
{href}
variant="ghost"
size="icon-lg"
rel="external"
aria-label={label}
title={label}><Icon class="size-6" /></Button
{#if showFooter}
<footer
class="mt-16 border-t border-[var(--site-border)]"
class:tracker-footer={page.route.id === '/projects/game-tracker'}
class:cod-footer={page.route.id === '/projects/game-tracker/call-of-duty/[slug]'}
>
<div class="mx-auto max-w-6xl space-y-5 px-4 py-8 text-[var(--site-muted)] sm:px-6">
<div class="flex flex-wrap items-center justify-between gap-3 text-base">
<span
>stan runge <span class="ml-2 font-mono text-xs" title="Deployed commit"
>{data.version.slice(0, 7)}</span
></span
>
{/each}
{#each copyLinks as item (item.label)}<CopyButton {...item} />{/each}
</nav>
</div>
</footer>
<a
href="https://git.stanrunge.dev/stan/website"
rel="external"
class="inline-flex items-center gap-1 hover:text-[var(--site-text)]"
>source <ExternalLink size={14} aria-hidden="true" /></a
>
</div>
<nav class="flex flex-wrap items-center justify-center gap-1" aria-label="Social links">
{#each socialLinks as { icon: Icon, label, href } (label)}
<Button
{href}
variant="ghost"
size="icon-lg"
rel="external"
aria-label={label}
title={label}><Icon class="size-6" /></Button
>
{/each}
{#each copyLinks as item (item.label)}<CopyButton {...item} />{/each}
</nav>
</div>
</footer>
{/if}
</div>
<style>