roulette/templates/play.html
2017-01-30 02:25:48 +01:00

67 lines
1.8 KiB
HTML

{% extends "layout.html" %}
{% block content %}
<h2>Trancher un joueur</h2>
<p>
Ta cible sera notifiée quelle que soit l'issue de ta tentative. Question
chance, c'est 50-50.
</p>
<form id="select" action="" method="post">
<select name="target_id">
<p><option value="none">(sélectionner un joueur)</option>
{% for player in players %}
<option value="{{ player.id }}">
{{ "%s %s" % (player.firstname, player.name) }}
</option></p>
{% endfor %}
</select>
<input type="submit" value="Tchak !" />
</form>
<p>
<a href="{{ url_for('home') }}">&laquo; retour à l'accueil</a>
</p>
<script type="text/javascript">
$(function () {
Highcharts.chart('container', {
chart: {
plotBackgroundColor: null,
plotBorderWidth: 0,
plotShadow: false
},
title: {
text: 'Etat du Rezo',
align: 'center',
verticalAlign: 'middle',
y: 40
},
tooltip: {
pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
},
plotOptions: {
pie: {
dataLabels: {
enabled: true,
distance: -50,
style: {
fontWeight: 'bold',
color: 'white'
}
},
startAngle: -90,
endAngle: 90,
center: ['50%', '75%']
},
},
series: [{
type: 'pie',
name: 'Etat du Rezo',
innerSize: '50%',
data: [
['Tranchés', {{ stats[0] }}],
['Vivants', {{ stats[1] }}]
]
}]
});
});
</script>
{% endblock %}