feat: use system fonts
Uses a [modern font stack](https://modernfontstacks.com/) to avoid a cumulative layout shift and improve performance. Appearance of typography will be slightly different across platforms but such is the nature of the web. The typeface we used is not central to our branding and modern system fonts are more than acceptable in return for improved performance. Fixes https://codeberg.org/forgejo/website/issues/338.
This commit is contained in:
parent
acf7dc032b
commit
03798cf7fe
5 changed files with 1 additions and 15 deletions
|
@ -34,7 +34,6 @@
|
|||
"@astrojs/sitemap": "^3.0.0",
|
||||
"@astrojs/tailwind": "^5.0.0",
|
||||
"@astrolib/seo": "^0.6.0",
|
||||
"@fontsource-variable/inter": "^5.0.8",
|
||||
"@tailwindcss/typography": "^0.5.9",
|
||||
"@types/sanitize-html": "^2.9.0",
|
||||
"@types/slug": "^5.0.4",
|
||||
|
|
7
pnpm-lock.yaml
generated
7
pnpm-lock.yaml
generated
|
@ -23,9 +23,6 @@ devDependencies:
|
|||
'@astrolib/seo':
|
||||
specifier: ^0.6.0
|
||||
version: 0.6.0(astro@3.0.3)
|
||||
'@fontsource-variable/inter':
|
||||
specifier: ^5.0.8
|
||||
version: 5.0.8
|
||||
'@tailwindcss/typography':
|
||||
specifier: ^0.5.9
|
||||
version: 0.5.9(tailwindcss@3.3.3)
|
||||
|
@ -983,10 +980,6 @@ packages:
|
|||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
dev: true
|
||||
|
||||
/@fontsource-variable/inter@5.0.8:
|
||||
resolution: {integrity: sha512-WkYfFNccmEIeL2fNg0mYeLWqOoB7xD8MFxFRc4IwbSP2o8ZaBt36v5aW4by4MyrgGRMNk7uNi5LbvYKq6clPjw==}
|
||||
dev: true
|
||||
|
||||
/@humanwhocodes/config-array@0.11.11:
|
||||
resolution: {integrity: sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA==}
|
||||
engines: {node: '>=10.10.0'}
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
---
|
||||
import '@fontsource-variable/inter';
|
||||
---
|
|
@ -6,7 +6,6 @@ import { getRelativeUrlByFilePath } from '~/utils/directories';
|
|||
import ogPreviewImage from '~/assets/images/og-preview.png';
|
||||
|
||||
import { SITE } from '~/config.js';
|
||||
import Fonts from '../atoms/Fonts.astro';
|
||||
import ExtraMetaTags from '../atoms/ExtraMetaTags.astro';
|
||||
|
||||
const { src: defaultImage } = await getImage({
|
||||
|
@ -70,6 +69,4 @@ const image =
|
|||
additionalLinkTags={additionalLinkTags}
|
||||
/>
|
||||
|
||||
<Fonts />
|
||||
|
||||
<ExtraMetaTags />
|
||||
|
|
|
@ -24,7 +24,7 @@ export default {
|
|||
},
|
||||
},
|
||||
fontFamily: {
|
||||
sans: ["'Inter Variable'", ...defaultTheme.fontFamily.sans],
|
||||
sans: [...defaultTheme.fontFamily.sans],
|
||||
},
|
||||
typography: ({ theme }: { theme: PluginUtils['theme'] }) => ({
|
||||
steel: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue