mirror of
https://github.com/ArthurDanjou/artsite.git
synced 2026-01-31 18:29:34 +01:00
Add theme toggle with shortcuts
This commit is contained in:
@@ -50,7 +50,8 @@ defineShortcuts({
|
|||||||
h: () => router.push('/'),
|
h: () => router.push('/'),
|
||||||
u: () => router.push('/uses'),
|
u: () => router.push('/uses'),
|
||||||
w: () => router.push('/writings'),
|
w: () => router.push('/writings'),
|
||||||
r: () => window.open(config.public.cloud.resume, '_blank')
|
r: () => window.open(config.public.cloud.resume, '_blank'),
|
||||||
|
t: () => toggleTheme()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -80,7 +81,10 @@ defineShortcuts({
|
|||||||
/>
|
/>
|
||||||
</UTooltip>
|
</UTooltip>
|
||||||
<ClientOnly>
|
<ClientOnly>
|
||||||
<UTooltip text="switch theme">
|
<UTooltip
|
||||||
|
:shortcuts="['T']"
|
||||||
|
text="switch theme"
|
||||||
|
>
|
||||||
<UButton
|
<UButton
|
||||||
:icon="isDark ? 'i-ph-moon-duotone' : 'i-ph-sun-duotone'"
|
:icon="isDark ? 'i-ph-moon-duotone' : 'i-ph-sun-duotone'"
|
||||||
color="white"
|
color="white"
|
||||||
|
|||||||
Reference in New Issue
Block a user