Skip to content

Commit

Permalink
WIP Auto timezone conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
Thor77 committed Feb 17, 2017
1 parent 5db1345 commit 43f6382
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion tsstats/templates/index.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,18 @@
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/hint.css/2.4.1/hint.min.css" integrity="sha256-7KczUWqIa/6KaIKtNfG18eilVQR4vJ4S9SSiDAplUwc=" crossorigin="anonymous">
<meta name="referrer" content="no-referrer">
<script src="https://cdn.jsdelivr.net/momentjs/2.17.1/moment.min.js" integrity="sha256-Gn7MUQono8LUxTfRA0WZzJgTua52Udm1Ifrk5421zkA=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/momentjs.timezone/0.5.11/moment-timezone.min.js" integrity="sha256-bQKm6Vad2GIsQ5ap2TI/hKKtRSglZhGfFINwoh/sQ48=" crossorigin="anonymous"></script>
<style type="text/css">
body {
padding-top: 50px;
}
</style>
<script type="text/javascript">
function convertToLocalTimezone(dateString) {
return Date(dateString).toLocaleString()
}
</script>
</head>
<body>
<div class="container-fluid">
Expand All @@ -31,7 +38,7 @@
<h1 class="page-header" onclick="window.location = '#sid{{ server.sid }}'" id="sid{{ server.sid }}">Server {{ server.sid }}</h1>
{% include 'stats.jinja2' %}
{% endfor %}
<small>Generated by <a href="https://github.com/Thor77/TeamspeakStats" rel="noopener">TeamspeakStats</a> at {{ creation_time|frmttime }}</small>
<small>Generated by <a href="https://github.com/Thor77/TeamspeakStats" rel="noopener">TeamspeakStats</a> at <div class="timestamp">{{ creation_time|frmttime }}</div></small>
</div>
</body>
</html>
2 changes: 1 addition & 1 deletion tsstats/templates/stats.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
{% set id = [headline_id, client.nick|striptags]|join('.') %}
<li id="{{ id }}" onclick="window.location = '#{{ id }}'" class="list-group-item{{ ' list-group-item-success' if client.connected else loop.cycle('" style="background-color: #eee;', '') }}">
<span class="hint--right" data-hint="{{ client.nick_history|join(', ') }}">{{ client.nick }}{{ " (" + client.identifier + ")" if debug }}</span>
<span class="badge"><div{% if not client.connected and headline == 'Onlinetime' %} class="hint--left" data-hint="{{ client.last_seen|frmttime }}"{% endif %}>{{ value }}</div></span>
<span class="badge"><div{% if not client.connected and headline == 'Onlinetime' %} class="hint--left timestamp-hint" data-hint="{{ client.last_seen|frmttime }}"{% endif %}>{{ value }}</div></span>
</li>
{% endfor %}
</ul>
Expand Down

0 comments on commit 43f6382

Please sign in to comment.