2026-01-02 16:09:03 +03:00
|
|
|
<script lang="ts">
|
2026-01-02 21:15:40 +03:00
|
|
|
/**
|
|
|
|
|
* Layout Component
|
|
|
|
|
*
|
|
|
|
|
* Root layout wrapper that provides the application shell structure. Handles favicon,
|
2026-01-24 23:58:10 +03:00
|
|
|
* toolbar provider initialization, and renders child routes with consistent structure.
|
2026-01-02 21:15:40 +03:00
|
|
|
*
|
|
|
|
|
* Layout structure:
|
|
|
|
|
* - Header area (currently empty, reserved for future use)
|
|
|
|
|
*
|
2026-01-24 23:58:10 +03:00
|
|
|
* - Footer area (currently empty, reserved for future use)
|
2026-01-02 21:15:40 +03:00
|
|
|
*/
|
2026-02-04 10:48:40 +03:00
|
|
|
import { BreadcrumbHeader } from '$entities/Breadcrumb';
|
2026-02-09 09:39:58 +03:00
|
|
|
import GD from '$shared/assets/GD.svg';
|
2026-02-06 14:20:32 +03:00
|
|
|
import { ResponsiveProvider } from '$shared/lib';
|
2026-01-24 23:58:10 +03:00
|
|
|
import { ScrollArea } from '$shared/shadcn/ui/scroll-area';
|
2026-01-24 15:32:01 +03:00
|
|
|
import { Provider as TooltipProvider } from '$shared/shadcn/ui/tooltip';
|
2026-02-10 13:08:07 +03:00
|
|
|
import {
|
|
|
|
|
type Snippet,
|
|
|
|
|
onMount,
|
|
|
|
|
} from 'svelte';
|
2026-01-24 15:32:01 +03:00
|
|
|
|
|
|
|
|
interface Props {
|
|
|
|
|
children: Snippet;
|
|
|
|
|
}
|
2026-01-02 16:09:03 +03:00
|
|
|
|
2026-01-24 15:32:01 +03:00
|
|
|
let { children }: Props = $props();
|
2026-02-10 13:08:07 +03:00
|
|
|
let fontsReady = $state(false);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Sets fontsReady flag to true when font for the page logo is loaded.
|
|
|
|
|
*/
|
|
|
|
|
onMount(async () => {
|
|
|
|
|
if (!('fonts' in document)) {
|
|
|
|
|
fontsReady = true;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const required = ['100'];
|
|
|
|
|
|
|
|
|
|
const missing = required.filter(
|
|
|
|
|
w => !document.fonts.check(`${w} 1em Barlow`),
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
if (missing.length > 0) {
|
|
|
|
|
await Promise.all(
|
|
|
|
|
missing.map(w => document.fonts.load(`${w} 1em Barlow`)),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
fontsReady = true;
|
|
|
|
|
});
|
2026-01-02 16:09:03 +03:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<svelte:head>
|
2026-02-09 09:39:58 +03:00
|
|
|
<link rel="icon" href={GD} />
|
2026-02-10 13:08:07 +03:00
|
|
|
|
2026-01-18 12:46:11 +03:00
|
|
|
<link rel="preconnect" href="https://api.fontshare.com" />
|
2026-02-18 17:39:24 +03:00
|
|
|
<link
|
|
|
|
|
rel="preconnect"
|
|
|
|
|
href="https://cdn.fontshare.com"
|
|
|
|
|
crossorigin="anonymous"
|
|
|
|
|
/>
|
2026-01-22 15:31:59 +03:00
|
|
|
|
2026-02-18 17:39:24 +03:00
|
|
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
|
|
|
<link
|
|
|
|
|
rel="preconnect"
|
|
|
|
|
href="https://fonts.gstatic.com"
|
|
|
|
|
crossorigin="anonymous"
|
|
|
|
|
/>
|
2026-01-22 15:31:59 +03:00
|
|
|
<link
|
2026-02-10 13:08:07 +03:00
|
|
|
rel="preload"
|
|
|
|
|
as="style"
|
2026-02-18 17:39:24 +03:00
|
|
|
href="https://fonts.googleapis.com/css2?family=Barlow:ital,wght@0,100;0,200;1,100;1,200&family=Karla:wght@200..800&family=Major+Mono+Display&display=swap"
|
|
|
|
|
/>
|
2026-02-04 10:48:40 +03:00
|
|
|
<link
|
|
|
|
|
rel="stylesheet"
|
2026-02-18 17:39:24 +03:00
|
|
|
href="https://fonts.googleapis.com/css2?family=Barlow:ital,wght@0,100;0,200;1,100;1,200&family=Karla:wght@200..800&family=Major+Mono+Display&display=swap"
|
2026-02-10 13:08:07 +03:00
|
|
|
media="print"
|
|
|
|
|
onload={(e => ((e.currentTarget as HTMLLinkElement).media = 'all'))}
|
2026-02-18 17:39:24 +03:00
|
|
|
/>
|
2026-02-10 13:08:07 +03:00
|
|
|
<noscript>
|
|
|
|
|
<link
|
|
|
|
|
rel="stylesheet"
|
2026-02-18 17:39:24 +03:00
|
|
|
href="https://fonts.googleapis.com/css2?family=Barlow:ital,wght@0,100;0,200;1,100;1,200&family=Karla:wght@200..800&family=Major+Mono+Display&display=swap"
|
|
|
|
|
/>
|
2026-02-10 13:08:07 +03:00
|
|
|
</noscript>
|
2026-02-18 17:39:24 +03:00
|
|
|
<title>Compare Typography & Typefaces | GlyphDiff</title>
|
2026-01-02 16:09:03 +03:00
|
|
|
</svelte:head>
|
|
|
|
|
|
2026-02-06 14:20:32 +03:00
|
|
|
<ResponsiveProvider>
|
|
|
|
|
<div id="app-root" class="min-h-screen flex flex-col bg-background">
|
|
|
|
|
<header>
|
|
|
|
|
<BreadcrumbHeader />
|
|
|
|
|
</header>
|
2026-01-02 16:09:03 +03:00
|
|
|
|
2026-02-06 14:20:32 +03:00
|
|
|
<!-- <ScrollArea class="h-screen w-screen"> -->
|
2026-02-18 17:39:24 +03:00
|
|
|
<main class="flex-1 w-full mx-auto px-4 pt-0 pb-10 sm:px-6 sm:pt-8 sm:pb-12 md:px-8 md:pt-10 md:pb-16 lg:px-10 lg:pt-12 lg:pb-20 xl:px-16 relative">
|
2026-02-06 14:20:32 +03:00
|
|
|
<TooltipProvider>
|
2026-02-10 13:08:07 +03:00
|
|
|
{#if fontsReady}
|
|
|
|
|
{@render children?.()}
|
|
|
|
|
{/if}
|
2026-02-06 14:20:32 +03:00
|
|
|
</TooltipProvider>
|
|
|
|
|
</main>
|
|
|
|
|
<!-- </ScrollArea> -->
|
|
|
|
|
<footer></footer>
|
|
|
|
|
</div>
|
|
|
|
|
</ResponsiveProvider>
|