roulette/templates/home.html

62 lines
1.4 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
2018-01-18 17:39:24 +00:00
<div class="desc">Toi aussi abuse des pouvoirs du Rézo avec les Metzthernets !</div>
2017-01-30 00:42:20 +00:00
2018-01-18 17:39:24 +00:00
<a href="{{url_for('play')}}">
<div id="play" class="center">
JOUER
</div>
</a>
<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] }} ],
backgroundColor: ['#ffd7d7', '#d7ebff']
}],
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>
{% endblock %}