Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
});