From ffa7c6f5c007dfc826aef0ca27d23bb69bbeed7e Mon Sep 17 00:00:00 2001 From: Fibinger Ádám <adam.fibinger@wup.hu> Date: Thu, 04 Jun 2020 23:10:08 +0200 Subject: [PATCH] BO pöttyök + BestOf kupa típus --- templates/overlays/stripe.twig | 42 ++++++++++++++++++++++++++++++------------ 1 files changed, 30 insertions(+), 12 deletions(-) diff --git a/templates/overlays/stripe.twig b/templates/overlays/stripe.twig index 95004f2..d505fe5 100644 --- a/templates/overlays/stripe.twig +++ b/templates/overlays/stripe.twig @@ -39,18 +39,19 @@ {% endif %} {% endblock %} {% block logo %} - {% if stripe.team.blue.score[0] == true %} - <div class="mapwin left one"></div> + + <div class="mapwin left one {{ stripe.team.blue.score[0] ? "checked" }}"></div> + <div class="mapwin right one {{ stripe.team.orange.score[0] ? "checked" }}"></div> + + {% if stripe.cup.bestof > 1 %} + <div class="mapwin left two {{ stripe.team.blue.score[1] ? "checked" }}"></div> + <div class="mapwin right two {{ stripe.team.orange.score[1] ? "checked" }}"></div> {% endif %} - {% if stripe.team.blue.score[1] == true %} - <div class="mapwin left two"></div> + {% if stripe.cup.bestof > 3 %} + <div class="mapwin left three {{ stripe.team.blue.score[2] ? "checked" }}"></div> + <div class="mapwin right three {{ stripe.team.orange.score[2] ? "checked" }}"></div> {% endif %} - {% if stripe.team.orange.score[0] == true %} - <div class="mapwin right one"></div> - {% endif %} - {% if stripe.team.orange.score[1] == true %} - <div class="mapwin right two"></div> - {% endif %} + {% endblock %} {% block team_orange %} {% if stripe.team.orange and stripe.stripe.class in ['team-ban', 'team'] %} @@ -71,12 +72,29 @@ {% endblock %} {% block info_right %} - <span class="info right"> - {% if stripe.cup.number%} + <span class="info right"> + {% if stripe.cup.number %} <img class="wargasz-logo" src="/assets/WARGASZ_color.png"/> {% endif %} </span> {% endblock %} </div> {% endblock %} + <script type="text/javascript"> + // Create WebSocket connection. + const socket = new WebSocket('ws://esl.unr.hu/generator/ws-com/'); + // Connection opened + socket.addEventListener('open', function (event) { + console.log("Sending server: " + "Hello Bitch!"); + socket.send('Hello Bitch!'); + }); + + // Listen for messages + socket.addEventListener('message', function (event) { + console.log('Message from server ', event.data); + if (event.data === "update") { + location.reload(); + } + }); + </script> {% endblock %} \ No newline at end of file -- Gitblit v1.8.0