重构文档中心与视差效果

- 删除旧版 docs.html API 文档,改为手写 6 个独立 HTML 页面
  (index/why-python/architecture/quickstart/plugins/development)
- 新增 css/docs.css 文档页样式(左侧导航树 + 右侧内容区)
- 添加左下角固定 "获取更多信息" 按钮跳转 Gitee Wiki
- dock.js 增加 getPathPrefix() 自动计算相对路径,修复子页面导航跳转
- 首页 3D 立方体:替换 logo 为纯白交互正方体,悬停弹出对话框展示项目特点
- parallax.js 自动检测文档页和首页,统一景深速度为 1.0 (100px 最大移动)
- 删除 logo.svg、旧版构建脚本及 API 版文档文件
This commit is contained in:
Falck
2026-04-06 16:09:00 +08:00
parent 0e5c28e0b3
commit a615b2af0f
13 changed files with 1271 additions and 85 deletions

View File

@@ -24,6 +24,23 @@ class ParallaxTracker {
}
_init() {
// 自动检测文档页面
const docsContent = document.querySelector('.docs-content');
if (docsContent && !docsContent.hasAttribute('data-parallax-speed')) {
docsContent.setAttribute('data-parallax-speed', '1.0');
}
// 自动检测首页
const heroContent = document.querySelector('.hero-content');
if (heroContent && !heroContent.hasAttribute('data-parallax-speed')) {
heroContent.setAttribute('data-parallax-speed', '1.0');
}
const heroSection = document.querySelector('.page-hero');
if (heroSection && !heroSection.hasAttribute('data-parallax-speed')) {
heroSection.setAttribute('data-parallax-speed', '1.0');
}
// 查找视差元素
document.querySelectorAll('[data-parallax-speed]').forEach(el => {
const speed = parseFloat(el.dataset.parallaxSpeed) || 0.1;