46 lines
1.3 KiB
TypeScript
46 lines
1.3 KiB
TypeScript
export default defineNuxtConfig({
|
|
compatibilityDate: '2024-04-03',
|
|
devtools: { enabled: true },
|
|
modules: ['@unocss/nuxt', '@vueuse/nuxt', '@nuxt/eslint'],
|
|
eslint: {
|
|
config: {
|
|
stylistic: {
|
|
quoteProps: 'as-needed',
|
|
},
|
|
},
|
|
},
|
|
app: {
|
|
head: {
|
|
link: [
|
|
{
|
|
rel: 'stylesheet',
|
|
href: 'https://fonts.bunny.net/css?family=fira-code:300,400,500,600,700|jetbrains-mono:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i|source-code-pro:200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i|ubuntu-mono:400,400i,700,700i',
|
|
},
|
|
],
|
|
script: [
|
|
{
|
|
type: 'text/javascript',
|
|
innerHTML: /* js */ `
|
|
const theme = localStorage.getItem('theme')
|
|
|
|
if (theme === 'system' || !theme)
|
|
document.body.classList.add(
|
|
window.matchMedia('(prefers-color-scheme: dark)').matches
|
|
? 'dark'
|
|
: 'light'
|
|
)
|
|
else
|
|
document.body.classList.add(theme)
|
|
|
|
const font = localStorage.getItem('font')
|
|
|
|
if (font)
|
|
document.body.style.fontFamily = font
|
|
`,
|
|
tagPosition: 'bodyClose',
|
|
},
|
|
],
|
|
},
|
|
},
|
|
})
|