Commit 1ab03abafe

1ab03abafe3c8ae9362a3a630c00f70f0b7f47b2

parent: 5279201008

Unsigned

Duck <57977673+woducku@users.noreply.github.com> · 2026-06-22 08:59 UTC

Kurokami Fubuki

Layout: unified · split

docs/.vitepress/theme/Layout.vue +22 −7
@@ -572,7 +572,10 @@ watchEffect(() => {
572572 )
573573})
574574
575const accentPalettes: Record<string, Record<string, string>> = {
575type ShadeMap = Record<string, string>
576type PaletteEntry = ShadeMap | { dark: ShadeMap; light: ShadeMap }
577
578const accentPalettes: Record<string, PaletteEntry> = {
576579 ayanami: {
577580 400: 'oklch(0.722 0.105 247.48)',
578581 500: 'oklch(0.626 0.098 247.46)',
@@ -616,11 +619,20 @@ const accentPalettes: Record<string, Record<string, string>> = {
616619 800: 'oklch(0.461 0.176 28.95)',
617620 },
618621 fubuki: {
619 400: 'oklch(0.82 0 0)',
620 500: 'oklch(0.72 0 0)',
621 600: 'oklch(0.62 0 0)',
622 700: 'oklch(0.52 0 0)',
623 800: 'oklch(0.42 0 0)',
622 dark: {
623 400: 'oklch(0.82 0 0)',
624 500: 'oklch(0.72 0 0)',
625 600: 'oklch(0.62 0 0)',
626 700: 'oklch(0.52 0 0)',
627 800: 'oklch(0.42 0 0)',
628 },
629 light: {
630 400: 'oklch(0.58 0 0)',
631 500: 'oklch(0.48 0 0)',
632 600: 'oklch(0.38 0 0)',
633 700: 'oklch(0.28 0 0)',
634 800: 'oklch(0.18 0 0)',
635 },
624636 },
625637}
626638
@@ -628,7 +640,10 @@ const accentColor = useStorage(AccentColorStorageKey, 'ayanami')
628640
629641watchEffect(() => {
630642 if (import.meta.env.SSR) return
631 const shades = accentPalettes[accentColor.value] ?? accentPalettes.ayanami
643 const palette = accentPalettes[accentColor.value] ?? accentPalettes.ayanami
644 const shades = 'dark' in palette
645 ? (isDark.value ? palette.dark : palette.light)
646 : palette
632647 const el = document.documentElement
633648 if (isDark.value) {
634649 el.style.setProperty('--vp-c-brand-1', shades['400'])
docs/.vitepress/theme/components/settings/AccentColor.vue +6 −2
@@ -1,9 +1,12 @@
11<script setup lang="ts">
2import { useData } from 'vitepress'
23import { useStorage } from '@vueuse/core'
34
45import { AccentColorStorageKey } from '../../constants'
56import MenuTitle from './MenuTitle.vue'
67
8const { isDark } = useData()
9
710const accentOptions = [
811 {
912 key: 'ayanami',
@@ -39,8 +42,9 @@ const accentOptions = [
3942 key: 'fubuki',
4043 label: 'Fubuki',
4144 shades: ['oklch(0.82 0 0)', 'oklch(0.72 0 0)', 'oklch(0.62 0 0)', 'oklch(0.52 0 0)', 'oklch(0.42 0 0)'],
45 lightShades: ['oklch(0.58 0 0)', 'oklch(0.48 0 0)', 'oklch(0.38 0 0)', 'oklch(0.28 0 0)', 'oklch(0.18 0 0)'],
4246 },
43] as const
47]
4448
4549const accentColor = useStorage(AccentColorStorageKey, 'ayanami')
4650</script>
@@ -65,7 +69,7 @@ const accentColor = useStorage(AccentColorStorageKey, 'ayanami')
6569 <span class="accent-label">{{ option.label }}</span>
6670 <span class="accent-shades">
6771 <span
68 v-for="(shade, i) in option.shades"
72 v-for="(shade, i) in ('lightShades' in option && !isDark ? option.lightShades : option.shades)"
6973 :key="i"
7074 class="accent-shade"
7175 :style="{ backgroundColor: shade }"