Open lorenanderson-itrellis opened 6 years ago
Did anyone ever figure this out?
I was able to do this
function infoWhereWhen() {
const matches = document.getElementsByClassName("teamContainer");
const tijdenknockout = !{JSON.stringify(tijdenknockout)};
const veldnamen = !{JSON.stringify(veldnamen)};
for (let i = 0; i < matches.length; i++) {
const div = document.createElement("div");
div.style.position = "relative"
div.style.width = "0"
div.style.height = "0"
const label = document.createElement("label");
label.style.position = "absolute"
label.style.width = "250px"
label.style.fontSize = "85%"
label.style.left = "10px"
label.style.top = "-20px"
label.style.padding = "0"
label.style.color = 'rgba(0,0,0,0.6)'
label.innerHTML = veldnamen[i] + "  |  " + tijdenknockout[i];
div.append(label)
matches[i].append(div)
}
}
I had to mess around for a bit before i was happy with the result tho... You can view the result here
At the top of each round, is there a way to insert a title and other info such as dates?
I am looking for something like: "Round 1" "Matches happen between Mon. and Wed."
Similar to this photo: https://res.cloudinary.com/cmgverticals/image/upload/f_auto,q_80/v1491278076/ncaa_bracket_final_piwaax.jpg