Skip to content

Commit 11e3213

Browse files
wm-wm-wmsga
andauthored
Convert docstring from rst to markdown (#382)
* add coversion scripts to exclusion for ruff * fix ordered list in contributing guide, fix visible frames of docker-compose for frontend, scheduler & worker --------- Co-authored-by: sga <s.gyulmamedov@gmail.com>
1 parent 6f18482 commit 11e3213

148 files changed

Lines changed: 3426 additions & 994 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,3 +187,9 @@ docs-fresh: docs-cleanup docs-build ##@Docs Cleanup & build docs
187187

188188
docs-openapi: ##@Docs Generate OpenAPI schema
189189
${PYTHON} -m syncmaster.server.scripts.export_openapi_schema docs/_static/openapi.json
190+
191+
mddocs-build: mddocs-openapi ##@Docs Generate mkdocs documentation
192+
PYTHONPATH=. DISABLE_MKDOCS_2_WARNING=true ${VIRTUAL_ENV}/bin/mkdocs build --strict --config-file mddocs/mkdocs.yml
193+
194+
mddocs-openapi: ##@Docs Generate OpenAPI schema for mkdocs documentation
195+
${PYTHON} -m syncmaster.server.scripts.export_openapi_schema mddocs/docs/_static/openapi.json

mddocs/_static/openapi.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

mddocs/changelog.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

mddocs/changelog/0.2.0.md

Lines changed: 0 additions & 69 deletions
This file was deleted.

mddocs/changelog/0.3.2.md

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
.mermaid {
2+
cursor: zoom-in;
3+
}
4+
5+
.mermaid-zoom-overlay {
6+
position: fixed;
7+
top: 0;
8+
left: 0;
9+
width: 100vw;
10+
height: 100vh;
11+
background: rgba(0, 0, 0, 0.85);
12+
overflow: auto;
13+
z-index: 9999;
14+
padding: 48px 2vw 2vh;
15+
box-sizing: border-box;
16+
}
17+
18+
.mermaid-zoom-toolbar {
19+
position: fixed;
20+
top: 0;
21+
left: 0;
22+
width: 100vw;
23+
z-index: 10000;
24+
display: flex;
25+
gap: 8px;
26+
padding: 8px 12px;
27+
background: rgba(0, 0, 0, 0.7);
28+
box-sizing: border-box;
29+
}
30+
31+
.mermaid-zoom-toolbar button {
32+
background: rgba(255, 255, 255, 0.15);
33+
color: white;
34+
border: 1px solid rgba(255, 255, 255, 0.4);
35+
border-radius: 4px;
36+
padding: 4px 12px;
37+
font-size: 16px;
38+
cursor: pointer;
39+
line-height: 1;
40+
}
41+
42+
.mermaid-zoom-toolbar button:hover {
43+
background: rgba(255, 255, 255, 0.3);
44+
}
45+
46+
.mermaid-zoom-toolbar .mermaid-zoom-close {
47+
margin-left: auto;
48+
}
49+
50+
.mermaid-zoom-overlay svg {
51+
display: block;
52+
background: white;
53+
height: auto;
54+
cursor: default;
55+
}

mddocs/docs/_static/icon.svg

Lines changed: 86 additions & 0 deletions
Loading
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
(function () {
2+
var shadowRoots = new WeakMap();
3+
var _attachShadow = Element.prototype.attachShadow;
4+
Element.prototype.attachShadow = function (init) {
5+
var shadow = _attachShadow.call(this, init);
6+
shadowRoots.set(this, shadow);
7+
return shadow;
8+
};
9+
10+
var ZOOM_STEPS = [100, 150, 200, 300];
11+
12+
document.addEventListener("click", function (e) {
13+
if (e.target.closest(".mermaid-zoom-overlay") || e.target.closest(".mermaid-zoom-toolbar")) return;
14+
15+
var path = e.composedPath();
16+
var container = null;
17+
for (var i = 0; i < path.length; i++) {
18+
var el = path[i];
19+
if (el.classList && el.classList.contains("mermaid")) {
20+
container = el;
21+
break;
22+
}
23+
}
24+
if (!container) return;
25+
26+
var root = container.shadowRoot || shadowRoots.get(container);
27+
if (!root) return;
28+
var svg = root.querySelector("svg");
29+
if (!svg) return;
30+
31+
var currentStep = 1; // start at 150%
32+
33+
var overlay = document.createElement("div");
34+
overlay.className = "mermaid-zoom-overlay";
35+
36+
var toolbar = document.createElement("div");
37+
toolbar.className = "mermaid-zoom-toolbar";
38+
39+
var btnMinus = document.createElement("button");
40+
btnMinus.textContent = "−";
41+
var btnPlus = document.createElement("button");
42+
btnPlus.textContent = "+";
43+
var btnClose = document.createElement("button");
44+
btnClose.textContent = "✕";
45+
btnClose.className = "mermaid-zoom-close";
46+
47+
toolbar.appendChild(btnMinus);
48+
toolbar.appendChild(btnPlus);
49+
toolbar.appendChild(btnClose);
50+
51+
var clone = svg.cloneNode(true);
52+
clone.removeAttribute("width");
53+
clone.removeAttribute("height");
54+
clone.style.width = ZOOM_STEPS[currentStep] + "%";
55+
56+
overlay.appendChild(clone);
57+
document.body.appendChild(toolbar);
58+
document.body.appendChild(overlay);
59+
60+
function updateZoom() {
61+
clone.style.width = ZOOM_STEPS[currentStep] + "%";
62+
btnMinus.disabled = currentStep === 0;
63+
btnPlus.disabled = currentStep === ZOOM_STEPS.length - 1;
64+
}
65+
66+
btnMinus.addEventListener("click", function (e) {
67+
e.stopPropagation();
68+
if (currentStep > 0) { currentStep--; updateZoom(); }
69+
});
70+
btnPlus.addEventListener("click", function (e) {
71+
e.stopPropagation();
72+
if (currentStep < ZOOM_STEPS.length - 1) { currentStep++; updateZoom(); }
73+
});
74+
btnClose.addEventListener("click", function (e) {
75+
e.stopPropagation();
76+
close();
77+
});
78+
79+
overlay.addEventListener("click", close);
80+
81+
function close() {
82+
overlay.remove();
83+
toolbar.remove();
84+
document.removeEventListener("keydown", onKey);
85+
}
86+
function onKey(e) { if (e.key === "Escape") close(); }
87+
document.addEventListener("keydown", onKey);
88+
89+
updateZoom();
90+
});
91+
})();

0 commit comments

Comments
 (0)