diff --git a/src/index.js b/src/index.js index e3fb5d7143..d47e291d82 100644 --- a/src/index.js +++ b/src/index.js @@ -39,4 +39,55 @@ const siteContent = { // DO NOT CHANGE THIS OBJECT }, }; +//IMAGES console.log('project wired!') + +const logoImg = document.querySelector("#logo-img"); +logoImg.src = siteContent.images["logo-img"]; + +const ctaImg = document.querySelector('#cta-img'); +ctaImg.src = siteContent.images['cta-img']; + +const midImg = document.querySelector('#middle-img'); +midImg.setAttribute('src', siteContent.images['accent-img']); + +// FOOTER LINK +const footerLink = document.querySelector('footer a'); +footerLink.textContent = siteContent.footer.copyright; +footerLink.classList.add('bold'); + +//CONTACT +const contact = document.querySelector('section.contact'); +contact.children[0].textContent = siteContent.contact['contact-h4']; +contact.children[1].textContent = siteContent.contact['address']; +contact.children[2].textContent = siteContent.contact['phone']; +contact.children[3].textContent = siteContent.contact['email']; + +// TOP CONTENT +const topContent = document.querySelector('.top-content'); +topContent.children[0].children[0].textContent = siteContent['main-content']['features-h4'] +topContent.children[0].children[1].textContent = siteContent['main-content']['features-content']; +topContent.children[1].children[0].textContent = siteContent['main-content']['about-h4'] +topContent.children[1].children[1].textContent = siteContent['main-content']['about-content']; + +// BOTTOM CONTENT +const bottomContent = document.querySelector('.bottom-content'); +bottomContent.children[0].children[0].textContent = siteContent['main-content']['services-h4']; +bottomContent.children[0].children[1].textContent = siteContent['main-content']['services-content']; +bottomContent.children[1].children[0].textContent = siteContent['main-content']['product-h4']; +bottomContent.children[1].children[1].textContent = siteContent['main-content']['product-content'] +bottomContent.children[2].children[0].textContent = siteContent['main-content']['vision-h4']; +bottomContent.children[2].children[1].textContent = siteContent['main-content']['vision-content']; + +// CTA +document.querySelector('.cta .cta-text h1').textContent = siteContent.cta.h1; +document.querySelector('.cta .cta-text button').textContent = siteContent.cta.button; + +//NAV LINKS + +const navLinks = document.querySelectorAll('header nav a'); +const navLinkTexts = Object.values(siteContent.nav); +navLinks.forEach((link, idx) => { + link.textContent = navLinkTexts[idx]; + link.classList.add('italic') +}); \ No newline at end of file