aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/plot.html.j28
-rw-r--r--templates/template.html.j234
2 files changed, 41 insertions, 1 deletions
diff --git a/templates/plot.html.j2 b/templates/plot.html.j2
new file mode 100644
index 0000000..91a3a36
--- /dev/null
+++ b/templates/plot.html.j2
@@ -0,0 +1,8 @@
+{% extends "template.html.j2" %}
+{% block content %}
+ <div id="singlechart">
+ <div class="chart" id="/chart{{ elem['url'] }}">
+ </div>
+ <p id=chart_alt>{{ alt }}</p>
+ </div>
+{% endblock %} \ No newline at end of file
diff --git a/templates/template.html.j2 b/templates/template.html.j2
index 4c08853..72cf520 100644
--- a/templates/template.html.j2
+++ b/templates/template.html.j2
@@ -34,7 +34,39 @@
<input type="search" id="search_entry" name="search" required>
<input type="submit" value="Search" id="search_btn">
</form>
- <h4>Filter...</h4>
+ {% if filters is defined %}
+ <h4>Filters</h4>
+ <form id="filterform">
+ {% for filter_name, filter_content in filters.items() %}
+ <h5>{{ filter_name }}</h5>
+ {% if len(filter_content["options"]) > 5 %}
+ <button class="collapsetoggle" id="collapsetoggle/{{ filter_name }}" onclick="collapseTogglePress('collapsable/{{ filter_name }}')">
+ {{ "Un-hide %d hidden filters" % len(filter_content["options"]) }}
+ </button>
+ <div class="collapsable" id="collapsable/{{ filter_name }}">
+ {% endif %}
+ {% for option in filter_content["options"] %}
+ {% if filter_name in current_filters.keys() %}
+ {% if current_filters[filter_name] == option %}
+ <input type="radio" id="{{ option }}" name="{{ filter_name }}" value = "{{ option }}" checked="checked">
+ {% else %}
+ <input type="radio" id="{{ option }}" name="{{ filter_name }}" value = "{{ option }}">
+ {% endif %}
+ {% else %}
+ <input type="radio" id="{{ option }}" name="{{ filter_name }}" value = "{{ option }}">
+ {% endif %}
+ <label for="{{ option }}">{{ option }}</label><br>
+ {% endfor %}
+ {% if len(filter_content["default"]) < 2 %}
+ <input type="radio" id="No filter" name="{{ filter_name }}" value = "No filter">
+ <label for="No filter">No filter</label><br>
+ {% endif %}
+ {% if len(filter_content["options"]) > 5 %}
+ </div>
+ {% endif %}
+ {% endfor %}
+ </form>
+ {% endif %}
</aside>
<div id="main_content">