docs: add static website and docs

This commit is contained in:
Federico Jaramillo Martinez
2026-05-15 23:35:48 +02:00
parent aab9ffb8e2
commit c66d834c88
11 changed files with 1421 additions and 1 deletions
+21
View File
@@ -0,0 +1,21 @@
const copyButtons = document.querySelectorAll("[data-copy]");
for (const button of copyButtons) {
button.addEventListener("click", async () => {
const targetSelector = button.getAttribute("data-copy");
const target = targetSelector === null ? null : document.querySelector(targetSelector);
const text = target?.textContent?.replace(/^\s*\$ /gm, "").trim();
if (!text) return;
try {
await navigator.clipboard.writeText(text);
const original = button.textContent;
button.textContent = "Copied";
window.setTimeout(() => {
button.textContent = original;
}, 1400);
} catch {
button.textContent = "Select code";
}
});
}