diff --git a/scorekeeper/scorekeep.html b/scorekeeper/scorekeep.html index ef71c6d..8234a2b 100644 --- a/scorekeeper/scorekeep.html +++ b/scorekeeper/scorekeep.html @@ -10,23 +10,28 @@ html { div.score { display: inline-block; font-family: monospace, sans-serif; - font-size: 20vw; font-weight: bold; + position: relative; text-align: center; width: 49%; } -.score.elijah { - color: darkblue; -} +div.score span { font-size: 20vw; } + +.score.p1 { color: darkblue; } +.score.p2 { color: darkred; } +.score.p3 { color: darkgreen; } +.score.p4 { color: black; } input { border: none; border-bottom: solid thin black; font-family: monospace; - font-size: 10vw; - margin: 1rem 12%; - width: 24% + font-size: 4vw; + position: absolute; + right: 0; + bottom: 0; + width: 24%; } @@ -34,20 +39,28 @@ input { console.log("Loaded"); function updateScore(event, player) { if (event.key != 'Enter') return; - var sbEl = document.getElementsByClassName(player)[0]; + var sbEl = document.querySelector('.score.' + player + ' span'); sbEl.innerHTML = +(sbEl.innerHTML) + +(event.target.value); event.target.value = ""; }
-