Site: drop dead screenshot text, screen() and images (R2.18)

This commit is contained in:
ZacharyZhang-NY committed 2026-10-09 01:41:23 -04:00
1 parent 92702273df
commit c078d3d0a7
8 files changed
-21

No files matched your search

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

-16
View File
@@ -110,19 +110,3 @@ export function stage(blocks: SVGGElement[]): SVGSVGElement {
svg.setAttribute("class", "stage");
return svg;
}
/** Pins an image across a block's left face. */
export function screen(g: SVGGElement, href: string, width: number, height: number): void {
const b = boxes.get(g);
if (!b) throw new Error("not a block");
const [e, f] = project(b.x, b.y + b.d, b.z + b.h);
const sx = (b.w * UNIT) / width;
const sy = (b.h * UNIT) / height;
const image = document.createElementNS(SVG, "image");
image.setAttribute("href", href);
image.setAttribute("width", String(width));
image.setAttribute("height", String(height));
image.setAttribute("preserveAspectRatio", "none");
image.setAttribute("transform", `matrix(${COS * sx} ${SIN * sx} 0 ${sy} ${e} ${f})`);
g.append(image);
}
-5
View File
@@ -17,7 +17,6 @@ const en = {
needs: "macOS 14 or later, Apple silicon.",
unsigned: "Not notarized. If macOS blocks the app, open System Settings › Privacy & Security and click Open Anyway.",
github: "Download from GitHub",
shot: "screenshot",
other: "中文",
roads: "Drag a file down the road.",
fileDoc: "ElyDoc file",
@@ -54,7 +53,6 @@ const zh: typeof en = {
needs: "macOS 14 或更新,Apple 芯片。",
unsigned: "未经公证。macOS 拦下应用时,打开“系统设置 › 隐私与安全性”,点“仍要打开”。",
github: "前往 GitHub 下载",
shot: "截图",
other: "English",
roads: "把文件沿着路拖过去。",
fileDoc: "ElyDoc 文件",
@@ -91,7 +89,4 @@ export function speak(lang: Lang): void {
for (const el of document.querySelectorAll<HTMLElement>("[data-t]")) {
el.textContent = TEXT[lang][el.dataset.t as Key];
}
for (const el of document.querySelectorAll<SVGElement>("[data-shot]")) {
el.setAttribute("aria-label", `${el.dataset.shot} ${TEXT[lang].shot}`);
}
}