Add CAD fit checks and revision previews
This commit is contained in:
1 parent
b4ef20db39
commit
78d33d01a6
18 files changed
+250
-23
No files matched your search
@@ -128,6 +128,17 @@ function renderDetail(card) {
|
||||
section.append(wrapper);
|
||||
return section;
|
||||
}));
|
||||
const previews = card.previews || [];
|
||||
byId("detail-previews").hidden = !previews.length;
|
||||
byId("preview-list").replaceChildren(...previews.map(({ file, caption, revision }) => {
|
||||
const figure = node("figure");
|
||||
const image = node("img");
|
||||
image.alt = caption;
|
||||
image.addEventListener("error", () => image.replaceWith(node("p", "Снимок недоступен", "card-empty")));
|
||||
image.src = `/api/previews/${encodeURIComponent(file)}`;
|
||||
figure.append(image, node("figcaption", `${revision} — ${caption}`));
|
||||
return figure;
|
||||
}));
|
||||
byId("markdown").textContent = card.markdown;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user