Commit 712be9e8d1
Unregistered key
Layout: unified · split
.vscode/settings.json +5 −3
| @@ -1,12 +1,14 @@ | |||
| 1 | { | 1 | { |
| 2 | "vue.server.includeLanguages": ["vue"], | 2 | "vue.server.includeLanguages": [ |
| 3 | "vue" | ||
| 4 | ], | ||
| 3 | "editor.formatOnSave": true, | 5 | "editor.formatOnSave": true, |
| 4 | // Default formatter | 6 | // Default formatter |
| 5 | "editor.defaultFormatter": "esbenp.prettier-vscode", | 7 | "editor.defaultFormatter": "dprint.dprint", |
| 6 | "[typescript]": { | 8 | "[typescript]": { |
| 7 | "editor.formatOnSave": true | 9 | "editor.formatOnSave": true |
| 8 | }, | 10 | }, |
| 9 | "[vue]": { | 11 | "[vue]": { |
| 10 | "editor.formatOnSave": true | 12 | "editor.formatOnSave": true |
| 11 | } | 13 | } |
| 12 | } | 14 | }\ No newline at end of file |
docs/.vitepress/theme/Layout.vue +53 −14
| @@ -14,18 +14,27 @@ import { | |||
| 14 | import { usePreferredReducedMotion } from '@vueuse/core' | 14 | import { usePreferredReducedMotion } from '@vueuse/core' |
| 15 | import { useData, useRoute } from 'vitepress' | 15 | import { useData, useRoute } from 'vitepress' |
| 16 | import type { DefaultTheme as Theme } from 'vitepress' | 16 | import type { DefaultTheme as Theme } from 'vitepress' |
| 17 | import DefaultTheme from 'vitepress/theme' | ||
| 18 | import VPSidebarGroup from 'vitepress/dist/client/theme-default/components/VPSidebarGroup.vue' | 17 | import VPSidebarGroup from 'vitepress/dist/client/theme-default/components/VPSidebarGroup.vue' |
| 19 | import { getSidebarGroups } from 'vitepress/dist/client/theme-default/support/sidebar' | 18 | import { getSidebarGroups } from 'vitepress/dist/client/theme-default/support/sidebar' |
| 20 | import { computed, nextTick, onMounted, onUnmounted, ref, watch } from 'vue' | 19 | import DefaultTheme from 'vitepress/theme' |
| 20 | import { | ||
| 21 | computed, | ||
| 22 | nextTick, | ||
| 23 | onMounted, | ||
| 24 | onUnmounted, | ||
| 25 | ref, | ||
| 26 | watch, | ||
| 27 | watchEffect | ||
| 28 | } from 'vue' | ||
| 21 | import { sidebar } from '../configs/constants' | 29 | import { sidebar } from '../configs/constants' |
| 22 | import AnnouncementPill from './components/AnnouncementPill.vue' | 30 | import AnnouncementPill from './components/AnnouncementPill.vue' |
| 23 | import NotFoundComponent from './components/NotFound.vue' | 31 | import NotFoundComponent from './components/NotFound.vue' |
| 24 | import { | 32 | import { |
| 25 | NolebaseEnhancedReadabilitiesMenu | 33 | NolebaseEnhancedReadabilitiesMenu, |
| 34 | NolebaseEnhancedReadabilitiesScreenMenu | ||
| 26 | } from './components/settings' | 35 | } from './components/settings' |
| 27 | import SidebarCard from './components/SidebarCard.vue' | 36 | import SidebarCard from './components/SidebarCard.vue' |
| 28 | import { TakodachiStorageKey } from './constants' | 37 | import { LowEndDeviceModeStorageKey, TakodachiStorageKey } from './constants' |
| 29 | import { v2add, v2mag, v2norm, v2smul, v2sub, type Vec2D } from './math' | 38 | import { v2add, v2mag, v2norm, v2smul, v2sub, type Vec2D } from './math' |
| 30 | 39 | ||
| 31 | const route = useRoute() | 40 | const route = useRoute() |
| @@ -38,7 +47,9 @@ const homeSidebarOpen = ref(false) | |||
| 38 | const sidebarRef = ref<HTMLElement | null>(null) | 47 | const sidebarRef = ref<HTMLElement | null>(null) |
| 39 | const homeSidebarGroups = getSidebarGroups(sidebar as any) | 48 | const homeSidebarGroups = getSidebarGroups(sidebar as any) |
| 40 | const logoSrc = computed(() => | 49 | const logoSrc = computed(() => |
| 41 | typeof theme.value.logo === 'string' ? theme.value.logo : theme.value.logo?.src | 50 | typeof theme.value.logo === 'string' |
| 51 | ? theme.value.logo | ||
| 52 | : theme.value.logo?.src | ||
| 42 | ) | 53 | ) |
| 43 | 54 | ||
| 44 | watch(() => route.path, () => { | 55 | watch(() => route.path, () => { |
| @@ -72,10 +83,13 @@ const openCollapsibles = (target: HTMLElement) => { | |||
| 72 | 83 | ||
| 73 | while (sibling) { | 84 | while (sibling) { |
| 74 | const siblingTag = sibling.tagName | 85 | const siblingTag = sibling.tagName |
| 75 | if (siblingTag.length === 2 && siblingTag[0] === 'H' && +siblingTag[1] <= level) break | 86 | if ( |
| 87 | siblingTag.length === 2 && siblingTag[0] === 'H' && | ||
| 88 | +siblingTag[1] <= level | ||
| 89 | ) break | ||
| 76 | 90 | ||
| 77 | if (siblingTag === 'DETAILS') { | 91 | if (siblingTag === 'DETAILS') { |
| 78 | (sibling as HTMLDetailsElement).open = true | 92 | ;(sibling as HTMLDetailsElement).open = true |
| 79 | if (scrollTarget === target) scrollTarget = sibling as HTMLElement | 93 | if (scrollTarget === target) scrollTarget = sibling as HTMLElement |
| 80 | } | 94 | } |
| 81 | 95 | ||
| @@ -95,8 +109,11 @@ const openCollapsibles = (target: HTMLElement) => { | |||
| 95 | const navBar = document.querySelector<HTMLElement>('.VPNavBar') | 109 | const navBar = document.querySelector<HTMLElement>('.VPNavBar') |
| 96 | const navOffset = navBar ? navBar.offsetHeight : 0 | 110 | const navOffset = navBar ? navBar.offsetHeight : 0 |
| 97 | window.scrollTo({ | 111 | window.scrollTo({ |
| 98 | top: scrollTarget.getBoundingClientRect().top + window.scrollY - navOffset, | 112 | top: scrollTarget.getBoundingClientRect().top + window.scrollY - |
| 99 | behavior: window.matchMedia('(prefers-reduced-motion: reduce)').matches ? 'auto' : 'smooth' | 113 | navOffset, |
| 114 | behavior: window.matchMedia('(prefers-reduced-motion: reduce)').matches | ||
| 115 | ? 'auto' | ||
| 116 | : 'smooth' | ||
| 100 | }) | 117 | }) |
| 101 | scrollTarget.setAttribute('tabindex', '-1') | 118 | scrollTarget.setAttribute('tabindex', '-1') |
| 102 | scrollTarget.focus({ preventScroll: true }) | 119 | scrollTarget.focus({ preventScroll: true }) |
| @@ -127,7 +144,7 @@ const tryOpenCollapsibles = async () => { | |||
| 127 | 144 | ||
| 128 | watch(() => route.data, tryOpenCollapsibles, { flush: 'post' }) | 145 | watch(() => route.data, tryOpenCollapsibles, { flush: 'post' }) |
| 129 | watch(() => route.hash, tryOpenCollapsibles, { flush: 'post' }) | 146 | watch(() => route.hash, tryOpenCollapsibles, { flush: 'post' }) |
| 130 | 147 | ||
| 131 | function onSidebarEnter() { | 148 | function onSidebarEnter() { |
| 132 | sidebarRef.value?.focus() | 149 | sidebarRef.value?.focus() |
| 133 | } | 150 | } |
| @@ -177,6 +194,17 @@ const breadcrumbs = computed(() => { | |||
| 177 | 194 | ||
| 178 | // Respect user's reduced motion preferences | 195 | // Respect user's reduced motion preferences |
| 179 | const prefs = usePreferredReducedMotion() | 196 | const prefs = usePreferredReducedMotion() |
| 197 | const lowEndDeviceMode = useStorage(LowEndDeviceModeStorageKey, 'off') | ||
| 198 | const reduceBlurEffects = computed(() => lowEndDeviceMode.value === 'on') | ||
| 199 | |||
| 200 | watchEffect(() => { | ||
| 201 | if (import.meta.env.SSR) return | ||
| 202 | |||
| 203 | document.documentElement.classList.toggle( | ||
| 204 | 'reduce-blur-effects', | ||
| 205 | reduceBlurEffects.value | ||
| 206 | ) | ||
| 207 | }) | ||
| 180 | 208 | ||
| 181 | const speed = 2 | 209 | const speed = 2 |
| 182 | const snapThreshold = 5 // px | 210 | const snapThreshold = 5 // px |
| @@ -285,7 +313,9 @@ onMounted(() => { | |||
| 285 | } | 313 | } |
| 286 | 314 | ||
| 287 | useEventListener(document, 'keydown', (e: KeyboardEvent) => { | 315 | useEventListener(document, 'keydown', (e: KeyboardEvent) => { |
| 288 | if (e.key !== 'ArrowDown' && e.key !== 'ArrowUp' && e.key !== 'Escape') return | 316 | if (e.key !== 'ArrowDown' && e.key !== 'ArrowUp' && e.key !== 'Escape') { |
| 317 | return | ||
| 318 | } | ||
| 289 | 319 | ||
| 290 | if (e.key === 'Escape') { | 320 | if (e.key === 'Escape') { |
| 291 | if (homeSidebarOpen.value) homeSidebarOpen.value = false | 321 | if (homeSidebarOpen.value) homeSidebarOpen.value = false |
| @@ -312,7 +342,9 @@ onMounted(() => { | |||
| 312 | const screen = document.getElementById('VPNavScreen') | 342 | const screen = document.getElementById('VPNavScreen') |
| 313 | if (!screen) return | 343 | if (!screen) return |
| 314 | const hamburger = document.querySelector('.VPNavBarHamburger') | 344 | const hamburger = document.querySelector('.VPNavBarHamburger') |
| 315 | if (screen.contains(e.target as Node) || hamburger?.contains(e.target as Node)) return | 345 | if ( |
| 346 | screen.contains(e.target as Node) || hamburger?.contains(e.target as Node) | ||
| 347 | ) return | ||
| 316 | requestAnimationFrame(() => (hamburger as HTMLElement)?.click()) | 348 | requestAnimationFrame(() => (hamburger as HTMLElement)?.click()) |
| 317 | }) | 349 | }) |
| 318 | 350 | ||
| @@ -367,7 +399,12 @@ onUnmounted(() => { | |||
| 367 | > | 399 | > |
| 368 | <div class="home-sidebar-header"> | 400 | <div class="home-sidebar-header"> |
| 369 | <a href="/" class="home-sidebar-logo"> | 401 | <a href="/" class="home-sidebar-logo"> |
| 370 | <img v-if="logoSrc" :src="logoSrc" class="home-sidebar-logo-img" alt="Logo" /> | 402 | <img |
| 403 | v-if="logoSrc" | ||
| 404 | :src="logoSrc" | ||
| 405 | class="home-sidebar-logo-img" | ||
| 406 | alt="Logo" | ||
| 407 | /> | ||
| 371 | <span>{{ theme.siteTitle ?? site.title }}</span> | 408 | <span>{{ theme.siteTitle ?? site.title }}</span> |
| 372 | </a> | 409 | </a> |
| 373 | </div> | 410 | </div> |
| @@ -432,7 +469,9 @@ onUnmounted(() => { | |||
| 432 | <VPSidebarGroup :items="homeSidebarGroups" /> | 469 | <VPSidebarGroup :items="homeSidebarGroups" /> |
| 433 | </nav> | 470 | </nav> |
| 434 | </template> | 471 | </template> |
| 435 | <template #nav-screen-content-after /> | 472 | <template #nav-screen-content-after> |
| 473 | <NolebaseEnhancedReadabilitiesScreenMenu /> | ||
| 474 | </template> | ||
| 436 | 475 | ||
| 437 | <template #nav-bar-title-before> | 476 | <template #nav-bar-title-before> |
| 438 | <span | 477 | <span |
docs/.vitepress/theme/components/settings/BlurEffects.vue added +67
| @@ -0,0 +1,67 @@ | |||
| 1 | <script setup lang="ts"> | ||
| 2 | import { NuInputHighlight, NuInputHorizontalRadioGroup } from '@nolebase/ui' | ||
| 3 | import { useStorage } from '@vueuse/core' | ||
| 4 | import { computed, ref } from 'vue' | ||
| 5 | |||
| 6 | import MenuHelp from './MenuHelp.vue' | ||
| 7 | import MenuTitle from './MenuTitle.vue' | ||
| 8 | |||
| 9 | import { LowEndDeviceModeStorageKey } from '../../constants' | ||
| 10 | |||
| 11 | const menuTitleElementRef = ref<HTMLDivElement>() | ||
| 12 | const isMenuHelpPoppedUp = ref(false) | ||
| 13 | |||
| 14 | const lowEndDeviceMode = useStorage(LowEndDeviceModeStorageKey, 'off') | ||
| 15 | |||
| 16 | const fieldOptions = computed(() => [ | ||
| 17 | { | ||
| 18 | value: 'on', | ||
| 19 | title: 'On', | ||
| 20 | ariaLabel: 'On', | ||
| 21 | text: 'ON', | ||
| 22 | name: 'Low-End Device Mode' | ||
| 23 | }, | ||
| 24 | { | ||
| 25 | value: 'off', | ||
| 26 | title: 'Off', | ||
| 27 | ariaLabel: 'Off', | ||
| 28 | text: 'OFF', | ||
| 29 | name: 'Low-End Device Mode' | ||
| 30 | } | ||
| 31 | ]) | ||
| 32 | </script> | ||
| 33 | |||
| 34 | <template> | ||
| 35 | <div space-y-2 role="radiogroup"> | ||
| 36 | <div ref="menuTitleElementRef" relative flex items-center> | ||
| 37 | <MenuTitle | ||
| 38 | title="Low-end device mode" | ||
| 39 | aria-label="Low-end device mode" | ||
| 40 | flex="1" | ||
| 41 | pr-4 | ||
| 42 | > | ||
| 43 | <template #icon> | ||
| 44 | <span i-icon-park-outline:effects mr-1 aria-hidden="true" /> | ||
| 45 | </template> | ||
| 46 | </MenuTitle> | ||
| 47 | <MenuHelp | ||
| 48 | v-model:is-popped-up="isMenuHelpPoppedUp" | ||
| 49 | :menu-title-element-ref="menuTitleElementRef" | ||
| 50 | > | ||
| 51 | <h4 text-md mb-1 font-semibold>Low-end device mode</h4> | ||
| 52 | <p text="sm" mb-2 max-w-100> | ||
| 53 | Turn on to disable expensive backdrop blur and view transitions if the | ||
| 54 | site feels laggy on slower devices. | ||
| 55 | </p> | ||
| 56 | </MenuHelp> | ||
| 57 | </div> | ||
| 58 | <NuInputHighlight :active="isMenuHelpPoppedUp" class="rounded-md"> | ||
| 59 | <NuInputHorizontalRadioGroup | ||
| 60 | v-model="lowEndDeviceMode" | ||
| 61 | bg="$vp-nolebase-enhanced-readabilities-menu-background-color" | ||
| 62 | text="sm $vp-nolebase-enhanced-readabilities-menu-text-color" | ||
| 63 | :options="fieldOptions" | ||
| 64 | /> | ||
| 65 | </NuInputHighlight> | ||
| 66 | </div> | ||
| 67 | </template> | ||
docs/.vitepress/theme/components/settings/Menu.vue +2
| @@ -3,6 +3,7 @@ import { useMounted } from '@vueuse/core' | |||
| 3 | import { inject } from 'vue' | 3 | import { inject } from 'vue' |
| 4 | 4 | ||
| 5 | import { InjectionKey, VPFlyout } from '../../constants' | 5 | import { InjectionKey, VPFlyout } from '../../constants' |
| 6 | import BlurEffects from './BlurEffects.vue' | ||
| 6 | import LayoutSwitch from './LayoutSwitch.vue' | 7 | import LayoutSwitch from './LayoutSwitch.vue' |
| 7 | import LayoutSwitchContentLayoutWidthInput from './LayoutSwitchContentLayoutMaxWidthSlider.vue' | 8 | import LayoutSwitchContentLayoutWidthInput from './LayoutSwitchContentLayoutMaxWidthSlider.vue' |
| 8 | import LayoutSwitchPageLayoutWidthInput from './LayoutSwitchPageLayoutMaxWidthSlider.vue' | 9 | import LayoutSwitchPageLayoutWidthInput from './LayoutSwitchPageLayoutMaxWidthSlider.vue' |
| @@ -31,6 +32,7 @@ const mounted = useMounted() | |||
| 31 | <LayoutSwitchContentLayoutWidthInput /> | 32 | <LayoutSwitchContentLayoutWidthInput /> |
| 32 | <Spotlight v-if="!options.spotlight?.disabled" /> | 33 | <Spotlight v-if="!options.spotlight?.disabled" /> |
| 33 | <SpotlightStyles v-if="!options.spotlight?.disabled" /> | 34 | <SpotlightStyles v-if="!options.spotlight?.disabled" /> |
| 35 | <BlurEffects /> | ||
| 34 | <Takodachi /> | 36 | <Takodachi /> |
| 35 | </div> | 37 | </div> |
| 36 | </VPFlyout> | 38 | </VPFlyout> |
docs/.vitepress/theme/components/settings/ScreenMenu.vue +2
| @@ -1,6 +1,7 @@ | |||
| 1 | <script setup lang="ts"> | 1 | <script setup lang="ts"> |
| 2 | import { useMounted } from '@vueuse/core' | 2 | import { useMounted } from '@vueuse/core' |
| 3 | 3 | ||
| 4 | import BlurEffects from './BlurEffects.vue' | ||
| 4 | import MenuTitle from './MenuTitle.vue' | 5 | import MenuTitle from './MenuTitle.vue' |
| 5 | import ScreenLayoutSwitch from './ScreenLayoutSwitch.vue' | 6 | import ScreenLayoutSwitch from './ScreenLayoutSwitch.vue' |
| 6 | import ScreenSpotlight from './ScreenSpotlight.vue' | 7 | import ScreenSpotlight from './ScreenSpotlight.vue' |
| @@ -18,6 +19,7 @@ const mounted = useMounted() | |||
| 18 | <div flex="~ col" pl-4 space-y-2> | 19 | <div flex="~ col" pl-4 space-y-2> |
| 19 | <ScreenLayoutSwitch /> | 20 | <ScreenLayoutSwitch /> |
| 20 | <ScreenSpotlight /> | 21 | <ScreenSpotlight /> |
| 22 | <BlurEffects /> | ||
| 21 | </div> | 23 | </div> |
| 22 | </div> | 24 | </div> |
| 23 | </template> | 25 | </template> |
docs/.vitepress/theme/components/settings/index.ts +5
| @@ -2,6 +2,7 @@ import type { Plugin } from 'vue' | |||
| 2 | 2 | ||
| 3 | import type { Options } from '../../types' | 3 | import type { Options } from '../../types' |
| 4 | 4 | ||
| 5 | import BlurEffects from './BlurEffects.vue' | ||
| 5 | import LayoutSwitch from './LayoutSwitch.vue' | 6 | import LayoutSwitch from './LayoutSwitch.vue' |
| 6 | import LayoutSwitchContentLayoutMaxWidthSlider from './LayoutSwitchContentLayoutMaxWidthSlider.vue' | 7 | import LayoutSwitchContentLayoutMaxWidthSlider from './LayoutSwitchContentLayoutMaxWidthSlider.vue' |
| 7 | import LayoutSwitchPageLayoutMaxWidthSlider from './LayoutSwitchPageLayoutMaxWidthSlider.vue' | 8 | import LayoutSwitchPageLayoutMaxWidthSlider from './LayoutSwitchPageLayoutMaxWidthSlider.vue' |
| @@ -16,6 +17,7 @@ import { | |||
| 16 | InjectionKey, | 17 | InjectionKey, |
| 17 | LayoutMode, | 18 | LayoutMode, |
| 18 | LayoutSwitchModeStorageKey, | 19 | LayoutSwitchModeStorageKey, |
| 20 | LowEndDeviceModeStorageKey, | ||
| 19 | SpotlightStyle, | 21 | SpotlightStyle, |
| 20 | SpotlightToggledStorageKey | 22 | SpotlightToggledStorageKey |
| 21 | } from '../../constants' | 23 | } from '../../constants' |
| @@ -23,12 +25,14 @@ import { | |||
| 23 | export type { Options } | 25 | export type { Options } |
| 24 | 26 | ||
| 25 | export { | 27 | export { |
| 28 | BlurEffects, | ||
| 26 | InjectionKey, | 29 | InjectionKey, |
| 27 | LayoutMode, | 30 | LayoutMode, |
| 28 | LayoutSwitch, | 31 | LayoutSwitch, |
| 29 | LayoutSwitchContentLayoutMaxWidthSlider, | 32 | LayoutSwitchContentLayoutMaxWidthSlider, |
| 30 | LayoutSwitchModeStorageKey, | 33 | LayoutSwitchModeStorageKey, |
| 31 | LayoutSwitchPageLayoutMaxWidthSlider, | 34 | LayoutSwitchPageLayoutMaxWidthSlider, |
| 35 | LowEndDeviceModeStorageKey, | ||
| 32 | NolebaseEnhancedReadabilitiesMenu, | 36 | NolebaseEnhancedReadabilitiesMenu, |
| 33 | NolebaseEnhancedReadabilitiesScreenMenu, | 37 | NolebaseEnhancedReadabilitiesScreenMenu, |
| 34 | ScreenLayoutSwitch, | 38 | ScreenLayoutSwitch, |
| @@ -40,6 +44,7 @@ export { | |||
| 40 | } | 44 | } |
| 41 | 45 | ||
| 42 | const components = { | 46 | const components = { |
| 47 | NolebaseEnhancedReadabilitiesBlurEffects: BlurEffects, | ||
| 43 | NolebaseEnhancedReadabilitiesMenu, | 48 | NolebaseEnhancedReadabilitiesMenu, |
| 44 | NolebaseEnhancedReadabilitiesScreenMenu, | 49 | NolebaseEnhancedReadabilitiesScreenMenu, |
| 45 | NolebaseEnhancedReadabilitiesLayoutSwitch: LayoutSwitch, | 50 | NolebaseEnhancedReadabilitiesLayoutSwitch: LayoutSwitch, |
docs/.vitepress/theme/constants.ts +1
| @@ -27,6 +27,7 @@ export const SpotlightToggledStorageKey = | |||
| 27 | export const SpotlightStylesStorageKey = | 27 | export const SpotlightStylesStorageKey = |
| 28 | 'vitepress-nolebase-enhanced-readabilities-spotlight-styles' | 28 | 'vitepress-nolebase-enhanced-readabilities-spotlight-styles' |
| 29 | 29 | ||
| 30 | export const LowEndDeviceModeStorageKey = 'preference-low-end-device-mode' | ||
| 30 | export const TakodachiStorageKey = 'preference-takodachi' | 31 | export const TakodachiStorageKey = 'preference-takodachi' |
| 31 | 32 | ||
| 32 | export enum LayoutMode { | 33 | export enum LayoutMode { |
docs/.vitepress/theme/styles/style.scss +86 −14
| @@ -1212,16 +1212,29 @@ table tr:nth-child(odd) { | |||
| 1212 | 1212 | ||
| 1213 | %thin-scrollbar { | 1213 | %thin-scrollbar { |
| 1214 | scrollbar-width: thin; | 1214 | scrollbar-width: thin; |
| 1215 | &::-webkit-scrollbar { width: 8px; } | 1215 | &::-webkit-scrollbar { |
| 1216 | &::-webkit-scrollbar-track { background: transparent; } | 1216 | width: 8px; |
| 1217 | &::-webkit-scrollbar-thumb { border-radius: 4px; } | 1217 | } |
| 1218 | &::-webkit-scrollbar-track { | ||
| 1219 | background: transparent; | ||
| 1220 | } | ||
| 1221 | &::-webkit-scrollbar-thumb { | ||
| 1222 | border-radius: 4px; | ||
| 1223 | } | ||
| 1218 | } | 1224 | } |
| 1219 | 1225 | ||
| 1220 | %thin-scrollbar-narrow { | 1226 | %thin-scrollbar-narrow { |
| 1221 | scrollbar-width: thin; | 1227 | scrollbar-width: thin; |
| 1222 | &::-webkit-scrollbar { width: 6px; } | 1228 | &::-webkit-scrollbar { |
| 1223 | &::-webkit-scrollbar-track { background: transparent; } | 1229 | width: 6px; |
| 1224 | &::-webkit-scrollbar-thumb { border-radius: 3px; background-color: var(--vp-c-divider); } | 1230 | } |
| 1231 | &::-webkit-scrollbar-track { | ||
| 1232 | background: transparent; | ||
| 1233 | } | ||
| 1234 | &::-webkit-scrollbar-thumb { | ||
| 1235 | border-radius: 3px; | ||
| 1236 | background-color: var(--vp-c-divider); | ||
| 1237 | } | ||
| 1225 | } | 1238 | } |
| 1226 | 1239 | ||
| 1227 | /* Home sidebar menu button in navbar */ | 1240 | /* Home sidebar menu button in navbar */ |
| @@ -1338,9 +1351,8 @@ table tr:nth-child(odd) { | |||
| 1338 | 1351 | ||
| 1339 | /* Home NavScreen: restyle as left-aligned floating panel matching VPSidebar */ | 1352 | /* Home NavScreen: restyle as left-aligned floating panel matching VPSidebar */ |
| 1340 | .VPNavScreen:has(.home-screen-nav) { | 1353 | .VPNavScreen:has(.home-screen-nav) { |
| 1341 | @apply bg-white/85 dark:bg-neutral-800/85 | 1354 | @apply bg-white/85 dark:bg-neutral-800/85 border dark:border-neutral-700 |
| 1342 | border dark:border-neutral-700 border-neutral-200 | 1355 | border-neutral-200 rounded-3xl backdrop-blur shadow-lg; |
| 1343 | rounded-3xl backdrop-blur shadow-lg; | ||
| 1344 | padding: 0 !important; | 1356 | padding: 0 !important; |
| 1345 | left: 0.5rem !important; | 1357 | left: 0.5rem !important; |
| 1346 | right: auto !important; | 1358 | right: auto !important; |
| @@ -1379,9 +1391,13 @@ table tr:nth-child(odd) { | |||
| 1379 | .VPNavScreen:has(.home-screen-nav) { | 1391 | .VPNavScreen:has(.home-screen-nav) { |
| 1380 | &.fade-enter-active, | 1392 | &.fade-enter-active, |
| 1381 | &.fade-leave-active { | 1393 | &.fade-leave-active { |
| 1382 | transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.25s !important; | 1394 | transition: |
| 1395 | transform 0.3s cubic-bezier(0.19, 1, 0.22, 1), | ||
| 1396 | opacity 0.25s !important; | ||
| 1383 | 1397 | ||
| 1384 | .container { transform: none !important; } | 1398 | .container { |
| 1399 | transform: none !important; | ||
| 1400 | } | ||
| 1385 | } | 1401 | } |
| 1386 | 1402 | ||
| 1387 | &.fade-enter-from, | 1403 | &.fade-enter-from, |
| @@ -1391,6 +1407,60 @@ table tr:nth-child(odd) { | |||
| 1391 | } | 1407 | } |
| 1392 | } | 1408 | } |
| 1393 | 1409 | ||
| 1410 | html.reduce-blur-effects { | ||
| 1411 | &::view-transition-group(root), | ||
| 1412 | &::view-transition-new(root), | ||
| 1413 | &::view-transition-old(root) { | ||
| 1414 | animation: none !important; | ||
| 1415 | } | ||
| 1416 | |||
| 1417 | .VPLocalNav > .container > .menu, | ||
| 1418 | .VPLocalNav > .container > .VPLocalNavOutlineDropdown > button, | ||
| 1419 | .VPLocalNav > .container > .VPLocalNavOutlineDropdown > .items, | ||
| 1420 | .VPSidebar, | ||
| 1421 | .VPLocalSearchBox > .shell, | ||
| 1422 | .VPNavBarMenuGroup > .menu, | ||
| 1423 | .VPNavBarExtra.extra > .menu, | ||
| 1424 | .VPNavBarMenu.menu > .VPFlyout.VPNavBarMenuGroup > .button, | ||
| 1425 | .VPNavBarMenu.menu > a, | ||
| 1426 | .VPNavBarAppearance.appearance, | ||
| 1427 | .VPSocialLinks.VPNavBarSocialLinks.social-links, | ||
| 1428 | .VPFlyout.VPNavBarExtra.extra > .button, | ||
| 1429 | #local-search > .DocSearch-Button, | ||
| 1430 | .VPNolebaseEnhancedReadabilitiesMenuFlyout, | ||
| 1431 | .VPNavScreen:has(.home-screen-nav) { | ||
| 1432 | backdrop-filter: none !important; | ||
| 1433 | -webkit-backdrop-filter: none !important; | ||
| 1434 | } | ||
| 1435 | |||
| 1436 | .VPLocalNav > .container > .menu, | ||
| 1437 | .VPLocalNav > .container > .VPLocalNavOutlineDropdown > button, | ||
| 1438 | .VPLocalNav > .container > .VPLocalNavOutlineDropdown > .items, | ||
| 1439 | .VPLocalSearchBox > .shell, | ||
| 1440 | .VPNavBarMenuGroup > .menu > .VPMenu, | ||
| 1441 | .VPNavBarExtra.extra > .menu > .VPMenu, | ||
| 1442 | .VPNavBarMenu.menu > .VPFlyout.VPNavBarMenuGroup > .button, | ||
| 1443 | .VPNavBarMenu.menu > a, | ||
| 1444 | .VPNavBarAppearance.appearance, | ||
| 1445 | .VPSocialLinks.VPNavBarSocialLinks.social-links, | ||
| 1446 | .VPFlyout.VPNavBarExtra.extra, | ||
| 1447 | .VPNavScreen:has(.home-screen-nav) { | ||
| 1448 | background-color: var(--vp-c-bg) !important; | ||
| 1449 | } | ||
| 1450 | |||
| 1451 | .VPNavBarAppearance.appearance, | ||
| 1452 | .VPSocialLinks.VPNavBarSocialLinks.social-links, | ||
| 1453 | .VPNolebaseEnhancedReadabilitiesMenuFlyout { | ||
| 1454 | background-color: #151617 !important; | ||
| 1455 | } | ||
| 1456 | |||
| 1457 | @media (max-width: 959.9px) { | ||
| 1458 | .VPSidebar { | ||
| 1459 | background-color: var(--vp-sidebar-bg-color) !important; | ||
| 1460 | } | ||
| 1461 | } | ||
| 1462 | } | ||
| 1463 | |||
| 1394 | /* Icon tooltips (hover on desktop, tap on mobile) */ | 1464 | /* Icon tooltips (hover on desktop, tap on mobile) */ |
| 1395 | .icon-tip { | 1465 | .icon-tip { |
| 1396 | position: relative; | 1466 | position: relative; |
| @@ -1447,7 +1517,9 @@ table tr:nth-child(odd) { | |||
| 1447 | margin: 0 !important; | 1517 | margin: 0 !important; |
| 1448 | margin-right: 1px !important; | 1518 | margin-right: 1px !important; |
| 1449 | 1519 | ||
| 1450 | .col-cell { width: 34px; } | 1520 | .col-cell { |
| 1521 | width: 34px; | ||
| 1522 | } | ||
| 1451 | 1523 | ||
| 1452 | tr { | 1524 | tr { |
| 1453 | background: transparent !important; | 1525 | background: transparent !important; |
| @@ -1517,7 +1589,7 @@ table tr:nth-child(odd) { | |||
| 1517 | position: relative; | 1589 | position: relative; |
| 1518 | 1590 | ||
| 1519 | &::before { | 1591 | &::before { |
| 1520 | content: ''; | 1592 | content: ""; |
| 1521 | display: block; | 1593 | display: block; |
| 1522 | width: 100%; | 1594 | width: 100%; |
| 1523 | height: 100%; | 1595 | height: 100%; |
| @@ -1562,4 +1634,4 @@ table tr:nth-child(odd) { | |||
| 1562 | .vp-doc .vp-card .vp-card-title { | 1634 | .vp-doc .vp-card .vp-card-title { |
| 1563 | text-decoration: none !important; | 1635 | text-decoration: none !important; |
| 1564 | border-top: none !important; | 1636 | border-top: none !important; |
| 1565 | }\ No newline at end of file | 1637 | } |