Add font-family settings and asset fonts

This commit is contained in:
Torsten Dittmann
2025-11-27 14:11:02 +04:00
parent 6a5c06c8d6
commit 8ce319f4b5
4 changed files with 102 additions and 5 deletions
+7 -3
View File
@@ -1,7 +1,7 @@
<script lang="ts">
import { browser } from '$app/environment';
import { afterNavigate, goto } from '$app/navigation';
import { base } from '$app/paths';
import { asset, base } from '$app/paths';
import { page } from '$app/state';
import { trackPageView } from '$lib/actions/analytics';
import { Notifications, Progress } from '$lib/layout';
@@ -181,8 +181,10 @@
{#each preloadFontsCloud as font}
<link rel="preload" href={font} as="font" type="font/woff2" crossorigin="anonymous" />
{/each}
<link rel="preload" as="style" type="text/css" href="{base}/fonts/cloud.css" />
<link rel="stylesheet" href={`${base}/fonts/cloud.css`} />
{#if resolvedProfile.id === ProfileMode.CONSOLE}
<link rel="preload" as="style" type="text/css" href="{base}/fonts/cloud.css" />
<link rel="stylesheet" href={`${base}/fonts/cloud.css`} />
{/if}
{/if}
<link rel="stylesheet" href={resolvedProfile.css} />
@@ -190,6 +192,8 @@
{#if resolvedProfile.id === ProfileMode.STUDIO}
<link rel="preload" as="style" type="text/css" href={CDN_CSS_URL} />
<link rel="preload" as="script" type="text/javascript" href={CDN_URL} />
<link rel="preload" as="style" type="text/css" href={asset('/fonts/studio.css')} />
<link rel="stylesheet" href={asset('/fonts/studio.css')} />
{/if}
</svelte:head>
+3 -1
View File
@@ -2,5 +2,7 @@
"bgcolor-accent": "var(--neutral-50)",
"bgcolor-accent-secondary": "var(--neutral-100)",
"bgcolor-accent-tertiary": "var(--neutral-150)",
"fgcolor-on-accent": "var(--neutral-950)"
"fgcolor-on-accent": "var(--neutral-950)",
"font-family-brand": "neue-haas-grotesk-display",
"font-family-sansserif": "neue-haas-grotesk-text"
}
+3 -1
View File
@@ -1,5 +1,7 @@
{
"bgcolor-accent": "var(--neutral-1000)",
"bgcolor-accent-secondary": "var(--neutral-900)",
"bgcolor-accent-tertiary": "var(--neutral-850)"
"bgcolor-accent-tertiary": "var(--neutral-850)",
"font-family-brand": "neue-haas-grotesk-display",
"font-family-sansserif": "neue-haas-grotesk-text"
}