diff --git a/nuxt.config.ts b/nuxt.config.ts index 3e877b3..461c046 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -6,6 +6,7 @@ export default defineNuxtConfig({ buildAssetsDir: '/assets/', }, modules: [ + '@nuxtjs/color-mode', '@nuxtjs/i18n', '@nuxtjs/tailwindcss', 'nuxt-icon', @@ -36,4 +37,9 @@ export default defineNuxtConfig({ defaultLocale: 'en-US', strategy: 'no_prefix', }, + colorMode: { + preference: 'system', + dataValue: 'theme', + classSuffix: '', + } }) diff --git a/package.json b/package.json index 3ead12d..fce2ac9 100644 --- a/package.json +++ b/package.json @@ -13,12 +13,14 @@ }, "devDependencies": { "@nuxt/devtools": "latest", + "@nuxtjs/color-mode": "^3.3.0", "@nuxtjs/eslint-config-typescript": "^12.0.0", "@nuxtjs/google-fonts": "^3.0.1", "@nuxtjs/i18n": "^8.0.0-beta.13", "@nuxtjs/tailwindcss": "^5.3.5", "@types/node": "^18.16.19", "@typescript-eslint/parser": "^6.1.0", + "daisyui": "^3.3.1", "eslint": "^8.45.0", "eslint-config-prettier": "^8.8.0", "eslint-plugin-prettier": "^5.0.0", diff --git a/tailwind.config.js b/tailwind.config.js index 47207c1..bb2b6da 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,9 +1,13 @@ module.exports = { // Safelisting some classes to avoid content purge + plugins: [require('daisyui')], safelist: [ 'safelisted', { pattern: /bg-.*-500/, }, ], + daisyui: { + themes: true, + } }