diff --git a/public/index.html b/public/index.html index cf3dcd1..ca5df6f 100644 --- a/public/index.html +++ b/public/index.html @@ -21,8 +21,128 @@ } * { box-sizing: border-box; } html, body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--sans); -webkit-font-smoothing: antialiased; } - body { line-height: 1.65; font-size: 15px; } - .wrap { max-width: 980px; margin: 0 auto; padding: 48px 28px 96px; } + body { line-height: 1.65; font-size: 15px; scroll-behavior: smooth; } + + /* ── two-column layout ───────────────────────────────────────── */ + .layout { + max-width: 1280px; + margin: 0 auto; + padding: 0 28px; + display: grid; + grid-template-columns: 260px minmax(0, 1fr); + gap: 56px; + align-items: start; + } + .main { min-width: 0; padding: 48px 0 96px; max-width: 820px; } + + /* ── sticky sidebar + scrollspy TOC ──────────────────────────── */ + .sidebar { + position: sticky; + top: 0; + height: 100vh; + padding: 36px 0 28px; + overflow-y: auto; + border-right: 1px solid var(--border); + margin-right: -28px; + padding-right: 28px; + } + .sidebar::-webkit-scrollbar { width: 6px; } + .sidebar::-webkit-scrollbar-track { background: transparent; } + .sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; } + .sidebar::-webkit-scrollbar-thumb:hover { background: #2f3548; } + + .brand { + font-size: 12px; + letter-spacing: 0.14em; + text-transform: uppercase; + color: var(--muted); + padding-bottom: 10px; + margin-bottom: 14px; + border-bottom: 1px solid var(--border); + } + .brand b { color: var(--accent); font-weight: 600; } + + .toc-label { + font-size: 11px; + letter-spacing: 0.14em; + text-transform: uppercase; + color: var(--muted); + margin: 18px 0 10px; + } + nav.toc { display: flex; flex-direction: column; gap: 2px; } + nav.toc a { + display: block; + padding: 8px 12px 8px 16px; + font-size: 13px; + color: var(--muted); + border-left: 2px solid transparent; + border-radius: 0 6px 6px 0; + border-bottom: none; + transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease, padding-left 0.15s ease; + line-height: 1.4; + } + nav.toc a:hover { + color: var(--fg); + background: var(--bg-2); + border-left-color: var(--border); + } + nav.toc a.active { + color: var(--accent); + background: linear-gradient(90deg, rgba(122,162,247,0.12), transparent); + border-left-color: var(--accent); + padding-left: 20px; + font-weight: 600; + } + .toc-num { display: inline-block; width: 22px; color: var(--muted); font-family: var(--mono); font-size: 11px; } + nav.toc a.active .toc-num { color: var(--accent); } + + .sidebar-foot { + margin-top: 24px; + padding-top: 16px; + border-top: 1px solid var(--border); + font-size: 11px; + color: var(--muted); + line-height: 1.6; + } + .sidebar-foot a { color: var(--accent); border: none; } + .sidebar-foot .row { display: flex; justify-content: space-between; padding: 3px 0; } + .sidebar-foot .k { color: var(--muted); } + + /* anchor offset so headings don't get hidden under sticky bars */ + h2[id] { scroll-margin-top: 24px; } + + /* mobile: sidebar collapses to top bar */ + @media (max-width: 920px) { + .layout { grid-template-columns: 1fr; gap: 0; padding: 0 20px; } + .main { padding-top: 24px; max-width: 100%; } + .sidebar { + position: static; + height: auto; + border-right: none; + border-bottom: 1px solid var(--border); + margin-right: 0; + padding: 18px 0; + } + nav.toc { + flex-direction: row; + flex-wrap: wrap; + gap: 4px; + } + nav.toc a { + border-left: none; + border-bottom: 2px solid transparent; + border-radius: 4px; + padding: 6px 10px; + font-size: 12px; + } + nav.toc a.active { + padding-left: 10px; + border-left: none; + border-bottom-color: var(--accent); + background: var(--bg-2); + } + .sidebar-foot { display: none; } + } header { border-bottom: 1px solid var(--border); padding-bottom: 20px; margin-bottom: 40px; } header .eyebrow { color: var(--muted); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; } @@ -86,7 +206,31 @@
-一句话:tree-sitter AST 提取器 + networkx 图 + Leiden 社区检测 + 10 种导出格式 + 9 种 Agent 平台集成脚本。 @@ -539,6 +668,62 @@ resolvers/ workers/
+ + +