diff --git a/static/css/alliance_station_display.css b/static/css/alliance_station_display.css index 6d37e61..1859044 100644 --- a/static/css/alliance_station_display.css +++ b/static/css/alliance_station_display.css @@ -116,17 +116,17 @@ body[data-position=right] #inMatch #blueScore { /* Pre Match */ #preMatch #teamNumber { position: absolute; - top: 40px; + top: 100px; left: 0; right: 0; margin: 0 auto; - font-size: 500px; - line-height: 500px; + font-size: 550px; + line-height: 550px; text-align: center; } #preMatch .databar { position: absolute; - bottom: 0; + bottom: 100px; left: 0; right: 0; margin: 0 auto; @@ -159,3 +159,13 @@ body[data-position=right] #inMatch #blueScore { #teamRank { background-color: transparent; } +#elimAllianceInfo { + position: absolute; + bottom: 20px; + left: 0; + right: 0; + margin: 0 auto; + text-align: center; + font-family: "FuturaLT"; + font-size: 50px; +} \ No newline at end of file diff --git a/static/js/alliance_station_display.js b/static/js/alliance_station_display.js index c6244ce..894d1ad 100644 --- a/static/js/alliance_station_display.js +++ b/static/js/alliance_station_display.js @@ -54,6 +54,23 @@ var handleMatchLoad = function(data) { $("#teamNameText").attr("data-alliance-bg", station[0]).text(""); $("#teamRank").attr("data-alliance-bg", station[0]).text(""); } + + // Populate extra alliance info if this is an elimination match. + let elimAlliance = data.Match.ElimRedAlliance; + let offFieldTeams = data.RedOffFieldTeams; + if (station[0] === "B") { + elimAlliance = data.Match.ElimBlueAlliance; + offFieldTeams = data.BlueOffFieldTeams; + } + if (elimAlliance > 0) { + let elimAllianceInfo = `Alliance ${elimAlliance}`; + if (offFieldTeams.length) { + elimAllianceInfo += ` Not on field: ${offFieldTeams.map(team => team.Id).join(", ")}`; + } + $("#elimAllianceInfo").html(elimAllianceInfo); + } else { + $("#elimAllianceInfo").text(""); + } } }; diff --git a/templates/alliance_station_display.html b/templates/alliance_station_display.html index 0128874..3026890 100644 --- a/templates/alliance_station_display.html +++ b/templates/alliance_station_display.html @@ -17,10 +17,11 @@