/* Author:Murtadha Marzouq @description: This is the main file that loads all the components @date: 04/13/2022 */ /**** * CREATE THE COMPONENTS AND APPEND THEM TO THE DOM ****/ /**** * LANGUAGE COMPONENTS ****/ const LanguagesComponent = () => { let html = '' for (i in Object.keys(information.Languages)) { html += `` } return `

Languages:

${html}` } /**** * P U B L I C A T I O N S C O M P O N E N T ****/ const PublicationsComponent = () => { let html = '' for (i in Object.keys(information.Publications)) { html += `` } return `

๐Ÿ“‘ Publications:

${html}` } /** * Objective Component */ const ObjectiveComponent = () => { let html = '' for (i in Object.keys(information.Objective)) { let objective = information.Objective[i] let objectiveComponent = document.createElement('div') objectiveComponent.classList.add('objective') objectiveComponent.innerHTML += `
  • ${objective}
  • ` html += objectiveComponent.outerHTML } return '

    ๐ŸŽฏ๐Ÿ–Š๏ธ Experience:

    ' + html } /**** * EDUCATION COMPONENT ****/ const EducationComponent = () => { let html = '' for (i in Object.keys(information.Education)) { let education = information.Education[i] let educationComponent = document.createElement('div') educationComponent.classList.add('education') educationComponent.innerHTML += ` ` html += educationComponent.outerHTML //document.querySelector("#column-1").appendChild(educationComponent); } return `

    ๐ŸŒŒ ๐ŸŽ“ Education:

    ${html}` } const SkillsComponent = () => { let Skills = `

    Skills:

    ` + information.Skills.map((skill) => { return ` ` }).join('') return Skills } const CertificationComponent = () => { let html = '' for (i in Object.keys(information.Certification)) { let certification = information.Certification[i] let certificationComponent = document.createElement('div') certificationComponent.classList.add('certification') certificationComponent.innerHTML += `

    ${certification.Certification}

    Certification Year: ${certification.Date}

    ${certification.Describtion}

    ` html += certificationComponent.outerHTML } return '

    ๐Ÿงพ๐Ÿงพ Certification:

    ' + html } const ExperienceComponent = () => { let html = '' for (i in Object.keys(information.Experience)) { let experience = information.Experience[i] let experienceComponent = document.createElement('div') experienceComponent.classList.add('experience') experienceComponent.innerHTML += `

    ${experience.title}

    ${experience.company}

    ${experience.location} | ${experience.startDate} - ${ experience.endDate }

    Responsibilities: ${experience.Responsibilities.map( (responsibility) => { return `

    ` }, ).join('')}

    ` html += experienceComponent.outerHTML } return '

    ๐Ÿข๐Ÿ–ฅ๏ธ๐Ÿ’ฝExperience:

    ' + html } const InterestComponent = () => { let html = '' for (i in Object.keys(information.Interests)) { let interest = information.Interests[i] let interestComponent = document.createElement('div') interestComponent.classList.add('interest') interestComponent.innerHTML += ` ` html += interestComponent.outerHTML } return '

    Interests:

    ' + html } const NavBar = () => { let html = ` (213)-458-4982 |` html += ` mmarzouq@uncc.edu |` html += ` Github |` html += ` LinkedIn | ` html += ` Resume ` html += `

    Charlotte, NC

    ` document.getElementById('header').innerHTML = `${html} ` + `Profile Picture

    ${information.Name}

    ' + Secondcolumn.outerHTML document.querySelector('.resumeText').innerHTML = page } var information = {} window.onload = () => { let url; if(window.location.hostname === 'localhost' || window.location.hostname === '127.0.0.1' ){ let host = window.location.hostname let port = window.location.port url = `http://${host}:${port}/information.json` console.log('THE URL IS LOCAL LINK' + url) }else{ // make it the remote file url = 'https://raw.githubusercontent.com/MurtadhaM/FindASnake/main/information.json'; console.log('THE URL IS REMOTE LINK' + url) } fetch( url, ) .then((response) => response.json()) .then((data) => { information = data NavBar() load() }) }