site: owner-only dashboard link in header, mobile menu and homepage (g then d from any page); /start skips the site chrome JS
All checks were successful
Deploy production / deploy (push) Successful in 2m56s
All checks were successful
Deploy production / deploy (push) Successful in 2m56s
- Header/footer moved to #lib/components/SiteChrome.svelte, returned by a universal +layout.ts load only for non-immersive pages, so /start and the book reader never download icon libraries, dropdowns or the bits-ui Sheet. /start: 36 -> 18 JS files, 133 -> 78 KB gzip. - Header logo is a hashed asset (inlined), so it is cached with the build. - inlineStyleThreshold 4096: tiny page/component CSS is inlined into the HTML. - Umami is not loaded on /start.
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
import Mail from 'lucide-svelte/icons/mail';
|
||||
import BriefcaseBusiness from 'lucide-svelte/icons/briefcase-business';
|
||||
import GraduationCap from 'lucide-svelte/icons/graduation-cap';
|
||||
import LayoutDashboard from 'lucide-svelte/icons/layout-dashboard';
|
||||
import type { PageProps } from './$types';
|
||||
|
||||
let { data }: PageProps = $props();
|
||||
@@ -49,6 +50,22 @@
|
||||
</svelte:head>
|
||||
|
||||
<div class="mx-auto max-w-6xl px-4 sm:px-6">
|
||||
{#if data.isOwner}
|
||||
<!-- Owner only: a shortcut to the private /start dashboard. Visitors never see it. -->
|
||||
<a
|
||||
href={resolve('/start')}
|
||||
class="mt-4 flex items-center gap-3 rounded-md border border-[var(--site-border)] bg-[var(--site-surface)] px-4 py-3 hover:border-[var(--site-text)]"
|
||||
>
|
||||
<LayoutDashboard size={20} aria-hidden="true" />
|
||||
<span class="min-w-0"
|
||||
><span class="block font-medium">dashboard</span><span
|
||||
class="block truncate text-sm text-[var(--site-muted)]"
|
||||
>tasks, server, backups, notifications and links · g then d from any page</span
|
||||
></span
|
||||
>
|
||||
<ArrowRight size={18} class="ml-auto shrink-0" aria-hidden="true" />
|
||||
</a>
|
||||
{/if}
|
||||
<section
|
||||
class="grid items-center gap-8 pt-7 pb-12 sm:py-20 md:grid-cols-[minmax(0,1fr)_minmax(0,320px)] md:gap-16"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user