summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorAndré Glüpker <git@wgmd.de>2018-03-23 22:27:20 +0100
committerAndré Glüpker <git@wgmd.de>2018-03-23 22:27:20 +0100
commit323bbe0161d14c206f27744f0ab46f03cc0e2db1 (patch)
treeee7552179e91f63e5e8c3fad2c509a6984a021e2 /templates
parent0ea316c780569ac7740019fd9c908cf4bce2c49f (diff)
downloadsteam-323bbe0161d14c206f27744f0ab46f03cc0e2db1.tar.gz
steam-323bbe0161d14c206f27744f0ab46f03cc0e2db1.tar.bz2
steam-323bbe0161d14c206f27744f0ab46f03cc0e2db1.zip
Introduce new page with serverinfo
Diffstat (limited to 'templates')
-rw-r--r--templates/lobby_html.jinja1
-rw-r--r--templates/premades_html.jinja1
-rw-r--r--templates/server_html.jinja61
3 files changed, 63 insertions, 0 deletions
diff --git a/templates/lobby_html.jinja b/templates/lobby_html.jinja
index a9598bc..3f4fed4 100644
--- a/templates/lobby_html.jinja
+++ b/templates/lobby_html.jinja
@@ -11,6 +11,7 @@
<ul id="menu">
<li class="menu"><a class="joinbutton" href="javascript:hideOffline();" id="offlinetoggle">Hide Offline</a></li>
<li class="menu"><a href="javascript:location.reload();" class="joinbutton">Refresh</a></li>
+ <li class="menu app"><a class="joinbutton" href="server">Serverinfo</a></li>
<li class="menu app"><a class="joinbutton" href="premadefinder">Premadefinder</a></li>
</ul>
diff --git a/templates/premades_html.jinja b/templates/premades_html.jinja
index 565ef21..d08da8f 100644
--- a/templates/premades_html.jinja
+++ b/templates/premades_html.jinja
@@ -9,6 +9,7 @@
<body onload="onLoad();">
<ul id="menu">
+ <li class="menu app"><a class="joinbutton" href="server">Serverinfo</a></li>
<li class="menu app"><a class="joinbutton" href="lobby">Lobbylinkfinder</a></li>
</ul>
diff --git a/templates/server_html.jinja b/templates/server_html.jinja
new file mode 100644
index 0000000..3f918a8
--- /dev/null
+++ b/templates/server_html.jinja
@@ -0,0 +1,61 @@
+<html>
+ <head>
+ <title>CS:GO Lobbylinkfinder</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 class="joinbutton" href="javascript:hideOffline();" id="offlinetoggle">Hide Offline</a></li>
+ <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['data']['players'] %}
+ <table class="playerlist">
+ <tr>
+ <th width="60%">Name</th>
+ <th width="20%">Score</th>
+ <th width="20%">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>{{ player['duration'] }}s</td>
+ </tr>
+ {% endfor %}
+ </table>
+ {% endif %}
+
+ </div>
+
+ {% else %}
+ This server did not respond in time.
+ {% endif %}
+ </div>
+ {% endfor %}
+
+ </body>
+</html>
+
+<!-- vim: commentstring={#\ %s\ #}