@@ -6,12 +6,12 @@ const route = useRoute();
6
6
7
7
<template >
8
8
<nav class =" container mx-auto py-5" >
9
- <div class =" flex items-center text-gray-200" >
9
+ <div class =" flex items-center text-gray-700 dark:text-gray- 200" >
10
10
<div class =" flex-1" />
11
11
<div class =" flex items-center space-x-2" >
12
12
<HeadlessMenu as =" div" class =" relative z-50 inline-block text-left" >
13
13
<div >
14
- <HeadlessMenuButton class =" text-white hover:text-orange-500" >
14
+ <HeadlessMenuButton class =" text-gray-700 dark:text- white hover:text-orange-500" >
15
15
<div class =" text-2xl" >&bull ;&bull ;&bull ; </div >
16
16
</HeadlessMenuButton >
17
17
</div >
@@ -25,14 +25,14 @@ const route = useRoute();
25
25
leave-to-class =" transform scale-95 opacity-0"
26
26
>
27
27
<HeadlessMenuItems
28
- class =" absolute right-0 mt-2 w-36 origin-top-right divide-y divide-gray-100 rounded-md bg-black/80 text-white shadow-lg ring-1 ring-black ring-opacity-5 backdrop-blur-sm focus:outline-none"
28
+ class =" absolute right-0 mt-2 w-36 origin-top-right divide-y divide-gray-100 dark:divide-gray-100 rounded-md bg-white/90 dark:bg- black/80 text-gray-900 dark: text-white shadow-lg ring-1 ring-black ring-opacity-5 backdrop-blur-sm focus:outline-none"
29
29
>
30
30
<div class =" px-1 py-1" >
31
31
<HeadlessMenuItem v-slot =" { active }" >
32
32
<NuxtLink to =" /" >
33
33
<button
34
34
:class =" [
35
- active ? 'bg-orange-500/50 text-white' : 'text-white',
35
+ active ? 'bg-orange-500/50 text-white dark:text-white ' : 'text-gray-700 dark: text-white',
36
36
$route.path === '/' ? 'bg-orange-500' : '',
37
37
'group flex w-full items-center rounded-md px-2 py-2 text-sm',
38
38
]"
@@ -84,7 +84,7 @@ const route = useRoute();
84
84
<a href =" /articles" >
85
85
<button
86
86
:class =" [
87
- active ? 'bg-orange-500/50 text-white' : 'text-white',
87
+ active ? 'bg-orange-500/50 text-white dark:text-white ' : 'text-gray-700 dark: text-white',
88
88
$route.path === '/articles' ? 'bg-orange-500' : '',
89
89
'group flex w-full items-center rounded-md px-2 py-2 text-sm',
90
90
]"
@@ -112,7 +112,7 @@ const route = useRoute();
112
112
<a href =" /playground" >
113
113
<button
114
114
:class =" [
115
- active ? 'bg-orange-500/50 text-white' : 'text-white',
115
+ active ? 'bg-orange-500/50 text-white dark:text-white ' : 'text-gray-700 dark: text-white',
116
116
$route.path === '/playground' ? 'bg-orange-500' : '',
117
117
'group flex w-full items-center rounded-md px-2 py-2 text-sm',
118
118
]"
@@ -140,7 +140,7 @@ const route = useRoute();
140
140
<a href =" /talks" >
141
141
<button
142
142
:class =" [
143
- active ? 'bg-orange-500/50' : '',
143
+ active ? 'bg-orange-500/50 text-white dark:text-white ' : 'text-gray-700 dark:text-white ',
144
144
$route.path === '/talks' ? 'bg-orange-500' : '',
145
145
'group flex w-full items-center rounded-md px-2 py-2 text-sm',
146
146
]"
@@ -166,7 +166,7 @@ const route = useRoute();
166
166
<a href =" https://github.com/cmpadden" >
167
167
<button
168
168
:class =" [
169
- active ? 'bg-orange-500/50 text-white' : 'text-white',
169
+ active ? 'bg-orange-500/50 text-white dark:text-white ' : 'text-gray-700 dark: text-white',
170
170
'group flex w-full items-center rounded-md px-2 py-2 text-sm',
171
171
]"
172
172
>
@@ -189,7 +189,7 @@ const route = useRoute();
189
189
<a href =" https://bsky.app/profile/colton.boo" >
190
190
<button
191
191
:class =" [
192
- active ? 'bg-orange-500/50 text-white' : 'text-white',
192
+ active ? 'bg-orange-500/50 text-white dark:text-white ' : 'text-gray-700 dark: text-white',
193
193
'group flex w-full items-center rounded-md px-2 py-2 text-sm',
194
194
]"
195
195
>
@@ -208,6 +208,57 @@ const route = useRoute();
208
208
</a >
209
209
</HeadlessMenuItem >
210
210
</div >
211
+
212
+ <!-- Divider -->
213
+ <div class =" border-t border-gray-300 dark:border-gray-600" ></div >
214
+
215
+ <!-- Theme Toggle Section -->
216
+ <div class =" px-1 py-1" >
217
+ <HeadlessMenuItem v-slot =" { active }" >
218
+ <button
219
+ @click =" $colorMode.preference = $colorMode.value === 'dark' ? 'light' : 'dark'"
220
+ :class =" [
221
+ active ? 'bg-orange-500/50 text-white dark:text-white' : 'text-gray-700 dark:text-white',
222
+ 'group flex w-full items-center rounded-md px-2 py-2 text-sm',
223
+ ]"
224
+ >
225
+ <!-- Sun icon for when we're in dark mode (clicking switches to light) -->
226
+ <svg
227
+ v-if =" $colorMode.value === 'dark'"
228
+ class =" mr-2 inline h-5 w-5"
229
+ fill =" none"
230
+ stroke =" currentColor"
231
+ viewBox =" 0 0 24 24"
232
+ xmlns =" http://www.w3.org/2000/svg"
233
+ >
234
+ <path
235
+ stroke-linecap =" round"
236
+ stroke-linejoin =" round"
237
+ stroke-width =" 2"
238
+ d =" M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"
239
+ />
240
+ </svg >
241
+
242
+ <!-- Moon icon for when we're in light mode (clicking switches to dark) -->
243
+ <svg
244
+ v-else
245
+ class =" mr-2 inline h-5 w-5"
246
+ fill =" none"
247
+ stroke =" currentColor"
248
+ viewBox =" 0 0 24 24"
249
+ xmlns =" http://www.w3.org/2000/svg"
250
+ >
251
+ <path
252
+ stroke-linecap =" round"
253
+ stroke-linejoin =" round"
254
+ stroke-width =" 2"
255
+ d =" M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z"
256
+ />
257
+ </svg >
258
+ <span class =" translate-y-0.5" >{{ $colorMode.value === 'dark' ? 'Light Mode' : 'Dark Mode' }}</span >
259
+ </button >
260
+ </HeadlessMenuItem >
261
+ </div >
211
262
</HeadlessMenuItems >
212
263
</transition >
213
264
</HeadlessMenu >
0 commit comments