From 9417a8efa663e1e51c4ca685c982e6ded0c9c989 Mon Sep 17 00:00:00 2001
From: guimoz
Date: Mon, 30 Jan 2017 08:47:32 +0100
Subject: [PATCH] Ajout du JS dans chaque template pour qu'il soit rendu
---
templates/banned.html | 42 +++++++++++++++++++++++++++++
templates/down.html | 44 ++++++++++++++++++++++++++++++
templates/home.html | 44 ++++++++++++++++++++++++++++++
templates/layout.html | 45 -------------------------------
templates/layout_banned.html | 45 -------------------------------
templates/layout_precampagne.html | 45 -------------------------------
templates/not_subscribed.html | 44 ++++++++++++++++++++++++++++++
templates/play.html | 44 ++++++++++++++++++++++++++++++
templates/precampagne.html | 44 ++++++++++++++++++++++++++++++
9 files changed, 262 insertions(+), 135 deletions(-)
diff --git a/templates/banned.html b/templates/banned.html
index d893915..aaa348c 100644
--- a/templates/banned.html
+++ b/templates/banned.html
@@ -20,6 +20,48 @@ window.onload = function () {
display = document.querySelector('#time');
startTimer(fiveMinutes, display);
};
+$(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}: {point.percentage:.1f}%'
+ },
+ 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] }}]
+ ]
+ }]
+ });
+});
{% endblock %}
diff --git a/templates/down.html b/templates/down.html
index 4a41f65..b132287 100644
--- a/templates/down.html
+++ b/templates/down.html
@@ -18,5 +18,49 @@
Rien pour l'instant
+
{% endif %}
{% endblock %}
diff --git a/templates/home.html b/templates/home.html
index dd93226..7ba174b 100644
--- a/templates/home.html
+++ b/templates/home.html
@@ -19,5 +19,49 @@
Rien pour l'instant
+
{% endif %}
{% endblock %}
diff --git a/templates/layout.html b/templates/layout.html
index a454c5a..f335ae4 100644
--- a/templates/layout.html
+++ b/templates/layout.html
@@ -43,50 +43,5 @@
-