Drop the open-by-default on the first three countries (every <details> starts collapsed) and order the country sections alphabetically instead of by largest city's population.
23 lines
1.1 KiB
Django/Jinja
23 lines
1.1 KiB
Django/Jinja
{% extends "base.html.j2" %}
|
||
{% block title %}{{ page_title }}{% endblock %}
|
||
{% block description %}{{ page_description }}{% endblock %}
|
||
{% block canonical_path %}{{ canonical_path }}{% endblock %}
|
||
{% block content %}
|
||
<nav class="breadcrumb" aria-label="Breadcrumb">
|
||
{% for label, href in breadcrumb %}{% if href %}<a href="{{ href }}">{{ label }}</a>{% else %}<span>{{ label }}</span>{% endif %}{% if not loop.last %} <span class="sep">›</span> {% endif %}{% endfor %}
|
||
</nav>
|
||
<article class="climate-page">
|
||
<h1>City climates</h1>
|
||
<p class="lede">Average temperatures by month, all-time records, and how today compares — for
|
||
{{ n_cities }} cities across {{ n_countries }} countries. Every day is graded against that
|
||
location's own ~45 years of climate history.</p>
|
||
{% for country, cs in groups.items() %}
|
||
<details class="hub-country">
|
||
<summary>{{ country }} <span class="hub-count">{{ cs | length }}</span></summary>
|
||
<ul class="city-links">
|
||
{% for c in cs %}<li><a href="{{ base }}/climate/{{ c.slug }}">{{ c.name }}</a></li>{% endfor %}
|
||
</ul>
|
||
</details>
|
||
{% endfor %}
|
||
</article>
|
||
{% endblock %}
|