This commit is contained in:
@@ -301,6 +301,9 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||
|
||||
const container = document.createElement("div");
|
||||
container.className = "mermaid-container";
|
||||
if ((el.dataset.source || "").includes('root(["zxh"])')) {
|
||||
container.classList.add("mermaid-container--site-map");
|
||||
}
|
||||
const controls = document.createElement("div");
|
||||
controls.className = "mermaid-zoom-controls";
|
||||
controls.innerHTML = `
|
||||
|
||||
@@ -801,6 +801,7 @@ body.no-sidenotes {
|
||||
.mermaid-container {
|
||||
overflow: auto;
|
||||
width: 100%;
|
||||
min-height: 26rem;
|
||||
max-height: 800px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 8px;
|
||||
@@ -817,6 +818,39 @@ body.no-sidenotes {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.mermaid-container--site-map {
|
||||
width: min(96vw, 1400px);
|
||||
height: min(82vh, 980px);
|
||||
max-height: none;
|
||||
margin-left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
.mermaid-container--site-map .mermaid {
|
||||
display: inline-block;
|
||||
min-width: max-content;
|
||||
padding: 3rem 2rem 2rem;
|
||||
}
|
||||
|
||||
.mermaid-container--site-map .mermaid svg {
|
||||
width: auto;
|
||||
max-width: none;
|
||||
min-width: 1100px;
|
||||
}
|
||||
|
||||
@media (max-width: 700px) {
|
||||
.mermaid-container--site-map {
|
||||
width: 100%;
|
||||
height: 78vh;
|
||||
margin-left: 0;
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.mermaid-container--site-map .mermaid svg {
|
||||
min-width: 900px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Zoom buttons */
|
||||
.mermaid-zoom-controls {
|
||||
position: absolute;
|
||||
|
||||
Reference in New Issue
Block a user