mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-03-01 15:03:57 +08:00
feat(theme): implement dynamic theme logo with reactive color updates
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import DefaultTheme from 'vitepress/theme'
|
||||
import { onBeforeUnmount, onMounted } from 'vue'
|
||||
import { useDynamicIcon } from '../composables/useDynamicIcon'
|
||||
import ThemeLogo from '../components/ThemeLogo.vue'
|
||||
|
||||
let mediaQuery: MediaQueryList | null = null
|
||||
let systemThemeChangeHandler: (() => void) | null = null
|
||||
@@ -50,6 +51,11 @@ onBeforeUnmount(() => {
|
||||
|
||||
<template>
|
||||
<DefaultTheme.Layout>
|
||||
<!-- Custom logo in navbar that follows theme color -->
|
||||
<template #nav-bar-title-before>
|
||||
<ThemeLogo class="nav-logo" />
|
||||
</template>
|
||||
|
||||
<template #home-hero-after>
|
||||
<div class="hero-extensions">
|
||||
<div class="hero-stats">
|
||||
@@ -120,6 +126,18 @@ onBeforeUnmount(() => {
|
||||
padding-left: 16px;
|
||||
}
|
||||
|
||||
.nav-logo {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
margin-right: 8px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* Hide the default VitePress logo image since we use our custom component */
|
||||
:deep(.VPNavBarTitle .logo) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.skip-link {
|
||||
position: absolute;
|
||||
top: -100px;
|
||||
|
||||
Reference in New Issue
Block a user