593 B
main.js
// Show "Copied!" feedback on copy buttons
function showCopied(btn) {
    const original = btn.textContent;
    btn.textContent = 'Copied!';
    btn.classList.remove('text-[#666]');
    btn.classList.add('text-emerald-400');
    setTimeout(() => {
        btn.textContent = original;
        btn.classList.remove('text-emerald-400');
        btn.classList.add('text-[#666]');
    }, 1000);
}

// Re-highlight code after HTMX page swaps (for Prism.js)
document.body.addEventListener('htmx:afterSwap', function() {
    if (typeof Prism !== 'undefined') {
        Prism.highlightAll();
    }
});
← Back