summaryrefslogtreecommitdiff
path: root/templates/server_html.jinja
blob: 970230031e754b9ad49d7a51f1e3ebf16ee5c31b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<html>
  <head>
    <title>Serverinfo</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="stylesheet" type="text/css" href="static/style.css" />
    <link rel="icon" type="image/png" href="static/favicon.png" />
    <script src="static/misc.js"></script>
  </head>
  <body>

  <ul id="menu">
    <li class="menu"><a href="javascript:location.reload();" class="joinbutton">Refresh</a></li>
    <li class="menu app"><a class="joinbutton" href="premadefinder">Premadefinder</a></li>
    <li class="menu app"><a class="joinbutton" href="lobby">Lobbylinkfinder</a></li>
  </ul>

    {% for name, info in servers.items() %}
      <div class="server {% if info['data'] %}ingame{% else %}busy{%endif%}">
        <div class="serverheader">
          <a class="servername" href="steam://connect/{{ info['ip'] }}:{{ info['port'] }}">{{ name }}</a>
        </div>
        {% if info['data'] %}
          <div class="serverdata">
            <a href="steam://connect/{{ info['ip'] }}:{{ info['port'] }}">
              <img src="http://cdn.akamai.steamstatic.com/steam/apps/{{ info['data']['gameid'] }}/header.jpg" class="gameimage" />
            </a>
            <ul class="server">
              <li class="servermap">{{ info['data']['map'] }}</li>
              <li class="playerinfo">{{ info['data']['players'] }} / {{ info['data']['playersmax'] }}</li>
            </ul>
            {% if info['update']['success'] %}
              <span class="updatemessage">{{ info['update']['message'] }}</span>
            {% endif %}

            {% if info['data']['players'] %}
            <table class="playerlist">
              <tr>
                <th width="50%">Name</th>
                <th width="20%">Score</th>
                <th width="30%">Time</th>
              </tr>
              {% for player in info['data']['player_info'] | sort(attribute='score', reverse=True) %}
                <tr>
                  <td class="name">{{ player['name'] }}</td>
                  <td>{{ player['score'] }}</td>
                  <td>{{ display_time(player['duration']) }}</td>
                </tr>
              {% endfor %}
            </table>
            {% endif %}

          </div>

        {% else %}
          This server did not respond in time.
        {% endif %}
      </div>
    {% endfor %}

  </body>
</html>

<!-- vim: commentstring={#\ %s\ #}