Added a download CV button with language selection

This commit is contained in:
Plexi09 2026-02-23 00:17:21 +01:00
parent 3f1ec3056d
commit 91936e441f
Signed by: Plexi09
GPG key ID: 20D439A69163544A
3 changed files with 59 additions and 2 deletions

View file

@ -234,7 +234,27 @@ document.addEventListener('DOMContentLoaded', () => {
});
});
// ── 12. DRAGGABLE GALLERY ─────────────────────────────────────────
// ── 12. CV DOWNLOAD MODAL ───────────────────────────────────────
const cvModal = document.getElementById('cv-modal');
const cvClose = document.getElementById('cv-modal-close');
const cvBackdrop = document.getElementById('cv-modal-backdrop');
function openCvModal() { cvModal.classList.add('is-open'); }
function closeCvModal() { cvModal.classList.remove('is-open'); }
document.querySelectorAll('.cv-download-btn').forEach(btn => {
btn.addEventListener('click', (e) => { e.preventDefault(); openCvModal(); });
});
if (cvClose) cvClose.addEventListener('click', closeCvModal);
if (cvBackdrop) cvBackdrop.addEventListener('click', closeCvModal);
document.addEventListener('keydown', (e) => { if (e.key === 'Escape') closeCvModal(); });
// Auto-close modal after a language link is clicked
document.querySelectorAll('.cv-lang-btn').forEach(btn => {
btn.addEventListener('click', () => setTimeout(closeCvModal, 400));
});
// ── 13. DRAGGABLE GALLERY ─────────────────────────────────────────
const gallery = document.getElementById('gallery');
if (gallery) {
let isDown = false, startX, scrollLeft;