/* ============================================================ * design/_theme.js — 原型共享脚本层 * ============================================================ * 职责: * 1. fetch _nav.html → 注入各页 .sidebar-mount * 2. 按 mount 的 data-active 高亮当前页 nav-item * 3. logo 点击 → index.html(目录入口) * 4. #theme-toggle 切换暗/亮,localStorage 持久化 * * file:// 限制:fetch 在 file:// 协议下被 CORS 拦截,会显示 fallback * 提示。请用 `pnpm design` 启动本地预览服务器获得完整导航。 * * 用法:页面末尾 * 页面 body 内放
* ============================================================ */ (function () { "use strict"; var ROOT = document.documentElement; /* iframe 缩略图态:index.html 以 live