aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRahiel Kasim <rahielkasim@gmail.com>2018-10-25 14:47:47 +0200
committerRahiel Kasim <rahielkasim@gmail.com>2018-10-25 14:47:47 +0200
commitcd4ab46cef03c4628d1cd2a13283cdbf2d59be0c (patch)
tree61b39551e5adb5f51486a936a689456ae364a157
parentee17832772bfd900585710265526877b73655f14 (diff)
website: commit forgotten top.{html,ts}
-rw-r--r--hortiradar/website/templates/top.html32
-rw-r--r--hortiradar/website/top.ts7
2 files changed, 39 insertions, 0 deletions
diff --git a/hortiradar/website/templates/top.html b/hortiradar/website/templates/top.html
new file mode 100644
index 0000000..3e99a0b
--- /dev/null
+++ b/hortiradar/website/templates/top.html
@@ -0,0 +1,32 @@
+{% extends "base.html" %}
+{% set active_page = "horti.top" %}
+{% block content %}
+
+{% from "_helpers.html" import render_button %}
+
+<div class="row">
+ <div class="col-md-8">
+ <p>
+ Hieronder de top {{ max_amount }} meest besproken trefwoorden op Twitter in de groep <a href="{{ url_for("horti.view_group", group=group) }}">{{ disp_group }}</a> van {{ start }} tot {{ end }}.
+ </p>
+ </div>
+ <div class="col-md-4 text-right">
+ {{ render_button("horti.top", {"group": group}, period, "day", "Dag") }}
+ {{ render_button("horti.top", {"group": group}, period, "week", "Week") }}
+ {{ render_button("horti.top", {"group": group}, period, "month", "Maand") }}
+ </div>
+</div>
+
+<br>
+
+<div id="chartContainer" style="height: 300px; width: 100%;"></div>
+<br>
+<br>
+
+<script type="text/javascript">
+ var data = {{ data|safe }};
+ var max_amount = "{{ max_amount|safe }}";
+ var group = "{{ group|safe }}";
+</script>
+<script src="{{ url_for("horti.static", filename="top.js") }}"></script>
+{% endblock %}
diff --git a/hortiradar/website/top.ts b/hortiradar/website/top.ts
new file mode 100644
index 0000000..5417cf1
--- /dev/null
+++ b/hortiradar/website/top.ts
@@ -0,0 +1,7 @@
+import { renderChart } from "./home";
+
+
+declare const data: any;
+declare const max_amount, group: string;
+
+renderChart(data, "chartContainer", `Top ${max_amount} ${group}`);