mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-16 01:40:46 +08:00
docs: 文档站小修复 (#13659)
* fix: 去掉按tab可以选中的在页面左上角的`跳至主要内容` * build: update turbo to 2.5.5 * fix: 干掉语言列表里面的根目录
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import type { VNode } from "vue";
|
||||
import { defineComponent, h } from "vue";
|
||||
import { defineComponent, h, computed } from "vue";
|
||||
|
||||
import NavbarDropdown from "@theme-hope/modules/navbar/components/NavbarDropdown";
|
||||
import { I18nIcon } from "@theme-hope/modules/navbar/components/icons/index";
|
||||
@@ -11,17 +11,20 @@ export default defineComponent({
|
||||
setup() {
|
||||
const dropdown = useNavbarLanguageDropdown();
|
||||
|
||||
const filteredDropdown = () => {
|
||||
const filteredDropdown = computed(() => {
|
||||
if (!dropdown.value) return null;
|
||||
|
||||
const filteredConfig = { ...dropdown.value };
|
||||
|
||||
if (filteredConfig.children) {
|
||||
filteredConfig.children = filteredConfig.children.filter(item => item.link !== '/');
|
||||
filteredConfig.children = filteredConfig.children.filter(item => {
|
||||
// 过滤掉跳转到根目录的项目
|
||||
return item.link !== '/' && item.link !== '/docs/' && !item.link?.endsWith('/docs/');
|
||||
});
|
||||
}
|
||||
|
||||
return filteredConfig;
|
||||
};
|
||||
});
|
||||
|
||||
//console.log("OldLanguageDropdown", dropdown.value);
|
||||
//console.log("NewLanguageDropdown", filteredDropdown());
|
||||
@@ -33,11 +36,11 @@ export default defineComponent({
|
||||
{ class: "vp-nav-item" },
|
||||
h(
|
||||
NavbarDropdown,
|
||||
{ config: filteredDropdown() },
|
||||
{ config: filteredDropdown.value },
|
||||
{
|
||||
title: () =>
|
||||
h(I18nIcon, {
|
||||
"aria-label": filteredDropdown()?.ariaLabel,
|
||||
"aria-label": filteredDropdown.value?.ariaLabel,
|
||||
style: {
|
||||
width: "1rem",
|
||||
height: "1rem",
|
||||
|
||||
@@ -14,11 +14,6 @@ export default defineUserConfig({
|
||||
port: 3001,
|
||||
|
||||
locales: {
|
||||
"/": {
|
||||
lang: " ",
|
||||
title: " ",
|
||||
description: " ",
|
||||
},
|
||||
"/zh-cn/": {
|
||||
lang: "zh-cn",
|
||||
description: "文档",
|
||||
|
||||
@@ -10,6 +10,11 @@ $vp-font-mono: '"Sarasa Gothic", "Jetbrains mono", "Fira Code", "Noto Sans SC",
|
||||
visibility: hidden !important;
|
||||
}
|
||||
|
||||
.vp-skip-link.sr-only {
|
||||
display: none !important;
|
||||
visibility: hidden !important;
|
||||
}
|
||||
|
||||
html[lang="ja-JP"] {
|
||||
$vp-font: "Helvetica Neue, Arial, Hiragino Kaku Gothic ProN, Hiragino Sans, Meiryo, sans-serif";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user