Implement AXIS parity UI and execution baseline
This commit is contained in:
19
web/app/source-assets.mjs
Normal file
19
web/app/source-assets.mjs
Normal file
@@ -0,0 +1,19 @@
|
||||
export const AXIS_ASSET_ROOT = "/linuxcnc/share/axis/images";
|
||||
|
||||
export function axisAsset(name) {
|
||||
return `${AXIS_ASSET_ROOT}/${name}`;
|
||||
}
|
||||
|
||||
export function appendAxisIcon(document, button, asset, label) {
|
||||
const icon = document.createElement("img");
|
||||
icon.className = "axis-icon";
|
||||
icon.src = axisAsset(asset);
|
||||
icon.alt = "";
|
||||
icon.setAttribute("aria-hidden", "true");
|
||||
icon.title = label;
|
||||
const text = document.createElement("span");
|
||||
text.className = "button-copy";
|
||||
text.textContent = label;
|
||||
button.append(icon, text);
|
||||
return button;
|
||||
}
|
||||
Reference in New Issue
Block a user