aboutsummaryrefslogtreecommitdiffstats
path: root/templates/template.html.j2
diff options
context:
space:
mode:
authorjwansek <eddie.atten.ea29@gmail.com>2023-05-11 18:54:10 +0100
committerjwansek <eddie.atten.ea29@gmail.com>2023-05-11 18:54:10 +0100
commit469de094098c5cf149b9aeab9c2a7d23aa22c11d (patch)
treebe9bd0e6c1a4bbfcc9fe878420dd7569deec0f77 /templates/template.html.j2
parentb0f2c84d0ab4112040a4db49541eab504d1ec2c0 (diff)
downloadUKGenderPayGap-469de094098c5cf149b9aeab9c2a7d23aa22c11d.tar.gz
UKGenderPayGap-469de094098c5cf149b9aeab9c2a7d23aa22c11d.zip
Finished filtering of new visualisation, started work on map char
Diffstat (limited to 'templates/template.html.j2')
-rw-r--r--templates/template.html.j244
1 files changed, 29 insertions, 15 deletions
diff --git a/templates/template.html.j2 b/templates/template.html.j2
index b50f721..164caa8 100644
--- a/templates/template.html.j2
+++ b/templates/template.html.j2
@@ -26,7 +26,7 @@
<body>
<header>
<a href="/"><h1>{{ title }}</h1></a>
- <p>Data provided by the <a href="https://gender-pay-gap.service.gov.uk/">UK Government</a></p>
+ <p>Data provided by the <a href="https://gender-pay-gap.service.gov.uk/">UK Government</a> and the <a href="https://www.ons.gov.uk/aboutus/transparencyandgovernance/freedomofinformationfoi/ukpostcodestownsandcounties">Office for National Statistics</a></p>
</header>
<aside>
@@ -45,24 +45,38 @@
</a>
<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">
+ {% if "yearslider" in filter_content.keys() %}
+ {% if "year" in current_filters.keys() %}
+ <p id="slider_val">Year range: {{ current_filters["year"] }}</p>
+ <input type="range" min="1" max="{{ len(filter_content['yearslider']) }}" value="{{ filter_content['yearslider'].index(current_filters['year']) + 1 }}" name="yearslider" id="yearslider"><br>
+ <input type="checkbox" id="allyears" name="allyears" value="allyears">
+ <label for="allyears">All years</label><br>
+ {% else %}
+ <p id="slider_val">Year range: {{ filter_content['yearslider'][0] }}</p>
+ <input type="range" min="1" max="{{ len(filter_content['yearslider']) }}" value="1" name="yearslider" id="yearslider"><br>
+ <input type="checkbox" id="allyears" name="allyears" value="allyears" checked="checked">
+ <label for="allyears">All years</label><br>
+ {% endif %}
+ {% else %}
+ {% 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 %}
- {% else %}
- <input type="radio" id="{{ option }}" name="{{ filter_name }}" value = "{{ option }}">
+ <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 %}
- <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 %}
<input type="submit" value="Apply" id="apply_btn">