From 6ab34326e7550bda4f6cb76797f3bea8908cad59 Mon Sep 17 00:00:00 2001 From: Nicolas Braud-Santoni Date: Tue, 30 Aug 2016 11:52:38 +0200 Subject: [PATCH] Retrait du JS inline de la page Services --- Services.mdwn | 42 ++--------------------------------------- assets/services-pie.js | 20 ++++++++++++++++++++ assets/services-plot.js | 15 +++++++++++++++ 3 files changed, 37 insertions(+), 40 deletions(-) create mode 100644 assets/services-pie.js create mode 100644 assets/services-plot.js diff --git a/Services.mdwn b/Services.mdwn index 08fe2b2..a0d36a6 100644 --- a/Services.mdwn +++ b/Services.mdwn @@ -8,29 +8,7 @@ [[!meta script="assets/pie_graphs"]] [[!meta title="Services"]] - + Relais ====== @@ -111,20 +89,4 @@ Nos oignons fait actuellement fonctionner les relais Tor suivants : - + diff --git a/assets/services-pie.js b/assets/services-pie.js new file mode 100644 index 0000000..8cf5b84 --- /dev/null +++ b/assets/services-pie.js @@ -0,0 +1,20 @@ +var content = d3.select("#content"); +var consensus_figure = content.append("figure") + .attr('class', 'graph graph-consensus') +consensus_figure.append("span") + .attr("id", "consensus-pie"); +consensus_figure.append("figcaption") + .text(L10n.consensus_weight); + +var exit_figure = content.append("figure") + .attr('class', 'graph graph-exit') +exit_figure.append("span") + .attr("id", "exit-pie"); +exit_figure.append("figcaption") + .text(L10n.exit_probability); + +content.append("div") + .style("clear", "left"); + +new ConsensusPieDrawer("#consensus-pie").draw(); +new ExitPieDrawer("#exit-pie").draw(); diff --git a/assets/services-plot.js b/assets/services-plot.js new file mode 100644 index 0000000..7c76c2d --- /dev/null +++ b/assets/services-plot.js @@ -0,0 +1,15 @@ +d3.select("#content").append("h1") + .text(L10n.bandwidth); +d3.select("#content").append("div") + .attr("id", "bandwidth") + .text(L10n.loading); + +new BwDrawer("#bandwidth").draw(); + +d3.select("#content").append("h1") + .text(L10n.weights); +d3.select("#content").append("div") + .attr("id", "weights") + .text(L10n.loading); + +new WeightsDrawer("#weights").draw(); -- 2.39.5