chore(style.css): update font paths to use a variable for the fonts directory

chore(vite.config.ts): import the resolve function from the path module
This commit is contained in:
Danny Avila 2023-08-09 09:36:50 -04:00 committed by Danny Avila
parent b096fb98ce
commit 193ed93ee8
2 changed files with 15 additions and 14 deletions

View file

@ -13,7 +13,7 @@
font-family: Signifier;
font-style: normal;
font-weight: 400;
src: url("../fonts/signifier-light.woff2") format("woff2")
src: url("$fonts/signifier-light.woff2") format("woff2")
}
@font-face {
@ -21,7 +21,7 @@
font-family: Signifier;
font-style: italic;
font-weight: 400;
src: url("../fonts/signifier-light-italic.woff2") format("woff2")
src: url("$fonts/signifier-light-italic.woff2") format("woff2")
}
@font-face {
@ -29,7 +29,7 @@
font-family: Signifier;
font-style: normal;
font-weight: 700;
src: url("../fonts/signifier-bold.woff2") format("woff2")
src: url("$fonts/signifier-bold.woff2") format("woff2")
}
@font-face {
@ -37,7 +37,7 @@
font-family: Signifier;
font-style: italic;
font-weight: 700;
src: url("../fonts/signifier-bold-italic.woff2") format("woff2")
src: url("$fonts/signifier-bold-italic.woff2") format("woff2")
}
@font-face {
@ -45,7 +45,7 @@
font-family: Söhne;
font-style: normal;
font-weight: 400;
src: url("../fonts/soehne-buch.woff2") format("woff2")
src: url("$fonts/soehne-buch.woff2") format("woff2")
}
@font-face {
@ -53,7 +53,7 @@
font-family: Söhne;
font-style: italic;
font-weight: 400;
src: url("../fonts/soehne-buch-kursiv.woff2") format("woff2")
src: url("$fonts/soehne-buch-kursiv.woff2") format("woff2")
}
@font-face {
@ -61,7 +61,7 @@
font-family: Söhne;
font-style: normal;
font-weight: 500;
src: url("../fonts/soehne-kraftig.woff2") format("woff2")
src: url("$fonts/soehne-kraftig.woff2") format("woff2")
}
@font-face {
@ -69,7 +69,7 @@
font-family: Söhne;
font-style: italic;
font-weight: 500;
src: url("../fonts/soehne-kraftig-kursiv.woff2") format("woff2")
src: url("$fonts/soehne-kraftig-kursiv.woff2") format("woff2")
}
@font-face {
@ -77,7 +77,7 @@
font-family: Söhne;
font-style: normal;
font-weight: 600;
src: url("../fonts/soehne-halbfett.woff2") format("woff2")
src: url("$fonts/soehne-halbfett.woff2") format("woff2")
}
@font-face {
@ -85,7 +85,7 @@
font-family: Söhne;
font-style: italic;
font-weight: 600;
src: url("../fonts/soehne-halbfett-kursiv.woff2") format("woff2")
src: url("$fonts/soehne-halbfett-kursiv.woff2") format("woff2")
}
@font-face {
@ -93,7 +93,7 @@
font-family: Söhne Mono;
font-style: normal;
font-weight: 400;
src: url("../fonts/soehne-mono-buch.woff2") format("woff2")
src: url("$fonts/soehne-mono-buch.woff2") format("woff2")
}
@font-face {
@ -101,7 +101,7 @@
font-family: Söhne Mono;
font-style: normal;
font-weight: 700;
src: url("../fonts/soehne-mono-halbfett.woff2") format("woff2")
src: url("$fonts/soehne-mono-halbfett.woff2") format("woff2")
}
@font-face {
@ -109,7 +109,7 @@
font-family: Söhne Mono;
font-style: italic;
font-weight: 400;
src: url("../fonts/soehne-mono-buch-kursiv.woff2") format("woff2")
src: url("$fonts/soehne-mono-buch-kursiv.woff2") format("woff2")
}
/* * {

View file

@ -1,6 +1,6 @@
import { defineConfig, loadEnv } from 'vite';
import react from '@vitejs/plugin-react';
import path from 'path';
import path, { resolve } from 'path';
import type { Plugin } from 'vite';
// https://vitejs.dev/config/
@ -42,6 +42,7 @@ export default defineConfig({
resolve: {
alias: {
'~': path.join(__dirname, 'src/'),
$fonts: resolve('public/fonts'),
},
},
});