Skip to content

Commit

Permalink
chore(style.css): update font paths to use a variable for the fonts d…
Browse files Browse the repository at this point in the history
…irectory

chore(vite.config.ts): import the resolve function from the path module
  • Loading branch information
danny-avila committed Aug 9, 2023
1 parent b096fb9 commit 193ed93
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
26 changes: 13 additions & 13 deletions client/src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,103 +13,103 @@
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 {
font-display: swap;
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 {
font-display: swap;
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 {
font-display: swap;
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 {
font-display: swap;
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 {
font-display: swap;
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 {
font-display: swap;
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 {
font-display: swap;
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 {
font-display: swap;
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 {
font-display: swap;
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 {
font-display: swap;
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 {
font-display: swap;
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 {
font-display: swap;
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")
}

/* * {
Expand Down
3 changes: 2 additions & 1 deletion client/vite.config.ts
Original file line number Diff line number Diff line change
@@ -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/
Expand Down Expand Up @@ -42,6 +42,7 @@ export default defineConfig({
resolve: {
alias: {
'~': path.join(__dirname, 'src/'),
$fonts: resolve('public/fonts'),
},
},
});
Expand Down

0 comments on commit 193ed93

Please sign in to comment.