Skip to content

Commit

Permalink
feat: use @nuxt/fonts for font download
Browse files Browse the repository at this point in the history
  • Loading branch information
becem-gharbi committed Feb 28, 2024
1 parent c8db3ff commit 7a8fefe
Show file tree
Hide file tree
Showing 5 changed files with 181 additions and 16 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ dist

docker-compose.yml
.netlify
uploads
uploads
.data
4 changes: 4 additions & 0 deletions assets/styles/main.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
:root {
font-family: 'Rubik';
}

.page {
min-height: 100vh;
min-height: 100dvh;
Expand Down
18 changes: 3 additions & 15 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,6 @@ export default defineNuxtConfig({
htmlAttrs: {
lang: 'en'
},
link: [
{ rel: 'preconnect', href: 'https://fonts.googleapis.com' },
{
rel: 'preconnect',
href: 'https://fonts.gstatic.com',
crossorigin: 'anonymous'
},
{
rel: 'stylesheet',
href: 'https://fonts.googleapis.com/css2?family=Rubik:wght@400;500;600&display=swap'
}
],
meta: [
{ name: 'description', content: 'Edge compatible Nuxt starter' },
{ name: 'theme-color', content: '#18181B' }
Expand All @@ -41,7 +29,8 @@ export default defineNuxtConfig({
'@bg-dev/nuxt-naiveui',
'@nuxtjs/tailwindcss',
'nuxt-s3',
'nuxt-security'
'nuxt-security',
'@nuxt/fonts'
],

auth,
Expand All @@ -51,8 +40,7 @@ export default defineNuxtConfig({

security: {
corsHandler: {
origin: process.env.NUXT_PUBLIC_AUTH_BASE_URL,
methods: '*'
origin: process.env.NUXT_PUBLIC_AUTH_BASE_URL
},
headers: {
crossOriginEmbedderPolicy: false,
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"@bg-dev/nuxt-auth": "2.4.3",
"@bg-dev/nuxt-naiveui": "1.10.2",
"@nuxt/devtools": "^1.0.8",
"@nuxt/fonts": "^0.0.1",
"@nuxtjs/eslint-config": "^12.0.0",
"@nuxtjs/eslint-config-typescript": "^12.1.0",
"@nuxtjs/tailwindcss": "^6.11.4",
Expand Down
171 changes: 171 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7a8fefe

Please sign in to comment.