creatucv / index.html
JorgeNelson's picture
Add 3 files
8c79d10 verified
Raw History Blame Contribute Delete
65.5 kB
<!DOCTYPE html> <html lang="es"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>CV Generator Pro</title> <script src="https://cdn.tailwindcss.com"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> <style> .resume-preview { width: 210mm; height: 297mm; margin: 0 auto; box-shadow: 0 0 10px rgba(0,0,0,0.1); padding: 20px; background-color: white; position: relative; overflow: hidden; } .classic { font-family: 'Times New Roman', serif; } .modern { font-family: 'Arial', sans-serif; } .creative { font-family: 'Georgia', serif; background-color: #f8f9fa; } .section-divider { height: 2px; background: linear-gradient(to right, transparent, #333, transparent); margin: 15px 0; } .creative .section-divider { background: linear-gradient(to right, transparent, #6c757d, transparent); } .modern .section-divider { background: linear-gradient(to right, transparent, #007bff, transparent); } .timeline-item { position: relative; padding-left: 30px; margin-bottom: 20px; } .timeline-item:before { content: ''; position: absolute; left: 0; top: 5px; width: 15px; height: 15px; border-radius: 50%; background: #333; } .modern .timeline-item:before { background: #007bff; } .creative .timeline-item:before { background: #6c757d; } .skill-bar { height: 10px; background-color: #e9ecef; border-radius: 5px; margin-top: 5px; } .skill-level { height: 100%; border-radius: 5px; background-color: #6c757d; } .modern .skill-level { background-color: #007bff; } .creative .skill-level { background-color: #6c757d; } .language-level { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; background-color: #e9ecef; } .language-level.filled { background-color: #6c757d; } .modern .language-level.filled { background-color: #007bff; } .creative .language-level.filled { background-color: #6c757d; } #pdfPreview { display: none; } .floating-button { position: fixed; bottom: 30px; right: 30px; z-index: 100; } .form-section { transition: all 0.3s ease; } .form-section.collapsed { max-height: 60px; overflow: hidden; } .toggle-section { cursor: pointer; } .toggle-section i { transition: transform 0.3s ease; } .toggle-section.collapsed i { transform: rotate(-90deg); } </style> </head> <body class="bg-gray-100"> <div class="container mx-auto py-8 px-4"> <h1 class="text-4xl font-bold text-center mb-8 text-blue-800">CV Generator Pro</h1> <div class="grid grid-cols-1 lg:grid-cols-3 gap-8"> <!-- Form Section --> <div class="lg:col-span-2 bg-white rounded-lg shadow-lg p-6"> <h2 class="text-2xl font-semibold mb-6 text-gray-800">Personal Information</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-8"> <div> <label class="block text-gray-700 mb-2">Full Name</label> <input type="text" id="fullName" class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"> </div> <div> <label class="block text-gray-700 mb-2">Profession</label> <input type="text" id="profession" class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"> </div> <div> <label class="block text-gray-700 mb-2">Email</label> <input type="email" id="email" class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"> </div> <div> <label class="block text-gray-700 mb-2">Phone</label> <input type="tel" id="phone" class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"> </div> <div> <label class="block text-gray-700 mb-2">Location</label> <input type="text" id="location" class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"> </div> <div> <label class="block text-gray-700 mb-2">Website/Portfolio</label> <input type="url" id="website" class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"> </div> </div> <div class="mb-8 form-section"> <div class="toggle-section flex justify-between items-center mb-4"> <h2 class="text-2xl font-semibold text-gray-800">Summary</h2> <i class="fas fa-chevron-down"></i> </div> <textarea id="summary" rows="4" class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="Write a brief summary about yourself..."></textarea> </div> <div class="mb-8 form-section"> <div class="toggle-section flex justify-between items-center mb-4"> <h2 class="text-2xl font-semibold text-gray-800">Work Experience</h2> <i class="fas fa-chevron-down"></i> </div> <div id="experienceContainer"> <div class="experience-item mb-6 p-4 border rounded-lg"> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-3"> <div> <label class="block text-gray-700 mb-2">Job Title</label> <input type="text" class="w-full px-4 py-2 border rounded-lg experience-title" placeholder="Software Developer"> </div> <div> <label class="block text-gray-700 mb-2">Company</label> <input type="text" class="w-full px-4 py-2 border rounded-lg experience-company" placeholder="Tech Corp Inc."> </div> </div> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-3"> <div> <label class="block text-gray-700 mb-2">Start Date</label> <input type="text" class="w-full px-4 py-2 border rounded-lg experience-start" placeholder="Jan 2020"> </div> <div> <label class="block text-gray-700 mb-2">End Date</label> <input type="text" class="w-full px-4 py-2 border rounded-lg experience-end" placeholder="Present"> </div> </div> <div class="mb-3"> <label class="block text-gray-700 mb-2">Description</label> <textarea class="w-full px-4 py-2 border rounded-lg experience-description" rows="3" placeholder="Describe your responsibilities and achievements..."></textarea> </div> <button class="remove-experience bg-red-500 text-white px-3 py-1 rounded-lg hover:bg-red-600">Remove</button> </div> </div> <button id="addExperience" class="bg-blue-500 text-white px-4 py-2 rounded-lg hover:bg-blue-600">Add Experience</button> </div> <div class="mb-8 form-section"> <div class="toggle-section flex justify-between items-center mb-4"> <h2 class="text-2xl font-semibold text-gray-800">Education</h2> <i class="fas fa-chevron-down"></i> </div> <div id="educationContainer"> <div class="education-item mb-6 p-4 border rounded-lg"> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-3"> <div> <label class="block text-gray-700 mb-2">Degree</label> <input type="text" class="w-full px-4 py-2 border rounded-lg education-degree" placeholder="Bachelor of Science"> </div> <div> <label class="block text-gray-700 mb-2">Institution</label> <input type="text" class="w-full px-4 py-2 border rounded-lg education-institution" placeholder="University of Technology"> </div> </div> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-3"> <div> <label class="block text-gray-700 mb-2">Field of Study</label> <input type="text" class="w-full px-4 py-2 border rounded-lg education-field" placeholder="Computer Science"> </div> <div> <label class="block text-gray-700 mb-2">Year</label> <input type="text" class="w-full px-4 py-2 border rounded-lg education-year" placeholder="2016 - 2020"> </div> </div> <button class="remove-education bg-red-500 text-white px-3 py-1 rounded-lg hover:bg-red-600">Remove</button> </div> </div> <button id="addEducation" class="bg-blue-500 text-white px-4 py-2 rounded-lg hover:bg-blue-600">Add Education</button> </div> <div class="mb-8 form-section"> <div class="toggle-section flex justify-between items-center mb-4"> <h2 class="text-2xl font-semibold text-gray-800">Skills</h2> <i class="fas fa-chevron-down"></i> </div> <div id="skillsContainer"> <div class="skill-item mb-4 p-4 border rounded-lg"> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-3"> <div> <label class="block text-gray-700 mb-2">Skill Name</label> <input type="text" class="w-full px-4 py-2 border rounded-lg skill-name" placeholder="JavaScript"> </div> <div> <label class="block text-gray-700 mb-2">Level (1-10)</label> <input type="number" min="1" max="10" class="w-full px-4 py-2 border rounded-lg skill-level" placeholder="8"> </div> </div> <button class="remove-skill bg-red-500 text-white px-3 py-1 rounded-lg hover:bg-red-600">Remove</button> </div> </div> <button id="addSkill" class="bg-blue-500 text-white px-4 py-2 rounded-lg hover:bg-blue-600">Add Skill</button> </div> <div class="mb-8 form-section"> <div class="toggle-section flex justify-between items-center mb-4"> <h2 class="text-2xl font-semibold text-gray-800">Languages</h2> <i class="fas fa-chevron-down"></i> </div> <div id="languagesContainer"> <div class="language-item mb-4 p-4 border rounded-lg"> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-3"> <div> <label class="block text-gray-700 mb-2">Language</label> <input type="text" class="w-full px-4 py-2 border rounded-lg language-name" placeholder="English"> </div> <div> <label class="block text-gray-700 mb-2">Proficiency</label> <select class="w-full px-4 py-2 border rounded-lg language-proficiency"> <option value="5">Native</option> <option value="4">Fluent</option> <option value="3">Intermediate</option> <option value="2">Basic</option> <option value="1">Beginner</option> </select> </div> </div> <button class="remove-language bg-red-500 text-white px-3 py-1 rounded-lg hover:bg-red-600">Remove</button> </div> </div> <button id="addLanguage" class="bg-blue-500 text-white px-4 py-2 rounded-lg hover:bg-blue-600">Add Language</button> </div> <div class="mb-8 form-section"> <div class="toggle-section flex justify-between items-center mb-4"> <h2 class="text-2xl font-semibold text-gray-800">Projects</h2> <i class="fas fa-chevron-down"></i> </div> <div id="projectsContainer"> <div class="project-item mb-6 p-4 border rounded-lg"> <div class="mb-3"> <label class="block text-gray-700 mb-2">Project Name</label> <input type="text" class="w-full px-4 py-2 border rounded-lg project-name" placeholder="E-commerce Website"> </div> <div class="mb-3"> <label class="block text-gray-700 mb-2">Description</label> <textarea class="w-full px-4 py-2 border rounded-lg project-description" rows="3" placeholder="Describe the project and your role..."></textarea> </div> <div class="mb-3"> <label class="block text-gray-700 mb-2">Technologies Used</label> <input type="text" class="w-full px-4 py-2 border rounded-lg project-technologies" placeholder="React, Node.js, MongoDB"> </div> <div class="mb-3"> <label class="block text-gray-700 mb-2">Link (optional)</label> <input type="url" class="w-full px-4 py-2 border rounded-lg project-link" placeholder="https://example.com"> </div> <button class="remove-project bg-red-500 text-white px-3 py-1 rounded-lg hover:bg-red-600">Remove</button> </div> </div> <button id="addProject" class="bg-blue-500 text-white px-4 py-2 rounded-lg hover:bg-blue-600">Add Project</button> </div> <div class="mb-8 form-section"> <div class="toggle-section flex justify-between items-center mb-4"> <h2 class="text-2xl font-semibold text-gray-800">Certifications</h2> <i class="fas fa-chevron-down"></i> </div> <div id="certificationsContainer"> <div class="certification-item mb-6 p-4 border rounded-lg"> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-3"> <div> <label class="block text-gray-700 mb-2">Certification Name</label> <input type="text" class="w-full px-4 py-2 border rounded-lg certification-name" placeholder="AWS Certified Developer"> </div> <div> <label class="block text-gray-700 mb-2">Issuing Organization</label> <input type="text" class="w-full px-4 py-2 border rounded-lg certification-organization" placeholder="Amazon Web Services"> </div> </div> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-3"> <div> <label class="block text-gray-700 mb-2">Date Obtained</label> <input type="text" class="w-full px-4 py-2 border rounded-lg certification-date" placeholder="Jun 2022"> </div> <div> <label class="block text-gray-700 mb-2">Credential ID (optional)</label> <input type="text" class="w-full px-4 py-2 border rounded-lg certification-id" placeholder="ABC123456789"> </div> </div> <button class="remove-certification bg-red-500 text-white px-3 py-1 rounded-lg hover:bg-red-600">Remove</button> </div> </div> <button id="addCertification" class="bg-blue-500 text-white px-4 py-2 rounded-lg hover:bg-blue-600">Add Certification</button> </div> <div class="flex justify-center mt-8"> <button id="generateCV" class="bg-green-600 text-white px-8 py-3 rounded-lg text-lg font-semibold hover:bg-green-700 transition duration-300"> <i class="fas fa-file-pdf mr-2"></i> Generate CV </button> </div> </div> <!-- Preview Section --> <div class="lg:col-span-1"> <div class="bg-white rounded-lg shadow-lg p-6 sticky top-8"> <h2 class="text-2xl font-semibold mb-6 text-gray-800">CV Preview</h2> <div class="mb-6"> <label class="block text-gray-700 mb-2">Select Style</label> <select id="styleSelector" class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"> <option value="classic">Classic</option> <option value="modern">Modern</option> <option value="creative">Creative</option> </select> </div> <div id="resumePreview" class="resume-preview classic mb-6"> <div class="text-center mb-6"> <h1 id="previewName" class="text-3xl font-bold mb-2">John Doe</h1> <h2 id="previewProfession" class="text-xl text-gray-600">Software Developer</h2> <div class="flex justify-center space-x-4 mt-2 text-sm"> <span id="previewEmail"><i class="fas fa-envelope mr-1"></i> john.doe@example.com</span> <span id="previewPhone"><i class="fas fa-phone mr-1"></i> (123) 456-7890</span> <span id="previewLocation"><i class="fas fa-map-marker-alt mr-1"></i> New York, USA</span> </div> <div id="previewWebsite" class="mt-1"> <i class="fas fa-globe mr-1"></i> www.johndoe.com </div> </div> <div class="section-divider"></div> <div class="mb-6"> <h3 class="text-xl font-semibold mb-2">Summary</h3> <p id="previewSummary" class="text-gray-700">Experienced software developer with 5+ years of experience in web application development. Specialized in JavaScript frameworks and cloud technologies. Passionate about creating efficient, scalable, and user-friendly applications.</p> </div> <div class="section-divider"></div> <div class="mb-6"> <h3 class="text-xl font-semibold mb-4">Work Experience</h3> <div id="previewExperience"> <div class="timeline-item mb-4"> <h4 class="font-bold">Senior Developer</h4> <div class="flex justify-between text-gray-600 mb-1"> <span>Tech Solutions Inc.</span> <span>Jan 2020 - Present</span> </div> <p class="text-gray-700">Led a team of 5 developers to build enterprise applications. Implemented CI/CD pipelines reducing deployment time by 40%.</p> </div> <div class="timeline-item"> <h4 class="font-bold">Junior Developer</h4> <div class="flex justify-between text-gray-600 mb-1"> <span>Digital Creations</span> <span>Jun 2017 - Dec 2019</span> </div> <p class="text-gray-700">Developed and maintained client websites. Implemented responsive designs improving mobile user experience.</p> </div> </div> </div> <div class="section-divider"></div> <div class="mb-6"> <h3 class="text-xl font-semibold mb-4">Education</h3> <div id="previewEducation"> <div class="timeline-item mb-4"> <h4 class="font-bold">Master of Computer Science</h4> <div class="flex justify-between text-gray-600 mb-1"> <span>University of Technology</span> <span>2018 - 2020</span> </div> <p class="text-gray-700">Specialization in Artificial Intelligence</p> </div> <div class="timeline-item"> <h4 class="font-bold">Bachelor of Science</h4> <div class="flex justify-between text-gray-600 mb-1"> <span>State University</span> <span>2014 - 2018</span> </div> <p class="text-gray-700">Major in Computer Science</p> </div> </div> </div> <div class="section-divider"></div> <div class="mb-6"> <h3 class="text-xl font-semibold mb-4">Skills</h3> <div id="previewSkills" class="grid grid-cols-2 gap-4"> <div> <div class="flex justify-between mb-1"> <span>JavaScript</span> <span>90%</span> </div> <div class="skill-bar"> <div class="skill-level" style="width: 90%"></div> </div> </div> <div> <div class="flex justify-between mb-1"> <span>React</span> <span>85%</span> </div> <div class="skill-bar"> <div class="skill-level" style="width: 85%"></div> </div> </div> <div> <div class="flex justify-between mb-1"> <span>Node.js</span> <span>80%</span> </div> <div class="skill-bar"> <div class="skill-level" style="width: 80%"></div> </div> </div> <div> <div class="flex justify-between mb-1"> <span>HTML/CSS</span> <span>95%</span> </div> <div class="skill-bar"> <div class="skill-level" style="width: 95%"></div> </div> </div> </div> </div> <div class="section-divider"></div> <div class="mb-6"> <h3 class="text-xl font-semibold mb-4">Languages</h3> <div id="previewLanguages"> <div class="flex justify-between mb-2"> <span>English</span> <div> <span class="language-level filled"></span> <span class="language-level filled"></span> <span class="language-level filled"></span> <span class="language-level filled"></span> <span class="language-level filled"></span> </div> </div> <div class="flex justify-between mb-2"> <span>Spanish</span> <div> <span class="language-level filled"></span> <span class="language-level filled"></span> <span class="language-level filled"></span> <span class="language-level"></span> <span class="language-level"></span> </div> </div> </div> </div> <div class="section-divider"></div> <div class="mb-6"> <h3 class="text-xl font-semibold mb-4">Projects</h3> <div id="previewProjects"> <div class="mb-4"> <h4 class="font-bold">E-commerce Platform</h4> <p class="text-gray-700 mb-1">Built a full-stack e-commerce platform with React, Node.js, and MongoDB. Implemented payment gateway integration and inventory management.</p> <p class="text-sm text-gray-600">Technologies: React, Node.js, MongoDB, Stripe API</p> </div> <div> <h4 class="font-bold">Task Management App</h4> <p class="text-gray-700 mb-1">Developed a collaborative task management application with real-time updates using WebSockets.</p> <p class="text-sm text-gray-600">Technologies: Vue.js, Firebase, Socket.io</p> </div> </div> </div> <div class="section-divider"></div> <div> <h3 class="text-xl font-semibold mb-4">Certifications</h3> <div id="previewCertifications"> <div class="mb-2"> <h4 class="font-bold">AWS Certified Developer</h4> <p class="text-gray-600">Amazon Web Services - 2022</p> </div> <div> <h4 class="font-bold">Google Analytics Certified</h4> <p class="text-gray-600">Google - 2021</p> </div> </div> </div> </div> <div id="pdfPreview" class="resume-preview"></div> </div> </div> </div> </div> <div class="floating-button"> <button id="downloadPDF" class="bg-red-600 text-white p-4 rounded-full shadow-lg hover:bg-red-700 transition duration-300 hidden"> <i class="fas fa-download text-xl"></i> </button> </div> <script> // Initialize jsPDF const { jsPDF } = window.jspdf; // Toggle form sections document.querySelectorAll('.toggle-section').forEach(section => { section.addEventListener('click', () => { const formSection = section.parentElement; formSection.classList.toggle('collapsed'); section.classList.toggle('collapsed'); }); }); // Style selector document.getElementById('styleSelector').addEventListener('change', function() { const preview = document.getElementById('resumePreview'); preview.className = 'resume-preview ' + this.value; updatePreview(); }); // Add experience document.getElementById('addExperience').addEventListener('click', () => { const container = document.getElementById('experienceContainer'); const newItem = document.createElement('div'); newItem.className = 'experience-item mb-6 p-4 border rounded-lg'; newItem.innerHTML = ` <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-3"> <div> <label class="block text-gray-700 mb-2">Job Title</label> <input type="text" class="w-full px-4 py-2 border rounded-lg experience-title" placeholder="Software Developer"> </div> <div> <label class="block text-gray-700 mb-2">Company</label> <input type="text" class="w-full px-4 py-2 border rounded-lg experience-company" placeholder="Tech Corp Inc."> </div> </div> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-3"> <div> <label class="block text-gray-700 mb-2">Start Date</label> <input type="text" class="w-full px-4 py-2 border rounded-lg experience-start" placeholder="Jan 2020"> </div> <div> <label class="block text-gray-700 mb-2">End Date</label> <input type="text" class="w-full px-4 py-2 border rounded-lg experience-end" placeholder="Present"> </div> </div> <div class="mb-3"> <label class="block text-gray-700 mb-2">Description</label> <textarea class="w-full px-4 py-2 border rounded-lg experience-description" rows="3" placeholder="Describe your responsibilities and achievements..."></textarea> </div> <button class="remove-experience bg-red-500 text-white px-3 py-1 rounded-lg hover:bg-red-600">Remove</button> `; container.appendChild(newItem); // Add event listener to the new remove button newItem.querySelector('.remove-experience').addEventListener('click', () => { container.removeChild(newItem); updatePreview(); }); // Add input event listeners to update preview const inputs = newItem.querySelectorAll('input, textarea'); inputs.forEach(input => { input.addEventListener('input', updatePreview); }); }); // Add education document.getElementById('addEducation').addEventListener('click', () => { const container = document.getElementById('educationContainer'); const newItem = document.createElement('div'); newItem.className = 'education-item mb-6 p-4 border rounded-lg'; newItem.innerHTML = ` <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-3"> <div> <label class="block text-gray-700 mb-2">Degree</label> <input type="text" class="w-full px-4 py-2 border rounded-lg education-degree" placeholder="Bachelor of Science"> </div> <div> <label class="block text-gray-700 mb-2">Institution</label> <input type="text" class="w-full px-4 py-2 border rounded-lg education-institution" placeholder="University of Technology"> </div> </div> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-3"> <div> <label class="block text-gray-700 mb-2">Field of Study</label> <input type="text" class="w-full px-4 py-2 border rounded-lg education-field" placeholder="Computer Science"> </div> <div> <label class="block text-gray-700 mb-2">Year</label> <input type="text" class="w-full px-4 py-2 border rounded-lg education-year" placeholder="2016 - 2020"> </div> </div> <button class="remove-education bg-red-500 text-white px-3 py-1 rounded-lg hover:bg-red-600">Remove</button> `; container.appendChild(newItem); // Add event listener to the new remove button newItem.querySelector('.remove-education').addEventListener('click', () => { container.removeChild(newItem); updatePreview(); }); // Add input event listeners to update preview const inputs = newItem.querySelectorAll('input'); inputs.forEach(input => { input.addEventListener('input', updatePreview); }); }); // Add skill document.getElementById('addSkill').addEventListener('click', () => { const container = document.getElementById('skillsContainer'); const newItem = document.createElement('div'); newItem.className = 'skill-item mb-4 p-4 border rounded-lg'; newItem.innerHTML = ` <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-3"> <div> <label class="block text-gray-700 mb-2">Skill Name</label> <input type="text" class="w-full px-4 py-2 border rounded-lg skill-name" placeholder="JavaScript"> </div> <div> <label class="block text-gray-700 mb-2">Level (1-10)</label> <input type="number" min="1" max="10" class="w-full px-4 py-2 border rounded-lg skill-level" placeholder="8"> </div> </div> <button class="remove-skill bg-red-500 text-white px-3 py-1 rounded-lg hover:bg-red-600">Remove</button> `; container.appendChild(newItem); // Add event listener to the new remove button newItem.querySelector('.remove-skill').addEventListener('click', () => { container.removeChild(newItem); updatePreview(); }); // Add input event listeners to update preview const inputs = newItem.querySelectorAll('input'); inputs.forEach(input => { input.addEventListener('input', updatePreview); }); }); // Add language document.getElementById('addLanguage').addEventListener('click', () => { const container = document.getElementById('languagesContainer'); const newItem = document.createElement('div'); newItem.className = 'language-item mb-4 p-4 border rounded-lg'; newItem.innerHTML = ` <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-3"> <div> <label class="block text-gray-700 mb-2">Language</label> <input type="text" class="w-full px-4 py-2 border rounded-lg language-name" placeholder="English"> </div> <div> <label class="block text-gray-700 mb-2">Proficiency</label> <select class="w-full px-4 py-2 border rounded-lg language-proficiency"> <option value="5">Native</option> <option value="4">Fluent</option> <option value="3">Intermediate</option> <option value="2">Basic</option> <option value="1">Beginner</option> </select> </div> </div> <button class="remove-language bg-red-500 text-white px-3 py-1 rounded-lg hover:bg-red-600">Remove</button> `; container.appendChild(newItem); // Add event listener to the new remove button newItem.querySelector('.remove-language').addEventListener('click', () => { container.removeChild(newItem); updatePreview(); }); // Add input event listeners to update preview const inputs = newItem.querySelectorAll('input, select'); inputs.forEach(input => { input.addEventListener('input', updatePreview); input.addEventListener('change', updatePreview); }); }); // Add project document.getElementById('addProject').addEventListener('click', () => { const container = document.getElementById('projectsContainer'); const newItem = document.createElement('div'); newItem.className = 'project-item mb-6 p-4 border rounded-lg'; newItem.innerHTML = ` <div class="mb-3"> <label class="block text-gray-700 mb-2">Project Name</label> <input type="text" class="w-full px-4 py-2 border rounded-lg project-name" placeholder="E-commerce Website"> </div> <div class="mb-3"> <label class="block text-gray-700 mb-2">Description</label> <textarea class="w-full px-4 py-2 border rounded-lg project-description" rows="3" placeholder="Describe the project and your role..."></textarea> </div> <div class="mb-3"> <label class="block text-gray-700 mb-2">Technologies Used</label> <input type="text" class="w-full px-4 py-2 border rounded-lg project-technologies" placeholder="React, Node.js, MongoDB"> </div> <div class="mb-3"> <label class="block text-gray-700 mb-2">Link (optional)</label> <input type="url" class="w-full px-4 py-2 border rounded-lg project-link" placeholder="https://example.com"> </div> <button class="remove-project bg-red-500 text-white px-3 py-1 rounded-lg hover:bg-red-600">Remove</button> `; container.appendChild(newItem); // Add event listener to the new remove button newItem.querySelector('.remove-project').addEventListener('click', () => { container.removeChild(newItem); updatePreview(); }); // Add input event listeners to update preview const inputs = newItem.querySelectorAll('input, textarea'); inputs.forEach(input => { input.addEventListener('input', updatePreview); }); }); // Add certification document.getElementById('addCertification').addEventListener('click', () => { const container = document.getElementById('certificationsContainer'); const newItem = document.createElement('div'); newItem.className = 'certification-item mb-6 p-4 border rounded-lg'; newItem.innerHTML = ` <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-3"> <div> <label class="block text-gray-700 mb-2">Certification Name</label> <input type="text" class="w-full px-4 py-2 border rounded-lg certification-name" placeholder="AWS Certified Developer"> </div> <div> <label class="block text-gray-700 mb-2">Issuing Organization</label> <input type="text" class="w-full px-4 py-2 border rounded-lg certification-organization" placeholder="Amazon Web Services"> </div> </div> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-3"> <div> <label class="block text-gray-700 mb-2">Date Obtained</label> <input type="text" class="w-full px-4 py-2 border rounded-lg certification-date" placeholder="Jun 2022"> </div> <div> <label class="block text-gray-700 mb-2">Credential ID (optional)</label> <input type="text" class="w-full px-4 py-2 border rounded-lg certification-id" placeholder="ABC123456789"> </div> </div> <button class="remove-certification bg-red-500 text-white px-3 py-1 rounded-lg hover:bg-red-600">Remove</button> `; container.appendChild(newItem); // Add event listener to the new remove button newItem.querySelector('.remove-certification').addEventListener('click', () => { container.removeChild(newItem); updatePreview(); }); // Add input event listeners to update preview const inputs = newItem.querySelectorAll('input'); inputs.forEach(input => { input.addEventListener('input', updatePreview); }); }); // Update preview function function updatePreview() { // Personal info document.getElementById('previewName').textContent = document.getElementById('fullName').value || 'John Doe'; document.getElementById('previewProfession').textContent = document.getElementById('profession').value || 'Software Developer'; document.getElementById('previewEmail').innerHTML = `<i class="fas fa-envelope mr-1"></i> ${document.getElementById('email').value || 'john.doe@example.com'}`; document.getElementById('previewPhone').innerHTML = `<i class="fas fa-phone mr-1"></i> ${document.getElementById('phone').value || '(123) 456-7890'}`; document.getElementById('previewLocation').innerHTML = `<i class="fas fa-map-marker-alt mr-1"></i> ${document.getElementById('location').value || 'New York, USA'}`; document.getElementById('previewWebsite').innerHTML = document.getElementById('website').value ? `<i class="fas fa-globe mr-1"></i> ${document.getElementById('website').value}` : ''; // Summary document.getElementById('previewSummary').textContent = document.getElementById('summary').value || 'Experienced software developer with 5+ years of experience in web application development. Specialized in JavaScript frameworks and cloud technologies. Passionate about creating efficient, scalable, and user-friendly applications.'; // Experience const experienceContainer = document.getElementById('previewExperience'); experienceContainer.innerHTML = ''; const experienceItems = document.querySelectorAll('.experience-item'); if (experienceItems.length === 0) { experienceContainer.innerHTML = ` <div class="timeline-item mb-4"> <h4 class="font-bold">Senior Developer</h4> <div class="flex justify-between text-gray-600 mb-1"> <span>Tech Solutions Inc.</span> <span>Jan 2020 - Present</span> </div> <p class="text-gray-700">Led a team of 5 developers to build enterprise applications. Implemented CI/CD pipelines reducing deployment time by 40%.</p> </div> <div class="timeline-item"> <h4 class="font-bold">Junior Developer</h4> <div class="flex justify-between text-gray-600 mb-1"> <span>Digital Creations</span> <span>Jun 2017 - Dec 2019</span> </div> <p class="text-gray-700">Developed and maintained client websites. Implemented responsive designs improving mobile user experience.</p> </div> `; } else { experienceItems.forEach(item => { const title = item.querySelector('.experience-title').value || 'Job Title'; const company = item.querySelector('.experience-company').value || 'Company Name'; const start = item.querySelector('.experience-start').value || 'Start Date'; const end = item.querySelector('.experience-end').value || 'End Date'; const description = item.querySelector('.experience-description').value || 'Job description and responsibilities.'; const experienceItem = document.createElement('div'); experienceItem.className = 'timeline-item mb-4'; experienceItem.innerHTML = ` <h4 class="font-bold">${title}</h4> <div class="flex justify-between text-gray-600 mb-1"> <span>${company}</span> <span>${start} - ${end}</span> </div> <p class="text-gray-700">${description}</p> `; experienceContainer.appendChild(experienceItem); }); } // Education const educationContainer = document.getElementById('previewEducation'); educationContainer.innerHTML = ''; const educationItems = document.querySelectorAll('.education-item'); if (educationItems.length === 0) { educationContainer.innerHTML = ` <div class="timeline-item mb-4"> <h4 class="font-bold">Master of Computer Science</h4> <div class="flex justify-between text-gray-600 mb-1"> <span>University of Technology</span> <span>2018 - 2020</span> </div> <p class="text-gray-700">Specialization in Artificial Intelligence</p> </div> <div class="timeline-item"> <h4 class="font-bold">Bachelor of Science</h4> <div class="flex justify-between text-gray-600 mb-1"> <span>State University</span> <span>2014 - 2018</span> </div> <p class="text-gray-700">Major in Computer Science</p> </div> `; } else { educationItems.forEach(item => { const degree = item.querySelector('.education-degree').value || 'Degree'; const institution = item.querySelector('.education-institution').value || 'Institution'; const field = item.querySelector('.education-field').value || 'Field of Study'; const year = item.querySelector('.education-year').value || 'Year'; const educationItem = document.createElement('div'); educationItem.className = 'timeline-item mb-4'; educationItem.innerHTML = ` <h4 class="font-bold">${degree}</h4> <div class="flex justify-between text-gray-600 mb-1"> <span>${institution}</span> <span>${year}</span> </div> <p class="text-gray-700">${field}</p> `; educationContainer.appendChild(educationItem); }); } // Skills const skillsContainer = document.getElementById('previewSkills'); skillsContainer.innerHTML = ''; const skillItems = document.querySelectorAll('.skill-item'); if (skillItems.length === 0) { skillsContainer.innerHTML = ` <div> <div class="flex justify-between mb-1"> <span>JavaScript</span> <span>90%</span> </div> <div class="skill-bar"> <div class="skill-level" style="width: 90%"></div> </div> </div> <div> <div class="flex justify-between mb-1"> <span>React</span> <span>85%</span> </div> <div class="skill-bar"> <div class="skill-level" style="width: 85%"></div> </div> </div> <div> <div class="flex justify-between mb-1"> <span>Node.js</span> <span>80%</span> </div> <div class="skill-bar"> <div class="skill-level" style="width: 80%"></div> </div> </div> <div> <div class="flex justify-between mb-1"> <span>HTML/CSS</span> <span>95%</span> </div> <div class="skill-bar"> <div class="skill-level" style="width: 95%"></div> </div> </div> `; } else { skillItems.forEach(item => { const name = item.querySelector('.skill-name').value || 'Skill'; const level = item.querySelector('.skill-level').value || '5'; const percentage = (level / 10) * 100; const skillItem = document.createElement('div'); skillItem.innerHTML = ` <div class="flex justify-between mb-1"> <span>${name}</span> <span>${percentage}%</span> </div> <div class="skill-bar"> <div class="skill-level" style="width: ${percentage}%"></div> </div> `; skillsContainer.appendChild(skillItem); }); } // Languages const languagesContainer = document.getElementById('previewLanguages'); languagesContainer.innerHTML = ''; const languageItems = document.querySelectorAll('.language-item'); if (languageItems.length === 0) { languagesContainer.innerHTML = ` <div class="flex justify-between mb-2"> <span>English</span> <div> <span class="language-level filled"></span> <span class="language-level filled"></span> <span class="language-level filled"></span> <span class="language-level filled"></span> <span class="language-level filled"></span> </div> </div> <div class="flex justify-between mb-2"> <span>Spanish</span> <div> <span class="language-level filled"></span> <span class="language-level filled"></span> <span class="language-level filled"></span> <span class="language-level"></span> <span class="language-level"></span> </div> </div> `; } else { languageItems.forEach(item => { const name = item.querySelector('.language-name').value || 'Language'; const proficiency = item.querySelector('.language-proficiency').value || '3'; const languageItem = document.createElement('div'); languageItem.className = 'flex justify-between mb-2'; const nameSpan = document.createElement('span'); nameSpan.textContent = name; const levelDiv = document.createElement('div'); for (let i = 1; i <= 5; i++) { const levelSpan = document.createElement('span'); levelSpan.className = 'language-level' + (i <= proficiency ? ' filled' : ''); levelDiv.appendChild(levelSpan); } languageItem.appendChild(nameSpan); languageItem.appendChild(levelDiv); languagesContainer.appendChild(languageItem); }); } // Projects const projectsContainer = document.getElementById('previewProjects'); projectsContainer.innerHTML = ''; const projectItems = document.querySelectorAll('.project-item'); if (projectItems.length === 0) { projectsContainer.innerHTML = ` <div class="mb-4"> <h4 class="font-bold">E-commerce Platform</h4> <p class="text-gray-700 mb-1">Built a full-stack e-commerce platform with React, Node.js, and MongoDB. Implemented payment gateway integration and inventory management.</p> <p class="text-sm text-gray-600">Technologies: React, Node.js, MongoDB, Stripe API</p> </div> <div> <h4 class="font-bold">Task Management App</h4> <p class="text-gray-700 mb-1">Developed a collaborative task management application with real-time updates using WebSockets.</p> <p class="text-sm text-gray-600">Technologies: Vue.js, Firebase, Socket.io</p> </div> `; } else { projectItems.forEach(item => { const name = item.querySelector('.project-name').value || 'Project Name'; const description = item.querySelector('.project-description').value || 'Project description.'; const technologies = item.querySelector('.project-technologies').value || 'Technologies used'; const link = item.querySelector('.project-link').value; const projectItem = document.createElement('div'); projectItem.className = 'mb-4'; projectItem.innerHTML = ` <h4 class="font-bold">${name}</h4> <p class="text-gray-700 mb-1">${description}</p> <p class="text-sm text-gray-600">Technologies: ${technologies}</p> ${link ? `<p class="text-sm text-blue-600"><i class="fas fa-link mr-1"></i> ${link}</p>` : ''} `; projectsContainer.appendChild(projectItem); }); } // Certifications const certificationsContainer = document.getElementById('previewCertifications'); certificationsContainer.innerHTML = ''; const certificationItems = document.querySelectorAll('.certification-item'); if (certificationItems.length === 0) { certificationsContainer.innerHTML = ` <div class="mb-2"> <h4 class="font-bold">AWS Certified Developer</h4> <p class="text-gray-600">Amazon Web Services - 2022</p> </div> <div> <h4 class="font-bold">Google Analytics Certified</h4> <p class="text-gray-600">Google - 2021</p> </div> `; } else { certificationItems.forEach(item => { const name = item.querySelector('.certification-name').value || 'Certification'; const organization = item.querySelector('.certification-organization').value || 'Organization'; const date = item.querySelector('.certification-date').value || 'Date'; const id = item.querySelector('.certification-id').value; const certificationItem = document.createElement('div'); certificationItem.className = 'mb-2'; certificationItem.innerHTML = ` <h4 class="font-bold">${name}</h4> <p class="text-gray-600">${organization} - ${date}</p> ${id ? `<p class="text-sm text-gray-500">ID: ${id}</p>` : ''} `; certificationsContainer.appendChild(certificationItem); }); } } // Add event listeners to all initial inputs document.querySelectorAll('#fullName, #profession, #email, #phone, #location, #website, #summary').forEach(input => { input.addEventListener('input', updatePreview); }); // Initial preview update updatePreview(); // Generate PDF document.getElementById('generateCV').addEventListener('click', () => { const preview = document.getElementById('resumePreview'); const downloadBtn = document.getElementById('downloadPDF'); // Show download button downloadBtn.classList.remove('hidden'); // Create PDF html2canvas(preview).then(canvas => { const imgData = canvas.toDataURL('image/png'); const pdf = new jsPDF('p', 'mm', 'a4'); const imgWidth = 210; const pageHeight = 295; const imgHeight = canvas.height * imgWidth / canvas.width; let heightLeft = imgHeight; let position = 0; pdf.addImage(imgData, 'PNG', 0, position, imgWidth, imgHeight); heightLeft -= pageHeight; while (heightLeft >= 0) { position = heightLeft - imgHeight; pdf.addPage(); pdf.addImage(imgData, 'PNG', 0, position, imgWidth, imgHeight); heightLeft -= pageHeight; } // Save PDF when download button is clicked downloadBtn.onclick = () => { const name = document.getElementById('fullName').value || 'cv'; pdf.save(`${name}-cv.pdf`); }; }); }); </script> <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=JorgeNelson/creatucv" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> </html>
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CV Generator Pro</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
.resume-preview {
width: 210mm;
height: 297mm;
margin: 0 auto;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
padding: 20px;
background-color: white;
position: relative;
overflow: hidden;
}
.classic {
font-family: 'Times New Roman', serif;
}
.modern {
font-family: 'Arial', sans-serif;
}
.creative {
font-family: 'Georgia', serif;
background-color: #f8f9fa;
}
.section-divider {
height: 2px;
background: linear-gradient(to right, transparent, #333, transparent);
margin: 15px 0;
}
.creative .section-divider {
background: linear-gradient(to right, transparent, #6c757d, transparent);
}
.modern .section-divider {
background: linear-gradient(to right, transparent, #007bff, transparent);
}
.timeline-item {
position: relative;
padding-left: 30px;
margin-bottom: 20px;
}
.timeline-item:before {
content: '';
position: absolute;
left: 0;
top: 5px;
width: 15px;
height: 15px;
border-radius: 50%;
background: #333;
}
.modern .timeline-item:before {
background: #007bff;
}
.creative .timeline-item:before {
background: #6c757d;
}
.skill-bar {
height: 10px;
background-color: #e9ecef;
border-radius: 5px;
margin-top: 5px;
}
.skill-level {
height: 100%;
border-radius: 5px;
background-color: #6c757d;
}
.modern .skill-level {
background-color: #007bff;
}
.creative .skill-level {
background-color: #6c757d;
}
.language-level {
display: inline-block;
width: 10px;
height: 10px;
border-radius: 50%;