Self-host fonts + Move Vite plugins export

This commit is contained in:
venashial
2022-07-28 22:45:53 -07:00
parent 95d6dac055
commit 533f0213e3
12 changed files with 87 additions and 55 deletions

View File

@@ -2,9 +2,27 @@
<html lang="en" data-color-mode="light">
<head>
<meta charset="utf-8" />
<meta name="description" content="" />
<link rel="icon" href="%sveltekit.assets%/assets/omorphia.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" href="%sveltekit.assets%/assets/omorphia.png" />
<link
rel="preload"
href="/assets/fonts/InterRegular.woff2"
as="font"
type="font/woff2"
crossorigin />
<link
rel="preload"
href="/assets/fonts/InterBold.woff2"
as="font"
type="font/woff2"
crossorigin />
<link
rel="preload"
href="/assets/fonts/InterSemiBold.woff2"
as="font"
type="font/woff2"
crossorigin />
<meta name="theme-color" content="#CF1971" />
<meta name="twitter:card" content="summary" />

View File

@@ -142,7 +142,23 @@ Add the `base` class and a theme to the `<body>` tag in `src/app.html`:
</body>
```
## `7.` Using Omorphia
## `7.` Setup fonts
Copy the the `fonts/` folder from [Omorphia's repository](https://github.com/modrinth/omorphia/blob/main/docs/static/assets/fonts) and place them in the `/assets` folder at the root of your project.
Add the following preload tags to your head in `app.html` to speed up font loading:
<!-- prettier-ignore-start -->
```html
<head>
<link rel="preload" href="/assets/fonts/InterRegular.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="/assets/fonts/InterBold.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="/assets/fonts/InterSemiBold.woff2" as="font" type="font/woff2" crossorigin>
</head>
```
<!-- prettier-ignore-end -->
## `8.` Using Omorphia
### Developing

BIN
docs/static/assets/fonts/InterBold.woff2 vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.