Générateur de CV

${generateCVSections()}
`; }, classique: () => { const t = translations[currentLang]; const profileImageHtml = cvData.profileImage ? `Image de profil` : `
P
`; return `
${profileImageHtml}

${elements.nameInput.value || t.placeholder_name}

${elements.titleInput.value || t.placeholder_title}

${generateCVSections()}
`; }, minimaliste: () => { const t = translations[currentLang]; const profileImageHtml = cvData.profileImage ? `Image de profil` : `
P
`; return `
${profileImageHtml}

${elements.nameInput.value || t.placeholder_name}

${elements.titleInput.value || t.placeholder_title}

${generateCVSections()}
`; }, professionnel: () => { const t = translations[currentLang]; const profileImageHtml = cvData.profileImage ? `Image de profil` : `
P
`; return `
${profileImageHtml}

${elements.nameInput.value || t.placeholder_name}

${elements.titleInput.value || t.placeholder_title}

${cvData.sections.filter(s => s.type === 'contact' || s.type === 'skills' || s.type === 'languages').map(section => { const sectionTypeInfo = t.section_types[section.type]; if (!sectionTypeInfo) return ''; const sectionTitle = section.customTitle || sectionTypeInfo.title; return `

${sectionTitle}

${section.content}

`; }).join('')}
${cvData.sections.filter(s => s.type !== 'contact' && s.type !== 'skills' && s.type !== 'languages').map(section => { const sectionTypeInfo = t.section_types[section.type]; if (!sectionTypeInfo) return ''; const sectionTitle = section.customTitle || sectionTypeInfo.title; return `

${sectionTitle}

${section.content}

`; }).join('')}
`; }, infographique: () => { const t = translations[currentLang]; const profileImageHtml = cvData.profileImage ? `Image de profil` : `
P
`; return `
${profileImageHtml}

${elements.nameInput.value || t.placeholder_name}

${elements.titleInput.value || t.placeholder_title}

${generateCVSections()}
`; }, 'creatif-bold': () => { const t = translations[currentLang]; const profileImageHtml = cvData.profileImage ? `Image de profil` : `
P
`; return `
${profileImageHtml}

${elements.nameInput.value || t.placeholder_name}

${elements.titleInput.value || t.placeholder_title}

${generateCVSections()}
`; }, vintage: () => { const t = translations[currentLang]; const profileImageHtml = cvData.profileImage ? `Image de profil` : `
P
`; return `
${profileImageHtml}

${elements.nameInput.value || t.placeholder_name}

${elements.titleInput.value || t.placeholder_title}

${generateCVSections()}
`; }, futuriste: () => { const t = translations[currentLang]; const profileImageHtml = cvData.profileImage ? `Image de profil` : `
P
`; return `
${profileImageHtml}

${elements.nameInput.value || t.placeholder_name}

${elements.titleInput.value || t.placeholder_title}

${generateCVSections()}
`; }, elegant: () => { const t = translations[currentLang]; const profileImageHtml = cvData.profileImage ? `Image de profil` : `
P
`; return `
${profileImageHtml}

${elements.nameInput.value || t.placeholder_name}

${elements.titleInput.value || t.placeholder_title}

${generateCVSections()}
`; }, geometric: () => { const t = translations[currentLang]; const profileImageHtml = cvData.profileImage ? `Image de profil` : `
P
`; return `
${profileImageHtml}

${elements.nameInput.value || t.placeholder_name}

${elements.titleInput.value || t.placeholder_title}

${generateCVSections()}
`; }, urban: () => { const t = translations[currentLang]; const profileImageHtml = cvData.profileImage ? `Image de profil` : `
P
`; return `
${profileImageHtml}

${elements.nameInput.value || t.placeholder_name}

${elements.titleInput.value || t.placeholder_title}

${generateCVSections()}
`; }, retro: () => { const t = translations[currentLang]; const profileImageHtml = cvData.profileImage ? `Image de profil` : `
P
`; return `
${profileImageHtml}

${elements.nameInput.value || t.placeholder_name}

${elements.titleInput.value || t.placeholder_title}

${generateCVSections()}
`; }, zen: () => { const t = translations[currentLang]; const profileImageHtml = cvData.profileImage ? `Image de profil` : `
P
`; return `
${profileImageHtml}

${elements.nameInput.value || t.placeholder_name}

${elements.titleInput.value || t.placeholder_title}

${generateCVSections()}
`; }, 'bold-professional': () => { const t = translations[currentLang]; const profileImageHtml = cvData.profileImage ? `Image de profil` : `
P
`; return `
${profileImageHtml}

${elements.nameInput.value || t.placeholder_name}

${elements.titleInput.value || t.placeholder_title}

${generateCVSections()}
`; }, vibrant: () => { const t = translations[currentLang]; const profileImageHtml = cvData.profileImage ? `Image de profil` : `
P
`; return `
${profileImageHtml}

${elements.nameInput.value || t.placeholder_name}

${elements.titleInput.value || t.placeholder_title}

${generateCVSections()}
`; }, gradient: () => { const t = translations[currentLang]; const profileImageHtml = cvData.profileImage ? `Image de profil` : `
P
`; return `
${profileImageHtml}

${elements.nameInput.value || t.placeholder_name}

${elements.titleInput.value || t.placeholder_title}

${generateCVSections()}
`; }, }; function updateCVPreview() { const currentTheme = document.body.dataset.theme; const templateFunction = templates[currentTheme] || templates.tech; elements.cvContainer.innerHTML = templateFunction(); const cvPreviewElement = elements.cvContainer.querySelector('.cv-preview'); if (cvPreviewElement) { const aspectRatioClass = `aspect-${currentAspectRatio.replace(' / ', '-')}`; cvPreviewElement.className = `cv-preview p-6 sm:p-10 bg-white text-gray-800 w-full h-full ${aspectRatioClass}`; } } elements.aspectRatioButtons.forEach(button => { button.addEventListener('click', () => { const newRatio = button.dataset.aspectRatio; currentAspectRatio = newRatio; elements.aspectRatioButtons.forEach(btn => btn.classList.remove('bg-primary/20', 'text-primary')); button.classList.add('bg-primary/20', 'text-primary'); updateCVPreview(); }); }); window.addEventListener('load', () => { renderTemplateButtons(); const initialTheme = document.body.dataset.theme; const initialButton = document.querySelector(`[data-theme="${initialTheme}"]`); if (initialButton) { initialButton.classList.add('btn-template-active', 'border-primary'); } const initialRatioButton = document.querySelector('[data-aspect-ratio="9 / 16"]'); if (initialRatioButton) { initialRatioButton.click(); } }); elements.profileImageUpload.addEventListener('change', (e) => { const file = e.target.files[0]; if (file) { const reader = new FileReader(); reader.onload = (e) => { cvData.profileImage = e.target.result; const img = document.createElement('img'); img.src = cvData.profileImage; img.className = 'h-full w-full object-cover rounded-full'; elements.profileImagePreview.innerHTML = ''; elements.profileImagePreview.appendChild(img); updateCVPreview(); }; reader.readAsDataURL(file); } }); elements.nameInput.addEventListener('input', updateCVPreview); elements.titleInput.addEventListener('input', updateCVPreview); elements.langSelect.addEventListener('change', (e) => { updateUI(e.target.value); }); elements.primaryColorPicker.addEventListener('input', (e) => elements.html.style.setProperty('--primary-color', e.target.value)); elements.accentColorPicker.addEventListener('input', (e) => elements.html.style.setProperty('--accent-color', e.target.value)); elements.downloadButton.addEventListener('click', () => { elements.statusMessage.textContent = translations[currentLang].error_download; }); updateUI(currentLang); renderTemplateButtons(); renderSectionInputs(); updateCVPreview();

J’aime ça :

J’aime Chargement…