From e028782c14356a5efaaa72b01cf34c30a4357df6 Mon Sep 17 00:00:00 2001 From: Elad Rosenheim Date: Tue, 23 Apr 2024 18:40:54 +0300 Subject: Inline Netlify logo, preload fonts (#10) --- src/assets/noise.png | Bin 0 -> 5812 bytes src/components/Header.astro | 5 +++-- src/components/Logo.astro | 38 ++++++++++++++++++++++++++++++++++++++ src/layouts/Layout.astro | 5 +++++ 4 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 src/assets/noise.png create mode 100644 src/components/Logo.astro (limited to 'src') diff --git a/src/assets/noise.png b/src/assets/noise.png new file mode 100644 index 0000000..96950c7 Binary files /dev/null and b/src/assets/noise.png differ diff --git a/src/components/Header.astro b/src/components/Header.astro index e06ea28..0d7a700 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -1,4 +1,6 @@ --- +import Logo from '../components/Logo.astro'; + const navItems = [ { linkText: 'Home', href: '/' }, { linkText: 'Revalidation', href: '/revalidation' }, @@ -10,7 +12,7 @@ const navItems = [ - diff --git a/src/components/Logo.astro b/src/components/Logo.astro new file mode 100644 index 0000000..71f3ea1 --- /dev/null +++ b/src/components/Logo.astro @@ -0,0 +1,38 @@ +--- +// Improvement idea: get actual width as props, and auto-set height by correct aspect-ratio +--- + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 5b37dd5..a105d7b 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -2,6 +2,9 @@ import '../../src/styles/globals.css'; import '@fontsource/inter/400.css'; import '@fontsource/inter/800.css'; +import interFont400 from '@fontsource/inter/files/inter-latin-400-normal.woff2?url'; +import interFont800 from '@fontsource/inter/files/inter-latin-800-normal.woff2?url'; + import Header from '../components/Header.astro'; import Footer from '../components/Footer.astro'; @@ -20,6 +23,8 @@ const { title } = Astro.props; + +
-- cgit v1.2.3