Added and internalized Pico theme for customization

This commit is contained in:
Aron Petau 2025-04-29 20:02:54 +02:00
parent 8e7f72ce8b
commit 8c90bb2dfc
71 changed files with 4587 additions and 0 deletions

View file

@ -0,0 +1,17 @@
function enableCopy() {
document.querySelectorAll('pre:not(.mermaid)').forEach(node => {
let copyBtn = document.createElement("span");
copyBtn.classList.add('copybutton');
copyBtn.classList.add('icon');
copyBtn.classList.add('icon-copy');
node.appendChild(copyBtn);
copyBtn.addEventListener("click", async () => {
if (navigator.clipboard) {
let text = node.querySelectorAll('code')[0].innerText;
await navigator.clipboard.writeText(text);
copyBtn.classList.add('clicked');
}
setTimeout(() => copyBtn.classList.remove('clicked'), 600);
})
})
}