Fibinger Ádám
2020-06-04 ffa7c6f5c007dfc826aef0ca27d23bb69bbeed7e
commit | author | age
c5946f 1 {% extends "overlays/html-base.twig" %}
2 {% block head %}
3     {{ parent() }}
4     <link rel="stylesheet" href="/assets/operators-color.css">
cffd2c 5     {% if autorefresh %}
6         <meta http-equiv="refresh" content="{{ autorefresh }}">
7     {% endif %}
c5946f 8 {% endblock %}
9 {% block body %}
10     {% block stripe %}
11         <div id="stripe" class="{{ stripe.stripe.class }}">
12             {% block info_left %}
13                 <span class="info left">
14                 {% if stripe.cup.number %}
15                     <img src="/assets/hun.png" class="flag hun">
16                 {% endif %}
906fcf 17                 <span class="text rotate">
c5946f 18                     {% if stripe.cup.number %}
906fcf 19                         <em class="number">{{ stripe.cup.number }}</em>
c5946f 20                     {% endif %}
906fcf 21                     <em class="name">{{ stripe.cup.name -}}</em>
c5946f 22                 </span>
23             </span>
24             {% endblock %}
25             {% block team_blue %}
26                 {% if stripe.team.blue and stripe.stripe.class in ['team-ban', 'team'] %}
27                     <span class="team blue">
28                     <span class="name">{{ stripe.team.blue.name }}</span>
29                 </span>
30                     {% if stripe.stripe.class == 'team-ban' %}
31                         <span class="ban blue">
32                 {% for op in stripe.team.blue.ban %}
33                     <span class="operator {{ op }}">
34                         <span class="prohibit">x</span>
35                     </span>
36                 {% endfor %}
37                 </span>
38                     {% endif %}
39                 {% endif %}
40             {% endblock %}
41             {% block logo %}
ffa7c6 42
43                     <div class="mapwin left one {{ stripe.team.blue.score[0] ? "checked" }}"></div>
44                     <div class="mapwin right one {{ stripe.team.orange.score[0] ? "checked" }}"></div>
45
46                 {% if stripe.cup.bestof > 1 %}
47                     <div class="mapwin left two {{ stripe.team.blue.score[1] ? "checked" }}"></div>
48                     <div class="mapwin right two {{ stripe.team.orange.score[1] ? "checked" }}"></div>
b15810 49                 {% endif %}
ffa7c6 50                 {% if stripe.cup.bestof > 3 %}
51                     <div class="mapwin left three {{ stripe.team.blue.score[2] ? "checked" }}"></div>
52                     <div class="mapwin right three {{ stripe.team.orange.score[2] ? "checked" }}"></div>
b15810 53                 {% endif %}
ffa7c6 54
c5946f 55             {% endblock %}
56             {% block team_orange %}
57                 {% if stripe.team.orange and stripe.stripe.class in ['team-ban', 'team'] %}
58                     <span class="team orange">
59                     <span class="name">{{ stripe.team.orange.name }}</span>
60                 </span>
61
62                     {% if stripe.stripe.class == 'team-ban' %}
63                         <span class="ban orange">
64                         {% for op in stripe.team.orange.ban %}
65                             <span class="operator {{ op }}">
66                                 <span class="prohibit">x</span>
67                             </span>
68                         {% endfor %}
69                     </span>
70                     {% endif %}
71                 {% endif %}
72             {% endblock %}
73
74             {% block info_right %}
39aea3 75                 <span class="info right">
76                 {% if stripe.cup.number %}
f84f9c 77                     <img class="wargasz-logo" src="/assets/WARGASZ_color.png"/>
f6a0dc 78                 {% endif %}
c5946f 79             </span>
80             {% endblock %}
81         </div>
82     {% endblock %}
39aea3 83     <script type="text/javascript">
84         // Create WebSocket connection.
85         const socket = new WebSocket('ws://esl.unr.hu/generator/ws-com/');
86         // Connection opened
87         socket.addEventListener('open', function (event) {
88             console.log("Sending server: " + "Hello Bitch!");
89             socket.send('Hello Bitch!');
90         });
91
92         // Listen for messages
93         socket.addEventListener('message', function (event) {
94             console.log('Message from server ', event.data);
95             if (event.data === "update") {
96                 location.reload();
97             }
98         });
99     </script>
c5946f 100 {% endblock %}