Skip to content

Commit 68557a9

Browse files
committed
feat: [#421] custom light theme for DaisyUi added
1 parent 5f8f561 commit 68557a9

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

components/navigation/NavigationBar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
<div>
6666
<label class="swap swap-rotate">
6767
<!-- this hidden checkbox controls the state -->
68-
<input type="checkbox" class="theme-controller" value="light" @click="changeTheme">
68+
<input type="checkbox" class="theme-controller" value="torrustlight" @click="changeTheme">
6969
<!-- moon icon -->
7070
<svg class="swap-off fill-current w-10 h-10" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21.64,13a1,1,0,0,0-1.05-.14,8.05,8.05,0,0,1-3.37.73A8.15,8.15,0,0,1,9.08,5.49a8.59,8.59,0,0,1,.25-2A1,1,0,0,0,8,2.36,10.14,10.14,0,1,0,22,14.05,1,1,0,0,0,21.64,13Zm-9.5,6.69A8.14,8.14,0,0,1,7.08,5.22v.27A10.15,10.15,0,0,0,17.22,15.63a9.79,9.79,0,0,0,2.1-.22A8.11,8.11,0,0,1,12.14,19.73Z" /></svg>
7171
<!-- sun icon -->

nuxt.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default defineNuxtConfig({
1717

1818
colorMode: {
1919
preference: "system", // default value of $colorMode.preference
20-
fallback: "light", // fallback value if not system preference found
20+
fallback: "torrust", // fallback value if not system preference found
2121
hid: "nuxt-color-mode-script",
2222
globalName: "__NUXT_COLOR_MODE__",
2323
componentName: "ColorScheme",

tailwind.config.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ module.exports = {
1717
daisyui: {
1818
themes: [
1919
"halloween",
20-
"light",
2120
{
2221
torrust: {
2322
primary: "#f28c18",
@@ -30,6 +29,20 @@ module.exports = {
3029
success: "#16a34a",
3130
warning: "#d97706",
3231
error: "#dc2626"
32+
},
33+
torrustlight: {
34+
primary: "#f28c18",
35+
"primary-content": "#ffffff",
36+
secondary: "#187EF2",
37+
accent: "#51a800",
38+
neutral: "#3b424e",
39+
"base-100": "#ffffff",
40+
base: "#ffffff",
41+
info: "#2563eb",
42+
success: "#16a34a",
43+
warning: "#d97706",
44+
error: "#dc2626",
45+
"neutral-content": "#000000"
3346
}
3447
}
3548
]

0 commit comments

Comments
 (0)