function generateResumeContent(data, container) {
// Generate Education section
if (data.education && data.education.length > 0) {
const educationSection = document.createElement('resume-section');
educationSection.setAttribute('title', 'Education');
educationSection.setAttribute('icon', 'book');
let educationHTML = '
';
data.education.forEach(edu => {
educationHTML += `
${edu.institution}
${edu.degree} - ${edu.major}
${edu.startDate} - ${edu.endDate}
GPA: ${edu.gpa}
Courses: ${edu.courses.join(', ')}
`;
});
educationHTML += '
';
educationSection.innerHTML = educationHTML;
container.appendChild(educationSection);
}
// Generate Work Experience section
if (data.workExperience && data.workExperience.length > 0) {
const workSection = document.createElement('resume-section');
workSection.setAttribute('title', 'Work Experience');
workSection.setAttribute('icon', 'briefcase');
let workHTML = '';
data.workExperience.forEach(work => {
workHTML += `
${work.company}
${work.position}
${work.startDate} - ${work.endDate}
${work.responsibilities.map(resp => `- ${resp}
`).join('')}
`;
});
workHTML += '
';
workSection.innerHTML = workHTML;
container.appendChild(workSection);
}
// Generate Publications section
if (data.publications && data.publications.length > 0) {
const pubSection = document.createElement('resume-section');
pubSection.setAttribute('title', 'Research Publications');
pubSection.setAttribute('icon', 'file-text');
let pubHTML = '';
data.publications.forEach(pub => {
pubHTML += `
${pub.title}
${pub.authors} | ${pub.conference} | ${pub.year}
${pub.description}
`;
});
pubHTML += '
';
pubSection.innerHTML = pubHTML;
container.appendChild(pubSection);
}
// Generate Skills section
if (data.skills && data.skills.length > 0) {
const skillsSection = document.createElement('resume-section');
skillsSection.setAttribute('title', 'Skills');
skillsSection.setAttribute('icon', 'code');
const skillsHTML = `
${data.skills.map(skill => `- ${skill}
`).join('')}
`;
skillsSection.innerHTML = skillsHTML;
container.appendChild(skillsSection);
}
// Generate Awards section
if (data.awards && data.awards.length > 0) {
const awardsSection = document.createElement('resume-section');
awardsSection.setAttribute('title', 'Awards');
awardsSection.setAttribute('icon', 'award');
let awardsHTML = '';
data.awards.forEach(award => {
awardsHTML += `
${award.name}
${award.date}
`;
});
awardsHTML += '
';
awardsSection.innerHTML = awardsHTML;
container.appendChild(awardsSection);
}
// Generate Self Assessment section
if (data.selfAssessment) {
const selfSection = document.createElement('resume-section');
selfSection.setAttribute('title', 'Self Assessment');
selfSection.setAttribute('icon', 'user');
const selfHTML = `
`;
selfSection.innerHTML = selfHTML;
container.appendChild(selfSection);
}
}