@@ -40,11 +40,12 @@ const resourceLinks: Link[] = [
4040 href: ' https://status.beaconcha.in/' , icon: ' circle-check-filled' , text: $t (' base.footer.resources.links.site_status' ),
4141 },
4242]
43+ const colorMode = useColorMode ()
4344 </script >
4445
4546<template >
4647 <div
47- class =" bg-gray-50 dark:bg-gray-950 flex flex-col gap-3xl sm:gap-5xl pt-3xl px-xl pb-7xl sm:px-5xl sm:py-7xl sm:rounded-4xl sm:mb-xl max-w-24xl mx-auto"
48+ class =" bg-gray-50 dark:bg-gray-950 flex flex-col gap-3xl sm:gap-5xl pt-3xl px-xl pb-7xl sm:px-5xl sm:py-7xl sm:rounded-4xl sm:mb-xl max-w-24xl mx-auto [ & _*:focus-visible]:rounded-3xl [ & _*:focus-visible]:outline-offset-4 "
4849 >
4950 <NuxtLink
5051 to =" /"
@@ -168,6 +169,35 @@ const resourceLinks: Link[] = [
168169 />
169170 </li >
170171 </ul >
172+ <BaseSwitch
173+ v-model =" colorMode.value"
174+ class =" w-fit -ml-[1px]"
175+ :values =" [
176+ {
177+ label: $t('base.footer.color_mode.light'),
178+ key: 'light',
179+ },
180+ {
181+ label: $t('base.footer.color_mode.dark'),
182+ key: 'dark',
183+ },
184+ ]"
185+ :class-list =" {
186+ trackItem: 'p-md +py-md +px-lg border border-transparent rounded-4xl text-gray-600 dark:text-gray-400 has-checked:text-black has-checked:dark:text-white has-focus-visible:outline-2 has-focus-visible:outline-offset-2 has-focus-visible:outline-brand-300',
187+ track: 'border border-gray-100 dark:border-gray-900 flex gap-md [& >*]:grow text-center bg-white dark:bg-gray-950 rounded-4xl shadow-[0_1px_0.5px_0_rgba(255,255,255,0.08)_inset,0-1px_0_0_rgba(255,255,255,0.18)_inset]',
188+ thumb: 'bg-gray-50 dark:bg-gray-800 rounded-4xl shadow-[0_2px_2px_0_rgba(0,0,0,0.25),_0_0.5px_0.5px_0_rgba(255,255,255,0.12)_inset]',
189+ }"
190+ screenreader-title =" base.footer.color_mode.title"
191+ >
192+ <template #first =" { label } " >
193+ <BaseIcon name =" sun" />
194+ <span class =" sr-only" >{{ label }}</span >
195+ </template >
196+ <template #second =" { label } " >
197+ <BaseIcon name =" moon" />
198+ <span class =" sr-only" >{{ label }}</span >
199+ </template >
200+ </BaseSwitch >
171201 </div >
172202 </div >
173203
0 commit comments