Files
marcopanandClaude Sonnet 5 7c417d4cf1 docs: set up MkDocs site with technical/general docs split
Add mkdocs.yml (windmill theme, mermaid2, matching ~/Chirone/chirone/etl
setup) with nav split into "ThothII (Documentazione Tecnica)" — architecture
overview, existing design specs/plans, reports — and "Considerazioni
Generali" for cross-project notes.

Add docs/general/pi-configuration.md explaining Pi's three model-resolution
tiers (built-in, user models.json, project extension) and where GLM/DeepSeek/
Qwen each sit. Add docs/architecture/overview.md synthesizing the ThothII
architecture for the doc site. Relocate the L2 run report into docs/reports/.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-02 12:37:26 +02:00

91 lines
2.8 KiB
JavaScript

(function () {
function toggleMenus() {
const current = document.querySelector(".bs-sidenav a.current, .bs-sidenav a[aria-current='page']");
if (!current) {
return;
}
const activeList = current.closest("ul");
document.querySelectorAll(".bs-sidenav ul").forEach((list) => {
if (list === activeList || list.contains(current)) {
list.style.display = "";
return;
}
const nested = list.parentElement && list.parentElement.parentElement;
if (nested && nested.classList.contains("bs-sidenav")) {
list.style.display = "";
}
});
}
// Keep the content pane's left padding in sync with the actual width
// of the left TOC sidebar. Fixes the windmill default where the sidebar
// can grow up to 350px but the content padding stays at 250px, so a
// wide item ends up overlapping the article body.
function syncTocSidebarWidth() {
const tocPane = document.querySelector(".wm-toc-pane");
const contentPane = document.querySelector(".wm-content-pane");
if (!tocPane || !contentPane) {
return;
}
// Skip on small screens where the sidebar is a dropdown / hidden.
if (window.matchMedia("(max-width: 600px)").matches) {
contentPane.style.paddingLeft = "";
return;
}
if (tocPane.classList.contains("wm-toc-dropdown")) {
return;
}
if (contentPane.parentElement && contentPane.parentElement.classList.contains("wm-toc-hidden")) {
contentPane.style.paddingLeft = "";
return;
}
const width = Math.ceil(tocPane.getBoundingClientRect().width);
if (width > 0) {
contentPane.style.paddingLeft = width + "px";
}
}
function installTocSidebarSync() {
const tocPane = document.querySelector(".wm-toc-pane");
if (!tocPane) {
return;
}
syncTocSidebarWidth();
if (typeof ResizeObserver === "function") {
const ro = new ResizeObserver(syncTocSidebarWidth);
ro.observe(tocPane);
}
// Re-sync after expand/collapse animations and toggle button clicks.
tocPane.addEventListener("click", function () {
// Bootstrap collapse animation defaults to 350ms.
window.setTimeout(syncTocSidebarWidth, 50);
window.setTimeout(syncTocSidebarWidth, 400);
});
const tocBtn = document.getElementById("wm-toc-button");
if (tocBtn) {
tocBtn.addEventListener("click", function () {
window.setTimeout(syncTocSidebarWidth, 50);
window.setTimeout(syncTocSidebarWidth, 400);
});
}
window.addEventListener("resize", syncTocSidebarWidth);
window.addEventListener("orientationchange", syncTocSidebarWidth);
}
function init() {
toggleMenus();
installTocSidebarSync();
}
if (document.readyState === "loading") {
document.addEventListener("DOMContentLoaded", init);
} else {
init();
}
})();