Ajout du JS dans chaque template pour qu'il

soit rendu
This commit is contained in:
guimoz 2017-01-30 08:47:32 +01:00
parent 1c0e396568
commit 9417a8efa6
9 changed files with 262 additions and 135 deletions

View file

@ -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}: <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 %}

View file

@ -18,5 +18,49 @@
<p>
Rien pour l'instant
</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>
{% endif %}
{% endblock %}

View file

@ -19,5 +19,49 @@
Rien pour l'instant
</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>
{% endif %}
{% endblock %}

View file

@ -43,50 +43,5 @@
<div id="container" style="min-width: 310px; max-width: 600px; margin: 0 auto; height: auto"></div>
</div>
</div>
<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>
</body>
</html>

View file

@ -44,50 +44,5 @@
<div id="container" style="min-width: 310px; max-width: 600px; margin: 0 auto"></div>
</div>
</div>
<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>
</body>
</html>

View file

@ -40,50 +40,5 @@
<div id="container" style="min-width: 310px; max-width: 600px; margin: 0 auto"></div>
</div>
</div>
<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>
</body>
</html>

View file

@ -6,4 +6,48 @@
envoyer un email au contact technique.
(Vous ne pouvez pas jouer depuis Supélec)
</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 %}

View file

@ -19,4 +19,48 @@
<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 %}

View file

@ -4,4 +4,48 @@
<p>
Reviens plus tard {{ user['firstname']+' '+user['name'] }} pour jouer à la rezo-roulette
</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 %}