|
|
|
@ -5,6 +5,7 @@ let hemicycle = document.getElementsByClassName("hemicycle")[0]
|
|
|
|
|
let row = 5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fetch("https://hub.xpub.nl/soupboat/the-parliament/")
|
|
|
|
|
.then((response) => response.json())
|
|
|
|
|
.then((data) => {
|
|
|
|
@ -15,7 +16,10 @@ fetch("https://hub.xpub.nl/soupboat/the-parliament/")
|
|
|
|
|
function populateSeats(parliament) {
|
|
|
|
|
for (const group of Object.keys(parliament)){ //gets the parent's keys
|
|
|
|
|
let party = partyRef.cloneNode(true);
|
|
|
|
|
party.id = group
|
|
|
|
|
let partyName = party.querySelector("h4")
|
|
|
|
|
party.id = group;
|
|
|
|
|
|
|
|
|
|
partyName.innerHTML = group;
|
|
|
|
|
for (representative of parliament[group]){
|
|
|
|
|
let seat = seatRef.cloneNode(true);
|
|
|
|
|
seat.querySelector(".label").innerHTML = representative.who;
|
|
|
|
|