Skip to content

Commit fc8d287

Browse files
committed
feat: publish landing site
0 parents  commit fc8d287

9 files changed

Lines changed: 1451 additions & 0 deletions

File tree

.nojekyll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

app.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
function setupCopyButtons() {
2+
const buttons = document.querySelectorAll("[data-copy-target]");
3+
4+
for (const button of buttons) {
5+
button.addEventListener("click", async () => {
6+
const targetId = button.getAttribute("data-copy-target");
7+
const target = targetId ? document.getElementById(targetId) : null;
8+
9+
if (!target) {
10+
return;
11+
}
12+
13+
const content = target.textContent ?? "";
14+
15+
try {
16+
await navigator.clipboard.writeText(content.trim());
17+
const original = button.textContent;
18+
button.textContent = "Copied";
19+
window.setTimeout(() => {
20+
button.textContent = original;
21+
}, 1600);
22+
} catch {
23+
button.textContent = "Copy failed";
24+
}
25+
});
26+
}
27+
}
28+
29+
document.addEventListener("DOMContentLoaded", () => {
30+
setupCopyButtons();
31+
});

favicon.svg

Lines changed: 17 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)