- Climate hub (/climate) now uses native <details> per country — collapsible expand/shrink sections with a city count and a rotating marker (top 3 countries open by default). Links stay in the DOM, so crawling/SEO is unaffected. - Fix nested F/C parentheses in the city lede (e.g. 'July (71°F (22°C) average high)') by rephrasing so the already-parenthesized temperature isn't wrapped in another paren. - Fix the 5-column records table overlapping on mobile: give it a min-width so it scrolls inside .table-wrap on narrow screens instead of colliding.
23 lines
1.2 KiB
Django/Jinja
23 lines
1.2 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"{% if loop.index <= 3 %} open{% endif %}>
|
||
<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 %}
|