first commit

This commit is contained in:
orohi
2026-07-25 00:37:09 +03:00
commit 3ca7f9f7cc
35 changed files with 2478 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
async function copyText(text, button) {
try {
await navigator.clipboard.writeText(text);
} catch {
const input = document.createElement("textarea");
input.value = text;
input.setAttribute("readonly", "");
input.style.position = "fixed";
input.style.left = "-9999px";
document.body.appendChild(input);
input.select();
document.execCommand("copy");
document.body.removeChild(input);
}
if (!button) return;
const prev = button.textContent;
button.textContent = "Скопировано";
button.classList.add("is-copied");
setTimeout(() => {
button.textContent = prev;
button.classList.remove("is-copied");
}, 1500);
}
document.addEventListener("click", (event) => {
const button = event.target.closest("[data-copy]");
if (!button) return;
event.preventDefault();
const text = button.getAttribute("data-copy") || "";
if (text) copyText(text, button);
});
+16
View File
@@ -0,0 +1,16 @@
document.addEventListener("DOMContentLoaded", () => {
const orb = document.querySelector(".hero-orb");
if (!orb || window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
return;
}
window.addEventListener(
"pointermove",
(event) => {
const x = (event.clientX / window.innerWidth - 0.5) * 18;
const y = (event.clientY / window.innerHeight - 0.5) * 12;
orb.style.translate = `${x}px ${y}px`;
},
{ passive: true }
);
});