Show new badge next to new countries on travel stats page.
This commit is contained in:
parent
340905ecff
commit
2f574264e5
|
@ -27,7 +27,12 @@
|
|||
<div>Conferences in {{ year }}: {{ year_stats.conferences }}</div>
|
||||
<div>{{ countries | count }} countries visited in {{ year }}:
|
||||
{% for c in countries %}
|
||||
<span class="text-nowrap">{{ c.flag }} {{ c.name }}</span>
|
||||
<span class="text-nowrap border border-2 px-2 my-3 mx-1">
|
||||
{{ c.flag }} {{ c.name }} ({{ c.alpha_2 }})
|
||||
{% if c.alpha_2 not in previously_visited %}
|
||||
<span class="badge text-bg-info">new</span>
|
||||
{% endif %}
|
||||
</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div>
|
||||
|
|
|
@ -580,6 +580,7 @@ def trip_stats() -> str:
|
|||
distances_by_transport_type=sum_distances_by_transport_type(trip_list),
|
||||
yearly_stats=yearly_stats,
|
||||
conferences=conferences,
|
||||
previously_visited=app.config.get("PREVIOUSLY_VISITED", set),
|
||||
)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue