Skip to content

Commit

Permalink
Fix build warning about the fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
javisperez committed Mar 4, 2024
1 parent d6c7604 commit 030cc12
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 40 deletions.
10 changes: 9 additions & 1 deletion docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { URL, fileURLToPath } from 'node:url'

import { resolve } from 'path'
import { defineConfig } from 'vitepress'

// https://vitepress.dev/reference/site-config
Expand Down Expand Up @@ -136,6 +136,14 @@ export default defineConfig({
replacement: fileURLToPath(
new URL('./theme/components/Footer.vue', import.meta.url)
)
},
{
find: '@',
replacement: resolve(__dirname, '../src'),
},
{
find: '$public',
replacement: resolve(__dirname, '../src/public')
}
]
}
Expand Down
55 changes: 16 additions & 39 deletions docs/.vitepress/theme/assets/css/fonts.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,146 +3,123 @@
font-weight: 200;
font-style: normal;
font-display: swap;
src: local('Rubik'), url(/fonts/titillium-web/TitilliumWeb-ExtraLight.ttf) format('truetype');
src: local('Rubik'), url($public/fonts/titillium-web/TitilliumWeb-ExtraLight.ttf) format('truetype');
}

@font-face {
font-family: 'Titillium Web';
font-weight: 200;
font-style: italic;
font-display: swap;
src: local('Rubik'), url(/fonts/titillium-web/TitilliumWeb-ExtraLightItalic.ttf) format('truetype');
src: local('Rubik'), url($public/fonts/titillium-web/TitilliumWeb-ExtraLightItalic.ttf) format('truetype');
}

@font-face {
font-family: 'Titillium Web';
font-weight: 300;
font-style: normal;
font-display: swap;
src: local('Rubik'), url(/fonts/titillium-web/TitilliumWeb-Light.ttf) format('truetype');
src: local('Rubik'), url($public/fonts/titillium-web/TitilliumWeb-Light.ttf) format('truetype');
}

@font-face {
font-family: 'Titillium Web';
font-weight: 300;
font-style: italic;
font-display: swap;
src: local('Rubik'), url(/fonts/titillium-web/TitilliumWeb-LightItalic.ttf) format('truetype');
src: local('Rubik'), url($public/fonts/titillium-web/TitilliumWeb-LightItalic.ttf) format('truetype');
}

@font-face {
font-family: 'Titillium Web';
font-weight: 400;
font-style: normal;
font-display: swap;
src: local('Rubik'), url(/fonts/titillium-web/TitilliumWeb-Regular.ttf) format('truetype');
src: local('Rubik'), url($public/fonts/titillium-web/TitilliumWeb-Regular.ttf) format('truetype');
}

@font-face {
font-family: 'Titillium Web';
font-weight: 400;
font-style: italic;
font-display: swap;
src: local('Rubik'), url(/fonts/titillium-web/TitilliumWeb-Italic.ttf) format('truetype');
src: local('Rubik'), url($public/fonts/titillium-web/TitilliumWeb-Italic.ttf) format('truetype');
}

@font-face {
font-family: 'Titillium Web';
font-weight: 600;
font-style: normal;
font-display: swap;
src: local('Rubik'), url(/fonts/titillium-web/TitilliumWeb-SemiBold.ttf) format('truetype');
src: local('Rubik'), url($public/fonts/titillium-web/TitilliumWeb-SemiBold.ttf) format('truetype');
}
@font-face {
font-family: 'Titillium Web';
font-weight: 600;
font-style: italic;
font-display: swap;
src: local('Rubik'), url(/fonts/titillium-web/TitilliumWeb-SemiBoldItalic.ttf) format('truetype');
src: local('Rubik'), url($public/fonts/titillium-web/TitilliumWeb-SemiBoldItalic.ttf) format('truetype');
}

@font-face {
font-family: 'Titillium Web';
font-weight: 700;
font-style: normal;
font-display: swap;
src: local('Rubik'), url(/fonts/titillium-web/TitilliumWeb-Bold.ttf) format('truetype');
src: local('Rubik'), url($public/fonts/titillium-web/TitilliumWeb-Bold.ttf) format('truetype');
}
@font-face {
font-family: 'Titillium Web';
font-weight: 700;
font-style: italic;
font-display: swap;
src: local('Rubik'), url(/fonts/titillium-web/TitilliumWeb-BoldItalic.ttf) format('truetype');
}

@font-face {
font-family: 'Titillium Web';
font-weight: 800;
font-style: normal;
font-display: swap;
src: local('Rubik'), url(/fonts/titillium-web/TitilliumWeb-ExtraBold.ttf) format('truetype');
}
@font-face {
font-family: 'Titillium Web';
font-weight: 800;
font-style: italic;
font-display: swap;
src: local('Rubik'), url(/fonts/titillium-web/TitilliumWeb-ExtraBoldItalic.ttf) format('truetype');
src: local('Rubik'), url($public/fonts/titillium-web/TitilliumWeb-BoldItalic.ttf) format('truetype');
}

@font-face {
font-family: 'Titillium Web';
font-weight: 900;
font-style: normal;
font-display: swap;
src: local('Rubik'), url(/fonts/titillium-web/TitilliumWeb-Black.ttf) format('truetype');
}

@font-face {
font-family: 'Titillium Web';
font-weight: 900;
font-style: italic;
font-display: swap;
src: local('Rubik'), url(/fonts/titillium-web/TitilliumWeb-BlackItalic.ttf) format('truetype');
src: local('Rubik'), url($public/fonts/titillium-web/TitilliumWeb-Black.ttf) format('truetype');
}

@font-face {
font-family: 'Atkinson Hyperlegible';
font-weight: 400;
font-style: normal;
font-display: swap;
src: local('Rubik'), url(/fonts/atkinson-hyperlegible/AtkinsonHyperlegible-Regular.ttf) format('truetype');
src: local('Rubik'), url($public/fonts/atkinson-hyperlegible/AtkinsonHyperlegible-Regular.ttf) format('truetype');
}

@font-face {
font-family: 'Atkinson Hyperlegible';
font-weight: 400;
font-style: italic;
font-display: swap;
src: local('Rubik'), url(/fonts/atkinson-hyperlegible/AtkinsonHyperlegible-Italic.ttf) format('truetype');
src: local('Rubik'), url($public/fonts/atkinson-hyperlegible/AtkinsonHyperlegible-Italic.ttf) format('truetype');
}

@font-face {
font-family: 'Atkinson Hyperlegible';
font-weight: 700;
font-style: normal;
font-display: swap;
src: local('Rubik'), url(/fonts/atkinson-hyperlegible/AtkinsonHyperlegible-Bold.ttf) format('truetype');
src: local('Rubik'), url($public/fonts/atkinson-hyperlegible/AtkinsonHyperlegible-Bold.ttf) format('truetype');
}

@font-face {
font-family: 'Atkinson Hyperlegible';
font-weight: 700;
font-style: italic;
font-display: swap;
src: local('Rubik'), url(/fonts/atkinson-hyperlegible/AtkinsonHyperlegible-BoldItalic.ttf) format('truetype');
src: local('Rubik'), url($public/fonts/atkinson-hyperlegible/AtkinsonHyperlegible-BoldItalic.ttf) format('truetype');
}

@font-face {
font-family: 'Major Mono Display';
font-weight: 400;
font-style: normal;
font-display: swap;
src: local('Rubik'), url(/fonts/major-mono-display/MajorMonoDisplay-Regular.ttf) format('truetype');
src: local('Rubik'), url($public/fonts/major-mono-display/MajorMonoDisplay-Regular.ttf) format('truetype');
}

0 comments on commit 030cc12

Please sign in to comment.