feat: 利用AI更新文档

This commit is contained in:
Lan
2025-12-01 14:10:06 +08:00
parent 859a51516a
commit a3f1fd6a4c
20 changed files with 4598 additions and 313 deletions
-275
View File
@@ -1,275 +0,0 @@
import {
useMediaQuery
} from "./chunk-KT7LHMJ2.js";
import {
computed,
ref,
shallowRef,
watch
} from "./chunk-CQOUZRMK.js";
// node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/index.js
import "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/styles/fonts.css";
// node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/without-fonts.js
import "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/styles/vars.css";
import "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/styles/base.css";
import "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/styles/icons.css";
import "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/styles/utils.css";
import "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/styles/components/custom-block.css";
import "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/styles/components/vp-code.css";
import "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/styles/components/vp-code-group.css";
import "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/styles/components/vp-doc.css";
import "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/styles/components/vp-sponsor.css";
import VPBadge from "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/components/VPBadge.vue";
import Layout from "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/Layout.vue";
import { default as default2 } from "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/components/VPBadge.vue";
import { default as default3 } from "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/components/VPButton.vue";
import { default as default4 } from "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/components/VPDocAsideSponsors.vue";
import { default as default5 } from "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/components/VPFeatures.vue";
import { default as default6 } from "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/components/VPHomeContent.vue";
import { default as default7 } from "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/components/VPHomeFeatures.vue";
import { default as default8 } from "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/components/VPHomeHero.vue";
import { default as default9 } from "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/components/VPHomeSponsors.vue";
import { default as default10 } from "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/components/VPImage.vue";
import { default as default11 } from "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/components/VPLink.vue";
import { default as default12 } from "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/components/VPNavBarSearch.vue";
import { default as default13 } from "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/components/VPSocialLink.vue";
import { default as default14 } from "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/components/VPSocialLinks.vue";
import { default as default15 } from "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/components/VPSponsors.vue";
import { default as default16 } from "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/components/VPTeamMembers.vue";
import { default as default17 } from "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/components/VPTeamPage.vue";
import { default as default18 } from "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/components/VPTeamPageSection.vue";
import { default as default19 } from "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/components/VPTeamPageTitle.vue";
// node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/composables/local-nav.js
import { onContentUpdated } from "vitepress";
// node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/composables/outline.js
import { getScrollOffset } from "vitepress";
// node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/support/utils.js
import { withBase } from "vitepress";
// node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/composables/data.js
import { useData as useData$ } from "vitepress";
var useData = useData$;
// node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/support/utils.js
function ensureStartingSlash(path) {
return path.startsWith("/") ? path : `/${path}`;
}
// node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/support/sidebar.js
function getSidebar(_sidebar, path) {
if (Array.isArray(_sidebar))
return addBase(_sidebar);
if (_sidebar == null)
return [];
path = ensureStartingSlash(path);
const dir = Object.keys(_sidebar).sort((a, b) => {
return b.split("/").length - a.split("/").length;
}).find((dir2) => {
return path.startsWith(ensureStartingSlash(dir2));
});
const sidebar = dir ? _sidebar[dir] : [];
return Array.isArray(sidebar) ? addBase(sidebar) : addBase(sidebar.items, sidebar.base);
}
function getSidebarGroups(sidebar) {
const groups = [];
let lastGroupIndex = 0;
for (const index in sidebar) {
const item = sidebar[index];
if (item.items) {
lastGroupIndex = groups.push(item);
continue;
}
if (!groups[lastGroupIndex]) {
groups.push({ items: [] });
}
groups[lastGroupIndex].items.push(item);
}
return groups;
}
function addBase(items, _base) {
return [...items].map((_item) => {
const item = { ..._item };
const base = item.base || _base;
if (base && item.link)
item.link = base + item.link;
if (item.items)
item.items = addBase(item.items, base);
return item;
});
}
// node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/composables/sidebar.js
function useSidebar() {
const { frontmatter, page, theme: theme2 } = useData();
const is960 = useMediaQuery("(min-width: 960px)");
const isOpen = ref(false);
const _sidebar = computed(() => {
const sidebarConfig = theme2.value.sidebar;
const relativePath = page.value.relativePath;
return sidebarConfig ? getSidebar(sidebarConfig, relativePath) : [];
});
const sidebar = ref(_sidebar.value);
watch(_sidebar, (next, prev) => {
if (JSON.stringify(next) !== JSON.stringify(prev))
sidebar.value = _sidebar.value;
});
const hasSidebar = computed(() => {
return frontmatter.value.sidebar !== false && sidebar.value.length > 0 && frontmatter.value.layout !== "home";
});
const leftAside = computed(() => {
if (hasAside)
return frontmatter.value.aside == null ? theme2.value.aside === "left" : frontmatter.value.aside === "left";
return false;
});
const hasAside = computed(() => {
if (frontmatter.value.layout === "home")
return false;
if (frontmatter.value.aside != null)
return !!frontmatter.value.aside;
return theme2.value.aside !== false;
});
const isSidebarEnabled = computed(() => hasSidebar.value && is960.value);
const sidebarGroups = computed(() => {
return hasSidebar.value ? getSidebarGroups(sidebar.value) : [];
});
function open() {
isOpen.value = true;
}
function close() {
isOpen.value = false;
}
function toggle() {
isOpen.value ? close() : open();
}
return {
isOpen,
sidebar,
sidebarGroups,
hasSidebar,
hasAside,
leftAside,
isSidebarEnabled,
open,
close,
toggle
};
}
// node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/composables/outline.js
var ignoreRE = /\b(?:VPBadge|header-anchor|footnote-ref|ignore-header)\b/;
var resolvedHeaders = [];
function getHeaders(range) {
const headers = [
...document.querySelectorAll(".VPDoc :where(h1,h2,h3,h4,h5,h6)")
].filter((el) => el.id && el.hasChildNodes()).map((el) => {
const level = Number(el.tagName[1]);
return {
element: el,
title: serializeHeader(el),
link: "#" + el.id,
level
};
});
return resolveHeaders(headers, range);
}
function serializeHeader(h) {
let ret = "";
for (const node of h.childNodes) {
if (node.nodeType === 1) {
if (ignoreRE.test(node.className))
continue;
ret += node.textContent;
} else if (node.nodeType === 3) {
ret += node.textContent;
}
}
return ret.trim();
}
function resolveHeaders(headers, range) {
if (range === false) {
return [];
}
const levelsRange = (typeof range === "object" && !Array.isArray(range) ? range.level : range) || 2;
const [high, low] = typeof levelsRange === "number" ? [levelsRange, levelsRange] : levelsRange === "deep" ? [2, 6] : levelsRange;
return buildTree(headers, high, low);
}
function buildTree(data, min, max) {
resolvedHeaders.length = 0;
const result = [];
const stack = [];
data.forEach((item) => {
const node = { ...item, children: [] };
let parent = stack[stack.length - 1];
while (parent && parent.level >= node.level) {
stack.pop();
parent = stack[stack.length - 1];
}
if (node.element.classList.contains("ignore-header") || parent && "shouldIgnore" in parent) {
stack.push({ level: node.level, shouldIgnore: true });
return;
}
if (node.level > max || node.level < min)
return;
resolvedHeaders.push({ element: node.element, link: node.link });
if (parent)
parent.children.push(node);
else
result.push(node);
stack.push(node);
});
return result;
}
// node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/composables/local-nav.js
function useLocalNav() {
const { theme: theme2, frontmatter } = useData();
const headers = shallowRef([]);
const hasLocalNav = computed(() => {
return headers.value.length > 0;
});
onContentUpdated(() => {
headers.value = getHeaders(frontmatter.value.outline ?? theme2.value.outline);
});
return {
headers,
hasLocalNav
};
}
// node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/without-fonts.js
var theme = {
Layout,
enhanceApp: ({ app }) => {
app.component("Badge", VPBadge);
}
};
var without_fonts_default = theme;
export {
default2 as VPBadge,
default3 as VPButton,
default4 as VPDocAsideSponsors,
default5 as VPFeatures,
default6 as VPHomeContent,
default7 as VPHomeFeatures,
default8 as VPHomeHero,
default9 as VPHomeSponsors,
default10 as VPImage,
default11 as VPLink,
default12 as VPNavBarSearch,
default13 as VPSocialLink,
default14 as VPSocialLinks,
default15 as VPSponsors,
default16 as VPTeamMembers,
default17 as VPTeamPage,
default18 as VPTeamPageSection,
default19 as VPTeamPageTitle,
without_fonts_default as default,
useLocalNav,
useSidebar
};
//# sourceMappingURL=@theme_index.js.map
File diff suppressed because one or more lines are too long
+9 -15
View File
@@ -1,49 +1,43 @@
{
"hash": "d07f6dee",
"configHash": "dee2d3bc",
"hash": "8f855eaf",
"configHash": "1b3ca22f",
"lockfileHash": "bd28b2c2",
"browserHash": "b96651ac",
"browserHash": "29e84937",
"optimized": {
"vue": {
"src": "../../../node_modules/.pnpm/vue@3.5.13/node_modules/vue/dist/vue.runtime.esm-bundler.js",
"file": "vue.js",
"fileHash": "bc5c7f34",
"fileHash": "3215885f",
"needsInterop": false
},
"vitepress > @vue/devtools-api": {
"src": "../../../node_modules/.pnpm/@vue+devtools-api@7.7.1/node_modules/@vue/devtools-api/dist/index.js",
"file": "vitepress___@vue_devtools-api.js",
"fileHash": "00859881",
"fileHash": "5a5f95ef",
"needsInterop": false
},
"vitepress > @vueuse/core": {
"src": "../../../node_modules/.pnpm/@vueuse+core@12.5.0/node_modules/@vueuse/core/index.mjs",
"file": "vitepress___@vueuse_core.js",
"fileHash": "1c6da938",
"fileHash": "0fbf66f0",
"needsInterop": false
},
"vitepress > @vueuse/integrations/useFocusTrap": {
"src": "../../../node_modules/.pnpm/@vueuse+integrations@12.5.0_focus-trap@7.6.4/node_modules/@vueuse/integrations/useFocusTrap.mjs",
"file": "vitepress___@vueuse_integrations_useFocusTrap.js",
"fileHash": "11c08fcf",
"fileHash": "91b03896",
"needsInterop": false
},
"vitepress > mark.js/src/vanilla.js": {
"src": "../../../node_modules/.pnpm/mark.js@8.11.1/node_modules/mark.js/src/vanilla.js",
"file": "vitepress___mark__js_src_vanilla__js.js",
"fileHash": "b93dbfe7",
"fileHash": "99e4f81c",
"needsInterop": false
},
"vitepress > minisearch": {
"src": "../../../node_modules/.pnpm/minisearch@7.1.1/node_modules/minisearch/dist/es/index.js",
"file": "vitepress___minisearch.js",
"fileHash": "bfb6c3ac",
"needsInterop": false
},
"@theme/index": {
"src": "../../../node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/index.js",
"file": "@theme_index.js",
"fileHash": "07512287",
"fileHash": "cc176c9c",
"needsInterop": false
}
},
+473
View File
@@ -0,0 +1,473 @@
:root {
/* --- 核心色板清晨薄雾 (Teal -> Sky) --- */
--vp-c-brand-1: #14b8a6; /* Teal 500 */
--vp-c-brand-2: #0ea5e9; /* Sky 500 */
--vp-c-brand-3: #0f766e; /* Teal 700 */
--vp-c-brand-soft: rgba(20, 184, 166, 0.14);
/* --- 背景色极简与通透 --- */
--vp-c-bg: #ffffff;
--vp-c-bg-alt: #f8fafc; /* Slate 50 */
--vp-c-bg-elv: #ffffff;
/* --- 文字颜色柔和的深灰而非纯黑 --- */
--vp-c-text-1: #334155; /* Slate 700 */
--vp-c-text-2: #64748b; /* Slate 500 */
--vp-c-text-3: #94a3b8; /* Slate 400 */
/* --- 边框与分隔 --- */
--vp-c-border: #e2e8f0;
--vp-c-divider: #f1f5f9;
/* --- 阴影扩散柔光 --- */
--vp-shadow-1: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
--vp-shadow-2: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
--vp-shadow-brand: 0 4px 14px 0 rgba(20, 184, 166, 0.3);
/* --- 布局参数 --- */
--vp-nav-height: 64px;
--vp-sidebar-width: 280px;
--vp-radius-default: 12px;
--vp-radius-small: 6px;
}
/* * ==========================================
* 暗黑模式重构 (Deep Ocean Theme)
* ==========================================
*/
.dark {
/* 背景更深邃的蓝黑色更有沉浸感 */
--vp-c-bg: #020617; /* Slate 950 */
--vp-c-bg-alt: #0f172a; /* Slate 900 */
--vp-c-bg-elv: #1e293b; /* Slate 800 */
/* 文字降低纯白刺眼感提高舒适度 */
--vp-c-text-1: #f8fafc; /* Slate 50 */
--vp-c-text-2: #94a3b8; /* Slate 400 */
--vp-c-text-3: #64748b; /* Slate 500 */
/* 边框更细腻的深色线条 */
--vp-c-border: #1e293b;
--vp-c-divider: #0f172a;
/* 品牌色调亮产生荧光感 */
--vp-c-brand-1: #2dd4bf; /* Teal 400 */
--vp-c-brand-2: #38bdf8; /* Sky 400 */
--vp-c-brand-3: #14b8a6; /* Teal 500 */
--vp-c-brand-soft: rgba(45, 212, 191, 0.15); /* 淡淡的荧光底色 */
/* 阴影暗色环境下的微光 */
--vp-shadow-1: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
--vp-shadow-2: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
--vp-shadow-brand: 0 0 20px rgba(45, 212, 191, 0.3); /* 品牌色发光 */
}
/* 全局基础设置 */
body {
font-family: 'Noto Sans SC', sans-serif;
background-color: var(--vp-c-bg-alt);
color: var(--vp-c-text-1);
margin: 0;
transition: background-color 0.3s, color 0.3s;
overflow-x: hidden;
}
a { text-decoration: none; color: inherit; transition: color 0.2s; }
/* -------------------------------------------
布局结构 (模拟 VitePress 布局)
------------------------------------------- */
.app-container {
display: flex;
flex-direction: column;
min-height: 100vh;
}
/* 1. 导航栏毛玻璃 + 悬浮感 */
.VPNavBar {
position: fixed;
top: 0;
left: 0;
right: 0;
height: var(--vp-nav-height);
background-color: rgba(255, 255, 255, 0.85); /* 稍微增加不透明度 */
backdrop-filter: blur(20px) saturate(180%);
-webkit-backdrop-filter: blur(20px) saturate(180%);
border-bottom: 1px solid rgba(226, 232, 240, 0.6);
z-index: 50;
display: flex;
align-items: center;
padding: 0 24px;
justify-content: space-between;
}
.dark .VPNavBar {
background-color: rgba(2, 6, 23, 0.85); /* 深色背景半透 */
border-bottom: 1px solid rgba(30, 41, 59, 0.7);
}
.nav-logo {
font-weight: 700;
font-size: 1.2rem;
background: linear-gradient(120deg, var(--vp-c-brand-1), var(--vp-c-brand-2));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
display: flex;
align-items: center;
gap: 8px;
}
.nav-links {
display: flex;
gap: 24px;
font-size: 0.9rem;
font-weight: 500;
color: var(--vp-c-text-2);
}
.nav-link:hover {
color: var(--vp-c-brand-1);
}
.nav-link.active {
color: var(--vp-c-brand-1);
position: relative;
}
.nav-link.active::after {
content: '';
position: absolute;
bottom: -22px;
left: 0;
width: 100%;
height: 2px;
background: var(--vp-c-brand-1);
border-radius: 2px 2px 0 0;
box-shadow: 0 -2px 10px var(--vp-c-brand-1); /* 激活状态发光 */
}
/* 2. 侧边栏极简卡片式 */
.VPSidebar {
position: fixed;
top: var(--vp-nav-height);
left: 0;
bottom: 0;
width: var(--vp-sidebar-width);
background-color: var(--vp-c-bg); /* 实色背景 */
border-right: 1px solid var(--vp-c-border);
padding: 32px 24px;
overflow-y: auto;
transform: translateX(0);
transition: transform 0.3s ease;
z-index: 40;
}
.dark .VPSidebar {
background-color: var(--vp-c-bg-alt); /* 侧边栏比内容区稍微亮一点点/或者暗一点 */
}
@media (max-width: 960px) {
.VPSidebar { transform: translateX(-100%); }
.VPSidebar.open { transform: translateX(0); }
}
.sidebar-group-title {
font-weight: 700;
color: var(--vp-c-text-1);
margin-bottom: 12px;
margin-top: 24px;
font-size: 1rem;
}
.sidebar-group-title:first-child { margin-top: 0; }
.sidebar-link {
display: block;
padding: 8px 12px;
margin: 4px 0;
border-radius: var(--vp-radius-small);
color: var(--vp-c-text-2);
font-size: 0.95rem;
transition: all 0.2s;
}
.sidebar-link:hover {
background-color: var(--vp-c-bg-alt);
color: var(--vp-c-brand-1);
}
.dark .sidebar-link:hover {
background-color: var(--vp-c-bg-elv);
}
.sidebar-link.active {
background-color: var(--vp-c-brand-soft);
color: var(--vp-c-brand-3);
font-weight: 600;
}
.dark .sidebar-link.active {
color: var(--vp-c-brand-1);
background-color: rgba(45, 212, 191, 0.1); /* 暗色模式下更通透 */
box-shadow: inset 2px 0 0 0 var(--vp-c-brand-1); /* 左侧高亮条 */
}
/* 3. 主内容区居中与留白 */
.VPContent {
margin-top: var(--vp-nav-height);
margin-left: var(--vp-sidebar-width);
padding: 48px 64px;
min-height: calc(100vh - var(--vp-nav-height));
background-color: var(--vp-c-bg);
transition: margin-left 0.3s ease;
}
@media (max-width: 960px) {
.VPContent { margin-left: 0; padding: 32px 24px; }
}
/* 内容排版 (Typography) */
.vp-doc h1 {
font-size: 2.5rem;
font-weight: 800;
margin-bottom: 1.5rem;
line-height: 1.2;
background: linear-gradient(120deg, var(--vp-c-brand-1), var(--vp-c-brand-2));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
display: inline-block;
/* 暗色模式下加一点文字阴影增强可读性 */
filter: drop-shadow(0 0 2em rgba(20, 184, 166, 0.2));
}
.dark .vp-doc h1 {
filter: drop-shadow(0 0 25px rgba(45, 212, 191, 0.2));
}
.vp-doc h2 {
font-size: 1.8rem;
margin-top: 3rem;
margin-bottom: 1rem;
padding-bottom: 0.5rem;
border-bottom: 1px solid var(--vp-c-border);
color: var(--vp-c-text-1);
}
.vp-doc h3 {
font-size: 1.4rem;
margin-top: 2rem;
margin-bottom: 0.8rem;
color: var(--vp-c-text-1);
}
.vp-doc p {
line-height: 1.8;
margin-bottom: 1.2rem;
color: var(--vp-c-text-2);
font-size: 1.05rem;
}
/* 代码块美化 */
.vp-doc pre {
background-color: #1e293b; /* Dark Slate */
border-radius: var(--vp-radius-default);
padding: 20px;
overflow-x: auto;
color: #f8fafc;
margin: 24px 0;
border: 1px solid rgba(0,0,0,0.1);
box-shadow: var(--vp-shadow-1);
}
.dark .vp-doc pre {
background-color: #0f172a; /* 更深一层的背景 */
border: 1px solid #1e293b;
}
.vp-doc code {
font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
font-size: 0.9em;
}
.vp-doc p code {
background-color: var(--vp-c-brand-soft);
color: var(--vp-c-brand-3);
padding: 2px 6px;
border-radius: 4px;
font-size: 0.9em;
}
.dark .vp-doc p code {
color: var(--vp-c-brand-1);
background-color: rgba(45, 212, 191, 0.1);
}
/* 引用块 (Blockquote) */
.vp-doc blockquote {
margin: 1.5rem 0;
padding: 16px 24px;
background-color: var(--vp-c-bg-alt);
border-left: 4px solid var(--vp-c-brand-1);
border-radius: 0 var(--vp-radius-default) var(--vp-radius-default) 0;
color: var(--vp-c-text-2);
}
.dark .vp-doc blockquote {
background-color: rgba(30, 41, 59, 0.5);
}
/* 按钮与卡片 (Features) */
.vp-button {
display: inline-block;
padding: 0 24px;
height: 48px;
line-height: 48px;
border-radius: 24px; /* Pill shape */
font-weight: 600;
font-size: 1rem;
transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
cursor: pointer;
border: none;
}
.vp-button.brand {
background: linear-gradient(135deg, var(--vp-c-brand-1), var(--vp-c-brand-2));
color: white;
box-shadow: var(--vp-shadow-brand);
}
.dark .vp-button.brand {
color: #020617; /* 暗色模式下按钮文字用深色,因为背景亮 */
}
.vp-button.brand:hover {
transform: translateY(-2px);
box-shadow: 0 8px 25px -4px rgba(20, 184, 166, 0.5);
}
.dark .vp-button.brand:hover {
box-shadow: 0 0 30px -4px rgba(45, 212, 191, 0.6); /* 发光增强 */
}
.vp-button.alt {
background-color: var(--vp-c-bg-alt);
color: var(--vp-c-text-1);
border: 1px solid var(--vp-c-border);
}
.dark .vp-button.alt {
background-color: transparent;
border-color: var(--vp-c-text-2);
color: var(--vp-c-text-1);
}
.vp-button.alt:hover {
border-color: var(--vp-c-brand-1);
color: var(--vp-c-brand-1);
}
/* 工具类 */
.theme-toggle {
background: none;
border: none;
cursor: pointer;
font-size: 1.5rem;
color: var(--vp-c-text-2);
display: flex;
align-items: center;
justify-content: center;
padding: 8px;
border-radius: 50%;
transition: background 0.2s;
}
.theme-toggle:hover {
background-color: var(--vp-c-bg-alt);
color: var(--vp-c-brand-1);
}
.dark .theme-toggle:hover {
background-color: var(--vp-c-bg-elv);
}
.mobile-menu-btn {
display: none;
background: none;
border: none;
font-size: 1.5rem;
color: var(--vp-c-text-1);
cursor: pointer;
}
@media (max-width: 960px) {
.mobile-menu-btn { display: block; }
.nav-links { display: none; }
}
/* 首页 Hero 样式模拟 */
.hero-section {
text-align: center;
padding: 80px 20px;
max-width: 800px;
margin: 0 auto;
}
.hero-title {
font-size: 3.5rem;
font-weight: 900;
line-height: 1.1;
margin-bottom: 24px;
}
.hero-title span {
background: linear-gradient(120deg, var(--vp-c-brand-1), var(--vp-c-brand-2));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.hero-desc {
font-size: 1.5rem;
color: var(--vp-c-text-2);
margin-bottom: 40px;
}
.hero-actions {
display: flex;
gap: 16px;
justify-content: center;
}
/* Features Grid */
.features-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 24px;
margin-top: 64px;
}
.feature-card {
background-color: var(--vp-c-bg-alt);
padding: 24px;
border-radius: var(--vp-radius-default);
transition: transform 0.3s, box-shadow 0.3s;
border: 1px solid transparent;
}
.dark .feature-card {
background-color: rgba(30, 41, 59, 0.3); /* 微微透明 */
border: 1px solid rgba(255,255,255,0.05);
}
.feature-card:hover {
background-color: var(--vp-c-bg);
transform: translateY(-4px);
box-shadow: var(--vp-shadow-2);
border-color: var(--vp-c-brand-soft);
}
.dark .feature-card:hover {
background-color: var(--vp-c-bg-elv);
border-color: var(--vp-c-brand-1);
box-shadow: 0 0 15px rgba(45, 212, 191, 0.1);
}
.feature-icon {
font-size: 2rem;
margin-bottom: 16px;
color: var(--vp-c-brand-1);
background-color: var(--vp-c-brand-soft);
width: 48px;
height: 48px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 12px;
}
.feature-title {
font-weight: 700;
margin-bottom: 8px;
color: var(--vp-c-text-1);
}
.feature-details {
color: var(--vp-c-text-2);
font-size: 0.95rem;
line-height: 1.6;
}
+6
View File
@@ -0,0 +1,6 @@
import DefaultTheme from 'vitepress/theme'
import './custom.css'
export default {
...DefaultTheme,
}