From b6b4c02d86667383ef7e7f300bae6e744ce8222a Mon Sep 17 00:00:00 2001 From: Adam Matthiesen Date: Sun, 22 Dec 2024 04:37:18 -0800 Subject: [PATCH] Refactor font loading logic in BaseHead.astro and add font preload for onest font --- .../src/layouts/AuthLayout.astro | 11 +++++++-- .../src/components/BaseHead.astro | 24 +++++++------------ .../src/components/Layout.astro | 3 ++- 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/packages/studiocms_auth/src/layouts/AuthLayout.astro b/packages/studiocms_auth/src/layouts/AuthLayout.astro index a2f7c6d94..09e5af045 100644 --- a/packages/studiocms_auth/src/layouts/AuthLayout.astro +++ b/packages/studiocms_auth/src/layouts/AuthLayout.astro @@ -35,16 +35,23 @@ const fallbackImageSrc = + {/* Global Metadata */} + + + {/* Favicon */} - - + + {/* Primary Meta Tags */} {title} + + {/* Fonts */} + diff --git a/packages/studiocms_dashboard/src/components/BaseHead.astro b/packages/studiocms_dashboard/src/components/BaseHead.astro index b83ac905c..c398fc778 100644 --- a/packages/studiocms_dashboard/src/components/BaseHead.astro +++ b/packages/studiocms_dashboard/src/components/BaseHead.astro @@ -3,7 +3,7 @@ import '../styles/base.css'; import '@fontsource-variable/onest/index.css'; import { ClientRouter } from 'astro:transitions'; import { Generator } from 'studiocms:components'; -import { isDashboardRoute } from '../utils'; +import onestWoff2 from '@fontsource-variable/onest/files/onest-latin-wght-normal.woff2?url'; export interface Props { title: string; @@ -16,7 +16,11 @@ const { title, description } = Astro.props; {/* HTMX - v2.0.2 */} - + {/* + +