local setup

This commit is contained in:
nik
2025-09-29 22:07:33 +03:00
parent e3f49d2ddc
commit d693c9589f
40 changed files with 1217 additions and 0 deletions

3
public/bundle.min.js vendored Normal file
View File

@@ -0,0 +1,3 @@
(()=>{var t=document.querySelector(".container"),e=document.querySelectorAll(".menu");document.body.addEventListener("click",()=>{e.forEach(e=>{e.classList.contains("open")&&e.classList.remove("open")})}),window.addEventListener("resize",()=>{e.forEach(e=>{e.classList.remove("open")})}),e.forEach(n=>{const o=n.querySelector(".menu__trigger"),s=n.querySelector(".menu__dropdown");o.addEventListener("click",o=>{o.stopPropagation(),n.classList.contains("open")?n.classList.remove("open"):(e.forEach(e=>e.classList.remove("open")),n.classList.add("open")),s.getBoundingClientRect().right>t.getBoundingClientRect().right&&(s.style.left="auto",s.style.right=0)}),s.addEventListener("click",e=>e.stopPropagation())})})(),(()=>{var e=document.querySelectorAll(".chroma code[data-lang]");for(const n of e){const s=n.parentElement,o=n.innerText.split(`
`).filter(Boolean).join(`
`),t=document.createElement("div"),i=n.dataset.lang;if(t.classList.add("code-title"),t.innerText=i,navigator.clipboard!==0[0]){const e=document.createElement("button");e.classList.add("copy-button"),e.innerText="Copy",e.addEventListener("click",()=>{e.innerText="Copied",setTimeout(()=>{e.innerText="Copy"},1e3),navigator.clipboard.writeText(o)}),t.append(e)}s.closest(".highlight").prepend(t)}})()