daidaibg
2022-10-10 a44105de2e57b676280f175237e3f2e2c017db6a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
<script setup lang="ts">
import { themeChange } from "theme-change";
onMounted(() => {
  themeChange(false);
});
const themes = [
  {
    name: "🌝 light",
    id: "light",
  },
  {
    name: "🌚 dark",
    id: "dark",
  },
  {
    name: "🧁 cupcake",
    id: "cupcake",
  },
  {
    name: "🐝 bumblebee",
    id: "bumblebee",
  },
  {
    name: "✳️ Emerald",
    id: "emerald",
  },
  {
    name: "🏢 Corporate",
    id: "corporate",
  },
  {
    name: "🌃 synthwave",
    id: "synthwave",
  },
  {
    name: "👴 retro",
    id: "retro",
  },
  {
    name: "🤖 cyberpunk",
    id: "cyberpunk",
  },
  {
    name: "🌸 valentine",
    id: "valentine",
  },
  {
    name: "🎃 halloween",
    id: "halloween",
  },
  {
    name: "🌷 garden",
    id: "garden",
  },
  {
    name: "🌲 forest",
    id: "forest",
  },
  {
    name: "🐟 aqua",
    id: "aqua",
  },
  {
    name: "👓 lofi",
    id: "lofi",
  },
  {
    name: "🖍 pastel",
    id: "pastel",
  },
  {
    name: "🧚‍♀️ fantasy",
    id: "fantasy",
  },
  {
    name: "📝 Wireframe",
    id: "wireframe",
  },
  {
    name: "🏴 black",
    id: "black",
  },
  {
    name: "💎 luxury",
    id: "luxury",
  },
  {
    name: "🧛‍♂️ dracula",
    id: "dracula",
  },
  {
    name: "🖨 CMYK",
    id: "cmyk",
  },
  {
    name: "🍁 Autumn",
    id: "autumn",
  },
  {
    name: "💼 Business",
    id: "business",
  },
  {
    name: "💊 Acid",
    id: "acid",
  },
  {
    name: "🍋 Lemonade",
    id: "lemonade",
  },
  {
    name: "🌙 Night",
    id: "night",
  },
  {
    name: "☕️ Coffee",
    id: "coffee",
  },
  {
    name: "❄️ Winter",
    id: "winter",
  },
];
</script>
 
<template>
  <div title="Change Theme" class="dropdown-end dropdown">
    <div tabindex="0" class="btn-ghost btn gap-1 normal-case">
      <svg
        width="20"
        height="20"
        xmlns="http://www.w3.org/2000/svg"
        fill="none"
        viewBox="0 0 24 24"
        class="inline-block h-5 w-5 stroke-current md:h-6 md:w-6"
      >
        <path
          stroke-linecap="round"
          stroke-linejoin="round"
          stroke-width="2"
          d="M7 21a4 4 0 01-4-4V5a2 2 0 012-2h4a2 2 0 012 2v12a4 4 0 01-4 4zm0 0h12a2 2 0 002-2v-4a2 2 0 00-2-2h-2.343M11 7.343l1.657-1.657a2 2 0 012.828 0l2.829 2.829a2 2 0 010 2.828l-8.486 8.485M7 17h.01"
        />
      </svg>
      <span class="hidden md:inline">Theme</span>
      <svg
        width="12px"
        height="12px"
        class="ml-1 hidden h-3 w-3 fill-current opacity-60 sm:inline-block"
        xmlns="http://www.w3.org/2000/svg"
        viewBox="0 0 2048 2048"
      >
        <path d="M1799 349l242 241-1017 1017L7 590l242-241 775 775 775-775z" />
      </svg>
    </div>
    <div
      class="scrollbar dropdown-content rounded-t-box rounded-b-box top-px mt-16 h-[70vh] max-h-96 w-52 overflow-y-auto bg-base-200 text-base-content shadow-2xl"
    >
      <div class="grid grid-cols-1 gap-3 p-3" tabindex="0">
        <div
          v-for="theme in themes"
          :key="theme.id"
          class="overflow-hidden rounded-lg outline outline-2 outline-offset-2 outline-base-content"
          :data-set-theme="theme.id"
          data-act-class="outline"
        >
          <div
            :data-theme="theme.id"
            class="w-full cursor-pointer bg-base-100 font-sans text-base-content"
          >
            <div class="grid grid-cols-5 grid-rows-3">
              <div class="col-span-5 row-span-3 row-start-1 flex gap-1 py-3 px-4">
                <div class="grow text-sm font-bold">
                  {{ theme.id }}
                </div>
                <div class="flex shrink-0 flex-wrap gap-1">
                  <div class="w-2 rounded bg-primary" />
                  <div class="w-2 rounded bg-secondary" />
                  <div class="w-2 rounded bg-accent" />
                  <div class="w-2 rounded bg-neutral" />
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
 
 <style scoped>
 .scrollbar::-webkit-scrollbar {
  width: 20px;
  height: 20px;
 }
 
 .scrollbar::-webkit-scrollbar-track {
  border-radius: 100vh;
  background: #f7f4ed;
 }
 
 .scrollbar::-webkit-scrollbar-thumb {
  background: #e0cbcb;
  border-radius: 100vh;
  border: 3px solid #f6f7ed;
 }
 
 .scrollbar::-webkit-scrollbar-thumb:hover {
  background: #c0a0b9;
 }
 </style>