mirror of
https://github.com/kogakure/website-astro-stefanimhoff.de.git
synced 2026-02-03 20:15:27 +00:00
feat: add webfont with global CSS and preloading
This commit is contained in:
BIN
public/assets/fonts/secuela-italic-vf.woff
Normal file
BIN
public/assets/fonts/secuela-italic-vf.woff
Normal file
Binary file not shown.
BIN
public/assets/fonts/secuela-italic-vf.woff2
Normal file
BIN
public/assets/fonts/secuela-italic-vf.woff2
Normal file
Binary file not shown.
BIN
public/assets/fonts/secuela-regular-vf.woff
Normal file
BIN
public/assets/fonts/secuela-regular-vf.woff
Normal file
Binary file not shown.
BIN
public/assets/fonts/secuela-regular-vf.woff2
Normal file
BIN
public/assets/fonts/secuela-regular-vf.woff2
Normal file
Binary file not shown.
@@ -17,6 +17,21 @@ const { title } = Astro.props;
|
|||||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||||
<meta name="generator" content={Astro.generator} />
|
<meta name="generator" content={Astro.generator} />
|
||||||
<title>{title}</title>
|
<title>{title}</title>
|
||||||
|
|
||||||
|
<link
|
||||||
|
rel="preload"
|
||||||
|
href="/assets/fonts/secuela-regular-vf.woff2"
|
||||||
|
as="font"
|
||||||
|
type="font/woff2"
|
||||||
|
crossorigin
|
||||||
|
/>
|
||||||
|
<link
|
||||||
|
rel="preload"
|
||||||
|
href="/assets/fonts/secuela-italic-vf.woff2"
|
||||||
|
as="font"
|
||||||
|
type="font/woff2"
|
||||||
|
crossorigin
|
||||||
|
/>
|
||||||
</head>
|
</head>
|
||||||
<body class="flex h-screen flex-col font-sans font-normal leading-relaxed">
|
<body class="flex h-screen flex-col font-sans font-normal leading-relaxed">
|
||||||
<slot />
|
<slot />
|
||||||
|
|||||||
17
src/styles/fonts.css
Normal file
17
src/styles/fonts.css
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
@font-face {
|
||||||
|
font-display: swap;
|
||||||
|
font-family: 'SecuelaVariable';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 1 999;
|
||||||
|
src: url('/assets/fonts/secuela-regular-vf.woff2') format('woff2'),
|
||||||
|
url('/assets/fonts/secuela-regular-vf.woff') format('woff');
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-display: swap;
|
||||||
|
font-family: 'SecuelaVariable';
|
||||||
|
font-style: italic;
|
||||||
|
font-weight: 1 999;
|
||||||
|
src: url('/assets/fonts/secuela-italic-vf.woff2') format('woff2'),
|
||||||
|
url('/assets/fonts/secuela-italic-vf.woff') format('woff');
|
||||||
|
}
|
||||||
1
src/styles/global.css
Normal file
1
src/styles/global.css
Normal file
@@ -0,0 +1 @@
|
|||||||
|
@import 'fonts.css';
|
||||||
Reference in New Issue
Block a user