mirror of
https://github.com/ArthurDanjou/artsite.git
synced 2026-01-14 15:54:13 +01:00
fix: center theme toggle shortcut position for better user experience
This commit is contained in:
@@ -51,7 +51,7 @@ function toggleDark(event: MouseEvent | { clientX: number, clientY: number }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
defineShortcuts({
|
defineShortcuts({
|
||||||
t: () => toggleDark({ clientX: window.innerWidth, clientY: 0 }),
|
t: () => toggleDark({ clientX: window.innerWidth / 2, clientY: window.innerHeight / 2 }),
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -86,3 +86,23 @@ defineShortcuts({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
::view-transition-old(root),
|
||||||
|
::view-transition-new(root) {
|
||||||
|
animation: none;
|
||||||
|
mix-blend-mode: normal;
|
||||||
|
}
|
||||||
|
::view-transition-old(root) {
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
::view-transition-new(root) {
|
||||||
|
z-index: 9999;
|
||||||
|
}
|
||||||
|
.dark::view-transition-old(root) {
|
||||||
|
z-index: 9999;
|
||||||
|
}
|
||||||
|
.dark::view-transition-new(root) {
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user