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

@@ -1,17 +1,6 @@
import sveltePreprocess from 'svelte-preprocess'
import Icons from 'unplugin-icons/vite'
import svelteSvg from '@poppanator/sveltekit-svg'
export const preprocess = sveltePreprocess({
postcss: true,
preserve: ['ld+json'],
})
export const plugins = [
svelteSvg(),
Icons({
compiler: 'svelte',
defaultClass: 'icon',
scale: 1,
}),
]

11
src/config/vite.js Normal file
View File

@@ -0,0 +1,11 @@
import Icons from 'unplugin-icons/vite'
import svelteSvg from '@poppanator/sveltekit-svg'
export const plugins = [
svelteSvg(),
Icons({
compiler: 'svelte',
defaultClass: 'icon',
scale: 1,
}),
]

View File

@@ -1,7 +1,7 @@
.base {
background-color: var(--color-bg);
color: var(--color-text);
font-family: var(--font-standard);
font-family: var(--body-font);
font-size: var(--font-size);
font-weight: var(--font-weight-regular);

View File

@@ -14,8 +14,36 @@
--font-weight-bold: 700;
/* Font stacks */
--body-font: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica Neue, Helvetica,
--body-font: Inter, Times;
/* --body-font: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica Neue, Helvetica,
Oxygen, Ubuntu, Roboto, Cantarell, Fira Sans, Droid Sans, 'Apple Color Emoji', 'Segoe UI Emoji',
Arial, sans-serif;
Arial, sans-serif; */
--mono-font: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
/* inter-regular - latin */
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 400;
font-display: fallback;
src: local(''), url('/assets/fonts/InterRegular.woff2') format('woff2');
}
/* inter-600 - latin */
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 600;
font-display: fallback;
src: local(''), url('/assets/fonts/InterSemiBold.woff2') format('woff2');
}
/* inter-700 - latin */
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 700;
font-display: fallback;
src: local(''), url('/assets/fonts/InterBold.woff2') format('woff2');
}
}