diff options
Diffstat (limited to 'tor-metrics/templates/country.html')
-rw-r--r-- | tor-metrics/templates/country.html | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/tor-metrics/templates/country.html b/tor-metrics/templates/country.html index 8dcb40d..d7b3395 100644 --- a/tor-metrics/templates/country.html +++ b/tor-metrics/templates/country.html @@ -1,9 +1,11 @@ {% extends "relay-list.html" %} -{% if relays[0]['country_name'] in special_countries %} - {% set country_name = 'The ' + relays[0]['country_name']|escape %} +{% set country_orig = relays.json['relay_subset'][0]['country_name']|escape %} +{% set country_abbr = relays.json['relay_subset'][0]['country']|escape %} +{% if country_orig in special_countries %} + {% set country_name = 'The ' + country_orig %} {% else %} - {% set country_name = relays[0]['country_name']|escape %} + {% set country_name = country_orig %} {% endif %} -{% block title %}Tor Relays :: {{ relays[0]['country_name']|escape }}{% endblock %} -{% block header %}<a href="../../">Home</a> :: {{ relays[0]['country_name']|escape }}{% endblock %} -{% block description %}{{ country_name }} ({{ relays[0]['country']|escape }}) is responsible for ~{{ bandwidth }} MB/s of traffic.{% endblock %} +{% block title %}Tor Relays :: {{ country_orig }}{% endblock %} +{% block header %}<a href="../../">Home</a> :: {{ country_name }}{% endblock %} +{% block description %}{{ country_name }} ({{ country_abbr }}) is responsible for ~{{ bandwidth }} MB/s of traffic.{% endblock %} |