From 245ad3a6252d262fa2a483d9c82b2b0e8c1eb284 Mon Sep 17 00:00:00 2001 From: Alexander Daichendt Date: Wed, 1 Jan 2025 15:28:23 +0100 Subject: [PATCH] fix: properly load ubuntu font --- src/components/BaseHead.astro | 26 ++++---- src/layouts/BaseLayout.astro | 108 +++++++++++++++++----------------- src/styles/global.css | 2 +- 3 files changed, 68 insertions(+), 68 deletions(-) diff --git a/src/components/BaseHead.astro b/src/components/BaseHead.astro index a2d6315..2b2cae6 100644 --- a/src/components/BaseHead.astro +++ b/src/components/BaseHead.astro @@ -6,9 +6,9 @@ import ubuntuRegularWoff2 from "@fontsource/ubuntu/files/ubuntu-latin-400-normal import ubuntuBoldWoff2 from "@fontsource/ubuntu/files/ubuntu-latin-700-normal.woff2?url"; interface Props { - title: string; - description: string; - image?: string; + title: string; + description: string; + image?: string; } const canonicalURL = new URL(Astro.url.pathname, Astro.site); @@ -24,18 +24,18 @@ const { title, description, image = "/blog-placeholder-1.jpg" } = Astro.props; diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index ccb8e57..4b0293b 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -4,10 +4,12 @@ import Header from "../components/Header.astro"; import Footer from "../components/Footer.astro"; import { SITE_TITLE, SITE_DESCRIPTION } from "../consts"; import DarkModeToggle from "../components/DarkModeToggle.astro"; +import "@fontsource/ubuntu"; +import "@fontsource/ubuntu/700.css"; interface Props { - title?: string; - description?: string; + title?: string; + description?: string; } const { title = SITE_TITLE, description = SITE_DESCRIPTION } = Astro.props; @@ -15,61 +17,59 @@ const { title = SITE_TITLE, description = SITE_DESCRIPTION } = Astro.props; - - - - - - -
-
-

- {SITE_TITLE} -

- -
+ + + + + + +
+
+

+ {SITE_TITLE} +

+ +
-
+
-
- -
-
+
+ +
+
- - +