Add new country count display to trip statistics
Show the number of new countries visited each year in parentheses next to the total country count. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
d65981ef7e
commit
af49dac232
|
|
@ -26,6 +26,15 @@
|
||||||
<div>Trips in {{ year }}: {{ year_stats.count }}</div>
|
<div>Trips in {{ year }}: {{ year_stats.count }}</div>
|
||||||
<div>Conferences in {{ year }}: {{ year_stats.conferences }}</div>
|
<div>Conferences in {{ year }}: {{ year_stats.conferences }}</div>
|
||||||
<div>{{ countries | count }} countries visited in {{ year }}:
|
<div>{{ countries | count }} countries visited in {{ year }}:
|
||||||
|
{% set new_countries = [] %}
|
||||||
|
{% for c in countries %}
|
||||||
|
{% if c.alpha_2 not in previously_visited %}
|
||||||
|
{% set _ = new_countries.append(c) %}
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
{% if new_countries %}
|
||||||
|
({{ new_countries | count }} new)
|
||||||
|
{% endif %}
|
||||||
{% for c in countries %}
|
{% for c in countries %}
|
||||||
<span class="text-nowrap border border-2 px-2 my-3 mx-1">
|
<span class="text-nowrap border border-2 px-2 my-3 mx-1">
|
||||||
{{ c.flag }} {{ c.name }} ({{ c.alpha_2 }})
|
{{ c.flag }} {{ c.name }} ({{ c.alpha_2 }})
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue