roulette/templates/home.html

67 lines
1.5 KiB
HTML
Raw Normal View History

2018-01-18 17:39:24 +00:00
{% extends "layout.html" %} {% block content %}
<canvas id="chart"></canvas>
2017-01-30 08:51:21 +00:00
2018-01-18 17:39:24 +00:00
<div class="sep"></div>
2017-01-26 22:32:27 +00:00
2020-01-18 13:29:44 +00:00
<div class="desc">Toi aussi abuse des pouvoirs du Rézo !</div>
2017-01-30 00:42:20 +00:00
2018-01-18 17:39:24 +00:00
<a href="{{url_for('play')}}">
2018-01-28 22:29:05 +00:00
<div id="play" class="button center">
2018-01-18 17:39:24 +00:00
JOUER
</div>
</a>
2020-01-18 13:29:44 +00:00
<a href="{{url_for('stats')}}">
<div id="play" class="button center">
Statistiques
</div>
</a>
2018-01-18 17:39:24 +00:00
<div class="sep"></div>
<div class="desc title">Historique personnel</div>
{% if bans_hist != [] %}
<ul id="history">
{% for entry in bans_hist %}
<li class="{{ entry[0] }}" class="events">
<span class="normal">{{ entry[1] }}</span>
</li>
{% endfor %}
</ul>
{% else %}
<p>
Rien pour l'instant
</p>
{% endif %}
<div class="sep"></div>
<script type="text/javascript">
$(function () {
var ctx = document.getElementById("chart").getContext('2d');
var data = {
datasets: [{
data: [ {{ stats[0] }}, {{ stats[1] }} ],
2020-01-18 13:29:44 +00:00
backgroundColor: ['#ff7979', '#686de0']
2018-01-18 17:39:24 +00:00
}],
labels: ['Tranchés', 'Vivants']
};
var options = {
cutoutPercentage: 40,
rotation: -Math.PI,
circumference: Math.PI,
legend: { labels: { fontSize: 18 }},
tooltips: { bodyFontSize: 18 }
};
var chart = new Chart(ctx, {
type: 'doughnut',
data: data,
options: options
});
});
</script>
2017-01-26 22:32:27 +00:00
{% endblock %}