Add timeline car import and CO2 trip stats
This commit is contained in:
parent
38dbb2b4e7
commit
3747e83ade
14 changed files with 1038 additions and 29 deletions
|
|
@ -369,6 +369,8 @@
|
|||
|
||||
{% elif e.element_type in ("coach", "bus", "car") %}
|
||||
{% set item = e.detail %}
|
||||
{% set display_depart = item.display_depart if item.display_depart is defined else item.depart %}
|
||||
{% set display_arrive = item.display_arrive if item.display_arrive is defined else item.arrive %}
|
||||
<div class="trip-transport-card my-1">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">
|
||||
|
|
@ -377,14 +379,14 @@
|
|||
{% if item.operator %}<small class="text-muted fw-normal">{{ item.operator }}</small>{% endif %}
|
||||
</h5>
|
||||
<p class="card-text">
|
||||
{% if item.depart.hour is defined and item.arrive.hour is defined %}
|
||||
{{ item.depart.strftime("%H:%M") }} → {{ item.arrive.strftime("%H:%M") }}
|
||||
{% if display_depart.hour is defined and display_arrive.hour is defined %}
|
||||
{{ display_depart.strftime("%H:%M") }} → {{ display_arrive.strftime("%H:%M") }}
|
||||
{% endif %}
|
||||
{% if item.class %}
|
||||
<span class="badge bg-info text-nowrap">{{ item.class }}</span>
|
||||
{% endif %}
|
||||
{% if item.depart.hour is defined and item.arrive.hour is defined %}
|
||||
<span class="text-muted">🕒{{ trip_duration(item.depart, item.arrive) }}</span>
|
||||
{% if display_depart.hour is defined and display_arrive.hour is defined %}
|
||||
<span class="text-muted">🕒{{ trip_duration(display_depart, display_arrive) }}</span>
|
||||
{% endif %}
|
||||
{% if item.distance %}
|
||||
<span class="text-muted">🛤️ {{ "{:,.0f} km".format(item.distance) }}</span>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue