From: Nicolas Braud-Santoni Date: Tue, 30 Aug 2016 09:52:38 +0000 (+0200) Subject: Retrait du JS inline de la page Services X-Git-Url: https://nos-oignons.net/gitweb/website.git/commitdiff_plain/6ab34326e7550bda4f6cb76797f3bea8908cad59 Retrait du JS inline de la page Services --- 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();