Careers + Breezy .json

This commit is contained in:
Thomas Smith 2022-10-18 12:14:37 -04:00
parent a4fafcfe32
commit 63b99f4fbb
2 changed files with 37 additions and 2 deletions

View file

@ -1,6 +1,13 @@
{{ define "main" }}
<section>
<div>
<span id="aa62fd265a9f"></span>
</div>
<div class="container">
<div class="row">
<div class="col">
@ -17,13 +24,21 @@
<div class="accordion" id="accordionExample">
<div class="accordion-item">
<h2 class="accordion-header" id="headingOne">
<button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
<button class="accordion-button" id="jobOne" type="button" data-bs-toggle="collapse" data-bs-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
Accordion Item #1
</button>
</h2>
<div id="collapseOne" class="accordion-collapse collapse show" aria-labelledby="headingOne" data-bs-parent="#accordionExample">
<div class="accordion-body">
<strong>This is the first item's accordion body.</strong> It is shown by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions. You can modify any of this with custom CSS or overriding our default variables. It's also worth noting that just about any HTML can go within the <code>.accordion-body</code>, though the transition does limit overflow.
<p>Employment type: <span id="typeOne"></span></p>
<p>Department: <span id="deptOne"></span></p>
<hr>
<div id="descOne"></div>
<div>
<a href="" id="linkOne">
<button class="detail-btn-large"><i class="icon-enter-arrow"></i>VIEW ALL DETAILS</button>
</a>
</div>
</div>
</div>
</div>

View file

@ -1,4 +1,6 @@
<hr>
<div id="myData"></div>
<section class="footer" id="community">
<div class="container">
<div class="row footer-top">
@ -162,3 +164,21 @@ integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+
},
});
</script>
<script>
const url = 'https://tea.breezy.hr/json?verbose=true';
fetch(url)
.then(res => res.json())
.then((out) => {
console.log(out);
document.getElementById('typeOne').innerHTML = out[0].type.name;
document.getElementById('deptOne').innerHTML = out[0].department;
document.getElementById('jobOne').innerHTML = out[0].name;
document.getElementById('descOne').innerHTML = out[0].description;
document.getElementById('linkOne').href = out[0].url;
})
.catch(err => { throw err });
</script>