Theme Handler (By Land), Christmas & Catppuccin Theme And Feedback Window Revamp (#4386)

* Add files for christmas theme, theme handler, feedback revamp and cattpuccin theme

* Add files via upload

* update image on home page

* add tree logo for faster loading

* change link to raw github
This commit is contained in:
Samidy 2025-12-05 19:32:54 +03:00 committed by GitHub
parent d0b9c2079b
commit d4d4ad0d85
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 1657 additions and 129 deletions

View file

@ -1,9 +1,12 @@
<script setup lang="ts">
import { useData } from 'vitepress'
import DefaultTheme from 'vitepress/theme'
import Announcement from './components/Announcement.vue'
import Sidebar from './components/SidebarCard.vue'
import { useTheme } from './themes/themeHandler'
const { isDark } = useData()
const { setMode } = useTheme()
const enableTransitions = () =>
'startViewTransition' in document &&
@ -12,6 +15,8 @@ const enableTransitions = () =>
provide('toggle-appearance', async ({ clientX: x, clientY: y }: MouseEvent) => {
if (!enableTransitions()) {
isDark.value = !isDark.value
// Sync with theme handler
setMode(isDark.value ? 'dark' : 'light')
return
}
@ -26,6 +31,8 @@ provide('toggle-appearance', async ({ clientX: x, clientY: y }: MouseEvent) => {
// @ts-expect-error
await document.startViewTransition(async () => {
isDark.value = !isDark.value
// Sync with theme handler
setMode(isDark.value ? 'dark' : 'light')
await nextTick()
}).ready