Skip to content

Commit

Permalink
adding data.json and js logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Lescano713 committed Jul 27, 2024
1 parent 6fed824 commit 2192081
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 52 deletions.
39 changes: 39 additions & 0 deletions data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"testimonials": [
{
"studentName" : "Daniel Clifford",
"rol": "Verified Graduate",
"studentImage" : "./images/image-daniel.jpg",
"resume":"I received a job offer mid-course, and the subjects I learned were current, if not more so, in the company I joined. I honestly feel I got every penny’s worth.",
"testimonial": "I was an EMT for many years before I joined the bootcamp. I’ve been looking to make a transition and have heard some people who had an amazing experience here. I signed up for the free intro course and found it incredibly fun! I enrolled shortly thereafter. The next 12 weeks was the best - and most grueling - time of my life. Since completing the course, I’ve successfully switched careers, working as a Software Engineer at a VR startup."
},
{
"studentName" : "Jonathan Walters",
"rol": "Verified Graduate",
"studentImage" : "./images/image-jonathan.jpg",
"resume":"The team was very supportive and kept me motivated",
"testimonial": "I started as a total newbie with virtually no coding skills. I now work as a mobile engineer for a big company. This was one of the best investments I’ve made in myself. "
},
{
"studentName" : "Jeanette Harmon",
"rol": "Verified Graduate",
"studentImage" : "./images/image-jeanette.jpg",
"resume":"An overall wonderful and rewarding experience",
"testimonial": "Thank you for the wonderful experience! I now have a job I really enjoy, and make a good living while doing something I love."
},
{
"studentName" : "Patrick Abrams",
"rol": "Verified Graduate",
"studentImage" : "./images/image-Patrick.jpg",
"resume":"Awesome teaching support from TAs who did the bootcamp themselves. Getting guidance from them and learning from their experiences was easy.",
"testimonial": "The staff seem genuinely concerned about my progress which I find really refreshing. The program gave me the confidence necessary to be able to go out in the world and present myself as a capable junior developer. The standard is above the rest. You will get the personal attention you need from an incredible community of smart and amazing people."
},
{
"studentName" : "Kira Whittle",
"rol": "Verified Graduate",
"studentImage" : "./images/image-Kira.jpg",
"resume":"Such a life-changing experience. Highly recommended!",
"testimonial": "Before joining the bootcamp, I’ve never written a line of code. I needed some structure from professionals who can help me learn programming step by step. I was encouraged to enroll by a former student of theirs who can only say wonderful things about the program. The entire curriculum and staff did not disappoint. They were very hands-on and I never had to wait long for assistance. The agile team project, in particular, was outstanding. It took my learning to the next level in a way that no tutorial could ever have. In fact, I’ve often referred to it during interviews as an example of my developent experience. It certainly helped me land a job as a full-stack developer after receiving multiple offers. 100% recommend!"
}
]
}
54 changes: 2 additions & 52 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,58 +9,8 @@
<title>Frontend Mentor | [Challenge Name Here]</title>
</head>
<body>
Daniel Clifford
Verified Graduate

I received a job offer mid-course, and the subjects I learned were current, if not more so,
in the company I joined. I honestly feel I got every penny’s worth.

“ I was an EMT for many years before I joined the bootcamp. I’ve been looking to make a
transition and have heard some people who had an amazing experience here. I signed up
for the free intro course and found it incredibly fun! I enrolled shortly thereafter.
The next 12 weeks was the best - and most grueling - time of my life. Since completing
the course, I’ve successfully switched careers, working as a Software Engineer at a VR startup. ”

Jonathan Walters
Verified Graduate

The team was very supportive and kept me motivated

“ I started as a total newbie with virtually no coding skills. I now work as a mobile engineer
for a big company. This was one of the best investments I’ve made in myself. ”

Jeanette Harmon
Verified Graduate

An overall wonderful and rewarding experience

“ Thank you for the wonderful experience! I now have a job I really enjoy, and make a good living
while doing something I love. ”

Patrick Abrams
Verified Graduate

Awesome teaching support from TAs who did the bootcamp themselves. Getting guidance from them and
learning from their experiences was easy.

“ The staff seem genuinely concerned about my progress which I find really refreshing. The program
gave me the confidence necessary to be able to go out in the world and present myself as a capable
junior developer. The standard is above the rest. You will get the personal attention you need from
an incredible community of smart and amazing people. ”

Kira Whittle
Verified Graduate

Such a life-changing experience. Highly recommended!

“ Before joining the bootcamp, I’ve never written a line of code. I needed some structure from
professionals who can help me learn programming step by step. I was encouraged to enroll by a former
student of theirs who can only say wonderful things about the program. The entire curriculum and staff
did not disappoint. They were very hands-on and I never had to wait long for assistance. The agile team
project, in particular, was outstanding. It took my learning to the next level in a way that no tutorial
could ever have. In fact, I’ve often referred to it during interviews as an example of my developent
experience. It certainly helped me land a job as a full-stack developer after receiving multiple offers.
100% recommend! ”
<main id="testimonials-section">
</main>
<script src="index.js"></script>
</body>
</html>
30 changes: 30 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
const main = document.getElementById("testimonials-section");

function getElements(callback){
fetch('data.json')
.then(response => response.json())
.then(data =>callback(data.testimonials))
}

getElements(data => {
data.forEach(element => {
let section = document.createElement("section");
section.classList.add("testimonial-container");
let div = document.createElement("div");
div.classList.add("student-info")
let h1 = document.createElement("h1");
h1.textContent = element.studentName;
let p = document.createElement("p");
p.textContent = element.rol;
div.appendChild(h1);
div.appendChild(p);
let bResume = document.createElement("b");
bResume.textContent = element.resume;
let qTestimonial = document.createElement("b");
qTestimonial.textContent = element.testimonial;
section.appendChild(div)
section.appendChild(bResume);
section.appendChild(qTestimonial);
main.appendChild(section);
});
})

0 comments on commit 2192081

Please sign in to comment.