2026-03-02 22:21:19 +03:00
|
|
|
<!--
|
|
|
|
|
Component: Layout
|
|
|
|
|
Application shell with providers and page wrapper
|
|
|
|
|
-->
|
2026-01-02 16:09:03 +03:00
|
|
|
<script lang="ts">
|
2026-03-02 22:21:19 +03:00
|
|
|
import { themeManager } from '$features/ChangeAppTheme';
|
2026-04-22 13:00:29 +03:00
|
|
|
import G from '$shared/assets/G.svg';
|
2026-02-06 14:20:32 +03:00
|
|
|
import { ResponsiveProvider } from '$shared/lib';
|
2026-04-23 09:48:32 +03:00
|
|
|
import { cn } from '$shared/lib';
|
2026-04-22 13:01:46 +03:00
|
|
|
import { Footer } from '$widgets/Footer';
|
|
|
|
|
|
2026-02-10 13:08:07 +03:00
|
|
|
import {
|
|
|
|
|
type Snippet,
|
2026-02-27 12:23:31 +03:00
|
|
|
onDestroy,
|
2026-02-10 13:08:07 +03:00
|
|
|
onMount,
|
|
|
|
|
} from 'svelte';
|
2026-01-24 15:32:01 +03:00
|
|
|
|
|
|
|
|
interface Props {
|
2026-03-02 22:21:19 +03:00
|
|
|
/**
|
|
|
|
|
* Content snippet
|
|
|
|
|
*/
|
2026-01-24 15:32:01 +03:00
|
|
|
children: Snippet;
|
|
|
|
|
}
|
2026-01-02 16:09:03 +03:00
|
|
|
|
2026-01-24 15:32:01 +03:00
|
|
|
let { children }: Props = $props();
|
2026-03-02 22:21:19 +03:00
|
|
|
let fontsReady = $state(true);
|
2026-02-27 12:23:31 +03:00
|
|
|
const theme = $derived(themeManager.value);
|
2026-02-10 13:08:07 +03:00
|
|
|
|
2026-02-27 12:23:31 +03:00
|
|
|
onMount(() => themeManager.init());
|
|
|
|
|
onDestroy(() => themeManager.destroy());
|
2026-01-02 16:09:03 +03:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<svelte:head>
|
2026-04-22 13:00:29 +03:00
|
|
|
<link rel="icon" href={G} type="image/svg+xml" />
|
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-25 10:02:18 +03:00
|
|
|
href="https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Space+Grotesk:wght@300..700&family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&family=Syne:wght@800&display=swap"
|
2026-02-18 17:39:24 +03:00
|
|
|
/>
|
2026-02-04 10:48:40 +03:00
|
|
|
<link
|
|
|
|
|
rel="stylesheet"
|
2026-02-25 10:02:18 +03:00
|
|
|
href="https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Space+Grotesk:wght@300..700&family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&family=Syne:wght@800&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-25 10:02:18 +03:00
|
|
|
href="https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Space+Grotesk:wght@300..700&family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&family=Syne:wght@800&display=swap"
|
2026-02-18 17:39:24 +03:00
|
|
|
/>
|
2026-02-10 13:08:07 +03:00
|
|
|
</noscript>
|
2026-03-02 22:21:19 +03:00
|
|
|
<title>GlyphDiff | Typography & Typefaces</title>
|
2026-04-19 19:15:46 +03:00
|
|
|
<meta
|
|
|
|
|
name="description"
|
|
|
|
|
content="Compare typefaces side by side. Adjust size, weight, leading, and tracking to find the perfect typographic pairing."
|
|
|
|
|
/>
|
2026-01-02 16:09:03 +03:00
|
|
|
</svelte:head>
|
|
|
|
|
|
2026-02-06 14:20:32 +03:00
|
|
|
<ResponsiveProvider>
|
2026-02-27 12:23:31 +03:00
|
|
|
<div
|
|
|
|
|
id="app-root"
|
2026-04-23 09:48:32 +03:00
|
|
|
class={cn(
|
2026-05-25 10:20:40 +03:00
|
|
|
'min-h-dvh w-auto flex flex-col surface-canvas relative',
|
2026-02-27 12:23:31 +03:00
|
|
|
theme === 'dark' ? 'dark' : '',
|
|
|
|
|
)}
|
|
|
|
|
>
|
2026-04-17 13:20:01 +03:00
|
|
|
{#if fontsReady}
|
|
|
|
|
{@render children?.()}
|
|
|
|
|
{/if}
|
2026-04-22 13:01:46 +03:00
|
|
|
|
|
|
|
|
<Footer />
|
2026-02-06 14:20:32 +03:00
|
|
|
</div>
|
|
|
|
|
</ResponsiveProvider>
|