Use nuxt fonts module

This commit is contained in:
Nicola Spadari
2024-10-08 12:04:07 +02:00
parent bfed1f0ce9
commit 675f393b5c
4 changed files with 645 additions and 171 deletions

View File

@@ -3,6 +3,7 @@ export default defineNuxtConfig({
"@vueuse/nuxt", "@vueuse/nuxt",
"@unocss/nuxt", "@unocss/nuxt",
"@nuxt/icon", "@nuxt/icon",
"@nuxt/fonts",
"nuxt-svgo", "nuxt-svgo",
"@nuxt/eslint" "@nuxt/eslint"
], ],
@@ -30,12 +31,20 @@ export default defineNuxtConfig({
experimental: { experimental: {
typedPages: true typedPages: true
}, },
fonts: {
defaults: {
weights: [`${100}..${900}`]
}
},
css: [ css: [
"@unocss/reset/tailwind.css" "@unocss/reset/tailwind.css"
], ],
svgo: { svgo: {
autoImportPath: "@/assets/" autoImportPath: "@/assets/"
}, },
icon: {
mode: "svg"
},
vite: { vite: {
clearScreen: false, clearScreen: false,
envPrefix: ["VITE_", "TAURI_"], envPrefix: ["VITE_", "TAURI_"],

View File

@@ -23,6 +23,7 @@
"tauri:build:debug": "tauri build --debug" "tauri:build:debug": "tauri build --debug"
}, },
"dependencies": { "dependencies": {
"@nuxt/fonts": "^0.10.0",
"@tauri-apps/api": ">=2.0.2", "@tauri-apps/api": ">=2.0.2",
"@tauri-apps/plugin-fs": "^2.0.0", "@tauri-apps/plugin-fs": "^2.0.0",
"@tauri-apps/plugin-notification": "^2.0.0", "@tauri-apps/plugin-notification": "^2.0.0",

790
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -4,7 +4,6 @@ import {
presetTagify, presetTagify,
presetTypography, presetTypography,
presetUno, presetUno,
presetWebFonts,
transformerDirectives, transformerDirectives,
transformerVariantGroup transformerVariantGroup
} from "unocss"; } from "unocss";
@@ -20,18 +19,13 @@ export default defineConfig({
presetUno(), presetUno(),
presetTagify(), presetTagify(),
presetAttributify(), presetAttributify(),
presetTypography(), presetTypography()
presetWebFonts({
fonts: {
heading: {
name: "Montserrat",
weights: ["200", "400", "700"]
},
text: "Inter"
}
})
], ],
theme: { theme: {
fontFamily: {
heading: "Montserrat",
text: "Inter"
},
breakpoints: { breakpoints: {
sm: "576px", sm: "576px",
md: "768px", md: "768px",