diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/.vitepress/theme/VersionSwitcher.vue | 4 | ||||
| -rw-r--r-- | docs/.vitepress/theme/custom.css | 16 | ||||
| -rw-r--r-- | docs/tsconfig.json | 2 |
3 files changed, 12 insertions, 10 deletions
diff --git a/docs/.vitepress/theme/VersionSwitcher.vue b/docs/.vitepress/theme/VersionSwitcher.vue index 433d15c..e534426 100644 --- a/docs/.vitepress/theme/VersionSwitcher.vue +++ b/docs/.vitepress/theme/VersionSwitcher.vue @@ -39,7 +39,9 @@ const currentLocale = computed( () => site.value.locales[site.value.localeIndex]?.link?.replace(/\//g, '') || '', ); -const pathSegments = computed(() => router.route.data.relativePath.split('/')); +const pathSegments = computed(() => + router.route.path.replace(/^\/|\/$/g, '').split('/'), +); const activeVersion = computed(() => { const { currentVersion } = props.versioningPlugin; diff --git a/docs/.vitepress/theme/custom.css b/docs/.vitepress/theme/custom.css index 0fbcb32..a4ebd52 100644 --- a/docs/.vitepress/theme/custom.css +++ b/docs/.vitepress/theme/custom.css @@ -1,21 +1,21 @@ .version-banner { - display: none; + display: block; + padding: 12px 16px; + background-color: var(--vp-c-warning-soft); + color: var(--vp-c-warning-1); + text-align: center; + font-size: 14px; + line-height: 1.6; + border-bottom: 1px solid var(--vp-c-warning-2); } @media (min-width: 960px) { .version-banner { - display: block; position: fixed; top: 0; left: 0; right: 0; z-index: 30; padding: 12px 24px; - background-color: var(--vp-c-warning-soft); - color: var(--vp-c-warning-1); - text-align: center; - font-size: 14px; - line-height: 1.6; - border-bottom: 1px solid var(--vp-c-warning-2); } } diff --git a/docs/tsconfig.json b/docs/tsconfig.json index 40ea650..5f61eef 100644 --- a/docs/tsconfig.json +++ b/docs/tsconfig.json @@ -8,5 +8,5 @@ "jsx": "preserve", "skipLibCheck": true }, - "include": [".vitepress/**/*.ts", ".vitepress/**/*.vue"] + "include": [".vitepress/**/*.ts", ".vitepress/**/*.mts", ".vitepress/**/*.vue"] } |
