From f8f926e563030946c3ed8aa53e1def15861d30e7 Mon Sep 17 00:00:00 2001 From: CameronRuch Date: Tue, 8 Feb 2022 05:05:22 -0600 Subject: [PATCH 1/7] added image dom commands --- src/index.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/index.js b/src/index.js index e3fb5d7143..851ec2ea34 100644 --- a/src/index.js +++ b/src/index.js @@ -40,3 +40,12 @@ const siteContent = { // DO NOT CHANGE THIS OBJECT }; 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 accentImg = document.querySelector("#middle-img"); +accentImg.src = siteContent.images["accent-img"]; \ No newline at end of file From e3f925bb35c76fdf75ad06496285c3eef584962a Mon Sep 17 00:00:00 2001 From: CameronRuch Date: Tue, 8 Feb 2022 05:14:14 -0600 Subject: [PATCH 2/7] added contact and footer --- src/index.js | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 851ec2ea34..ad01c42229 100644 --- a/src/index.js +++ b/src/index.js @@ -41,6 +41,10 @@ const siteContent = { // DO NOT CHANGE THIS OBJECT console.log('project wired!') + + +// images + const logoImg = document.querySelector("#logo-img"); logoImg.src = siteContent.images["logo-img"]; @@ -48,4 +52,24 @@ const ctaImg = document.querySelector("#cta-img"); ctaImg.src = siteContent.images["cta-img"]; const accentImg = document.querySelector("#middle-img"); -accentImg.src = siteContent.images["accent-img"]; \ No newline at end of file +accentImg.src = siteContent.images["accent-img"]; + +//contact + +const contact = document.querySelector("section.contact"); +contact.querySelector('h4').textContent = siteContent.contact["contact-h4"]; +contact.querySelector('p:nth-of-type(1)').textContent = siteContent.contact["address"]; +contact.querySelector('p:nth-of-type(2)').textContent = siteContent.contact["phone"]; +contact.querySelector('p:nth-of-type(3)').textContent = siteContent.contact["email"]; + + + + + + +// footer + +const footerLink = document.querySelector("footer a"); +footerLink.textContent = siteContent.footer.copyright; +footerLink.classList.add("bold"); + From f32ed350248af8ae97bc9dc32ebcb461c64b023b Mon Sep 17 00:00:00 2001 From: CameronRuch Date: Tue, 8 Feb 2022 05:23:17 -0600 Subject: [PATCH 3/7] added top content --- src/index.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/index.js b/src/index.js index ad01c42229..e2e961afd3 100644 --- a/src/index.js +++ b/src/index.js @@ -41,8 +41,6 @@ const siteContent = { // DO NOT CHANGE THIS OBJECT console.log('project wired!') - - // images const logoImg = document.querySelector("#logo-img"); @@ -54,6 +52,16 @@ ctaImg.src = siteContent.images["cta-img"]; const accentImg = document.querySelector("#middle-img"); accentImg.src = siteContent.images["accent-img"]; +//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"]; + + + //contact const contact = document.querySelector("section.contact"); @@ -62,11 +70,6 @@ contact.querySelector('p:nth-of-type(1)').textContent = siteContent.contact["add contact.querySelector('p:nth-of-type(2)').textContent = siteContent.contact["phone"]; contact.querySelector('p:nth-of-type(3)').textContent = siteContent.contact["email"]; - - - - - // footer const footerLink = document.querySelector("footer a"); From 182780ba16c90df7ac829f9fddf4087643fc524e Mon Sep 17 00:00:00 2001 From: CameronRuch Date: Tue, 8 Feb 2022 05:28:43 -0600 Subject: [PATCH 4/7] added bottom content --- src/index.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/index.js b/src/index.js index e2e961afd3..9344cc6f7f 100644 --- a/src/index.js +++ b/src/index.js @@ -60,6 +60,17 @@ topContent.children[0].children[1].textContent = siteContent["main-content"]["fe topContent.children[1].children[0].textContent = siteContent["main-content"]["about-h4"]; topContent.children[1].children[1].textContent = siteContent["main-content"]["about-content"]; +//bot content + +const bottomContent = document.querySelector(".bottom-content"); +const both4 = bottomContent.querySelectorAll("h4"); +both4[0].textContent = siteContent["main-content"]["services-h4"]; +both4[1].textContent = siteContent["main-content"]["product-h4"]; +both4[2].textContent = siteContent["main-content"]["vision-h4"]; +const botp = bottomContent.querySelectorAll("p"); +botp[0].textContent = siteContent["main-content"]["services-content"]; +botp[1].textContent = siteContent["main-content"]["product-content"]; +botp[2].textContent = siteContent["main-content"]["vision-content"]; //contact From 62df72bdae01a9a81e3ffa5517f256b1b19e5f99 Mon Sep 17 00:00:00 2001 From: CameronRuch Date: Tue, 8 Feb 2022 05:33:02 -0600 Subject: [PATCH 5/7] added cta content --- src/index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/index.js b/src/index.js index 9344cc6f7f..f31d88e3a1 100644 --- a/src/index.js +++ b/src/index.js @@ -52,6 +52,12 @@ ctaImg.src = siteContent.images["cta-img"]; const accentImg = document.querySelector("#middle-img"); accentImg.src = siteContent.images["accent-img"]; +//cta + +const cta = document.querySelector(".cta"); +cta.querySelector("h1").textContent = siteContent["cta"]["h1"]; +cta.querySelector("button").textContent = siteContent["cta"]["button"]; + //top content const topContent = document.querySelector(".top-content"); From e4890cf9c3334f216bac425b3da36ea5f43cb81d Mon Sep 17 00:00:00 2001 From: CameronRuch Date: Tue, 8 Feb 2022 05:38:43 -0600 Subject: [PATCH 6/7] added nav --- src/index.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/index.js b/src/index.js index f31d88e3a1..179e10d0a6 100644 --- a/src/index.js +++ b/src/index.js @@ -52,6 +52,14 @@ ctaImg.src = siteContent.images["cta-img"]; const accentImg = document.querySelector("#middle-img"); accentImg.src = siteContent.images["accent-img"]; +//nav + +const navContent = document.querySelectorAll("nav a"); +const navLinks = Object.values(siteContent.nav); +navContent.forEach((link, idx) => { + link.textContent = navLinks[idx]; +}); + //cta const cta = document.querySelector(".cta"); From a17beb85f3beb37a3b2aa27a58832a0c351b1d3b Mon Sep 17 00:00:00 2001 From: CameronRuch Date: Tue, 8 Feb 2022 05:42:29 -0600 Subject: [PATCH 7/7] added nav italic correction --- src/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/index.js b/src/index.js index 179e10d0a6..b1c58bb4fd 100644 --- a/src/index.js +++ b/src/index.js @@ -58,8 +58,10 @@ const navContent = document.querySelectorAll("nav a"); const navLinks = Object.values(siteContent.nav); navContent.forEach((link, idx) => { link.textContent = navLinks[idx]; + link.classList.add("italic"); }); + //cta const cta = document.querySelector(".cta");