{{/*
  Copyright 2014 Team 254. All Rights Reserved.
  Author: pat@patfairbank.com (Patrick Fairbank)

  Display shown on the audience screen overlayed over the video.
*/}}
<!DOCTYPE html>
<html>
  <head>
    <title>Audience Display - {{.EventSettings.Name}} - Cheesy Arena </title>
    <link rel="shortcut icon" href="/static/img/favicon.ico">
    <link rel="stylesheet" href="/static/css/lib/bootstrap.min.css" />
    <link rel="stylesheet" href="/static/css/cheesy-arena.css" />
    <link rel="stylesheet" href="/static/css/audience_display.css" />
  </head>
  <body style="background-color: {{.EventSettings.DisplayBackgroundColor}};">
    <div id="centering">
      <div id="matchOverlay">
        <div class="teams" id="redTeams">
          <span class="valign-cell">
            <span id="redTeam1"></span><br />
            <span id="redTeam2"></span><br />
            <span id="redTeam3"></span>
          </span>
        </div>
        <div class="score" id="redScore">
          <div class="score-fields score-fields-icons">
            <span class="valign-cell">
              <img class="score-icon" src="/static/img/pressure.svg" /><br />
              <img class="score-icon" src="/static/img/rotor.svg" /><br />
              <img class="score-icon" src="/static/img/takeoff.svg" />
            </span>
          </div>
          <div class="score-fields score-fields-text">
            <span class="valign-cell">
              <span id="redPressurePoints"></span><br />
              <span id="redRotors"></span><br />
              <span id="redTakeoffs"></span>
            </span>
          </div>
          <div class="score-number" id="redScoreNumber">&nbsp;</div>
        </div>
        <div class="score" id="blueScore">
          <div class="score-fields score-fields-icons pull-right">
            <span class="valign-cell">
              <img class="score-icon score-icon-right" src="/static/img/pressure.svg" /><br />
              <img class="score-icon score-icon-right" src="/static/img/rotor.svg" /><br />
              <img class="score-icon score-icon-right" src="/static/img/takeoff.svg" />
            </span>
          </div>
          <div class="score-fields score-fields-text pull-right" style="direction: rtl;">
            <span class="valign-cell" style="text-align: right;">
              <span id="bluePressurePoints"></span><br />
              <span id="blueRotors"></span><br />
              <span id="blueTakeoffs"></span>
            </span>
          </div>
          <div class="score-number pull-right" id="blueScoreNumber">&nbsp;</div>
        </div>
        <div class="teams" id="blueTeams">
          <span class="valign-cell">
            <span id="blueTeam1"></span><br />
            <span id="blueTeam2"></span><br />
            <span id="blueTeam3"></span>
          </span>
        </div>
        <div id="eventMatchInfo">
          <span>{{.EventSettings.Name}} 2017</span>
          <span class="pull-right" id="matchName"></span>
        </div>
      </div>
      <div class="text-center" id="matchCircle">
        <img id="logo" src="/static/img/game-logo.png" alt="logo" />
        <div id="matchTime"></div>
      </div>
    </div>
    <div id="blindsContainer">
      <div class="blinds right background">
        <div class="blindsCenter blank"></div>
      </div>
      <div class="blinds left background">
        <div class="blindsCenter blank"></div>
      </div>
      <div class="blindsCenter full">
        <img id="blindsLogo" src="/static/img/game-logo.png" alt="logo" />
      </div>
      <div id="finalScore">
        <div class="final-score" id="redFinalScore"></div>
        <div class="final-score" id="blueFinalScore"></div>
        <div class="final-teams" id="redFinalTeams">
          <span id="redFinalTeam1"></span>
          <span id="redFinalTeam2"></span>
          <span id="redFinalTeam3"></span>
        </div>
        <div class="final-teams" id="blueFinalTeams">
          <span id="blueFinalTeam1"></span>
          <span id="blueFinalTeam2"></span>
          <span id="blueFinalTeam3"></span>
        </div>
        <div class="final-breakdown" id="redFinalBreakdown">
          <span class="valign-cell">
            <span id="redFinalAutoMobilityPoints"></span><br />
            <span id="redFinalPressurePoints"></span><br />
            <span id="redFinalRotorPoints"></span><br />
            <span id="redFinalTakeoffPoints"></span><br />
            <span id="redFinalFoulPoints"></span><br />
            <span id="redFinalPressureGoalReached"></span><br />
            <span id="redFinalRotorGoalReached"></span><br />
          </span>
        </div>
        <div class="final-breakdown" id="centerFinalBreakdown">
          <span class="valign-cell">Auto Mobility<br />Pressure<br />Rotor<br />Ready for Takeoff<br />Foul<br />Pressure Bonus<br />Rotor Bonus</span>
        </div>
        <div class="final-breakdown" id="blueFinalBreakdown">
          <span class="valign-cell">
            <span id="blueFinalAutoMobilityPoints"></span><br />
            <span id="blueFinalPressurePoints"></span><br />
            <span id="blueFinalRotorPoints"></span><br />
            <span id="blueFinalTakeoffPoints"></span><br />
            <span id="blueFinalFoulPoints"></span><br />
            <span id="blueFinalPressureGoalReached"></span><br />
            <span id="blueFinalRotorGoalReached"></span><br />
          </span>
        </div>
        <div id="finalEventMatchInfo">
          <span>{{.EventSettings.Name}} 2017</span>
          <span class="pull-right" id="finalMatchName"></span>
        </div>
      </div>
      <div id="sponsor" class="carousel slide">
        <div class="carousel-inner" id="sponsorContainer">
        </div>
      </div>
    </div>
    <div id="allianceSelectionCentering" style="display: none;">
      <div id="allianceSelection"></div>
    </div>
    <div id="lowerThird">
      <img id="lowerThirdLogo" src="/static/img/lower-third-logo.png" alt="logo" />
      <div id="lowerThirdTop"></div>
      <div id="lowerThirdBottom"></div>
      <div id="lowerThirdSingle"></div>
    </div>
    <script id="allianceSelectionTemplate" type="text/x-handlebars-template">
      <table id="allianceSelectionTable">
        <tr>
          <td colspan="{{"{{numColumns}}"}}">
            <img src="/static/img/alliance-selection-logo.png" alt="logo" />
          </td>
        </tr>
        {{"{{#each alliances}}"}}
          <tr>
            <td class="alliance-cell">{{"{{Index}}"}}</td>
            {{"{{#each this}}"}}
              <td class="selection-cell">{{"{{#if TeamId}}"}}{{"{{TeamId}}"}}{{"{{/if}}"}}</td>
            {{"{{/each}}"}}
          </tr>
        {{"{{/each}}"}}
      </table>
    </script>
    <audio id="match-warmup" src="/static/audio/match_warmup.wav" preload="auto"></audio>
    <audio id="match-start" src="/static/audio/match_start.wav" preload="auto"></audio>
    <audio id="match-end" src="/static/audio/match_end.wav" preload="auto"></audio>
    <audio id="match-abort" src="/static/audio/match_abort.mp3" preload="auto"></audio>
    <audio id="match-resume" src="/static/audio/match_resume.wav" preload="auto"></audio>
    <audio id="match-endgame" src="/static/audio/match_endgame.wav" preload="auto"></audio>
    <script src="/static/js/lib/jquery.min.js"></script>
    <script src="/static/js/lib/jquery.json-2.4.min.js"></script>
    <script src="/static/js/lib/jquery.websocket-0.0.1.js"></script>
    <script src="/static/js/lib/jquery.transit.min.js"></script>
    <script src="/static/js/lib/handlebars-1.3.0.js"></script>
    <script src="/static/js/lib/bootstrap.min.js"></script>
    <script src="/static/js/cheesy-websocket.js"></script>
    <script src="/static/js/match_timing.js"></script>
    <script src="/static/js/audience_display.js"></script>
  </body>
</html>
