BirdNET-stream/www/templates/stats.html.twig

42 lines
1.6 KiB
Twig
Raw Normal View History

2022-08-15 11:42:28 +02:00
<div id="stats">
2022-08-16 05:21:53 +02:00
<h2>{{ "Quick Stats" | trans }}</h2>
2022-08-15 11:42:28 +02:00
<ul>
<li class="most-recorded-species">
{{ "Most recorded species" | trans }}:
<span class="scientific-name">
{{ stats["most-recorded-species"]["scientific_name"] }}
</span>
(<span class="common_name">{{ stats["most-recorded-species"]["common_name"] }}</span>)
{{ "with" | trans }}
<span class="observation-count">
{{ stats["most-recorded-species"]["contact_count"] }}
</span>
{{ "contacts" | trans }}.
</li>
<li class="last-recorded-species">
{{ "Last detected species" | trans }}:
<span class="scientific-name">
{{ stats["last-detected-species"]["scientific_name"] }}
</span>
(<span class="common_name">{{ stats["last-detected-species"]["common_name"] }}</span>)
{{ "with" | trans }}
<span class="confidence">
{{ stats["last-detected-species"]["confidence"] }}
</span>
{{ "AI confidence" | trans }}
<span class="datetime">
{% set date = stats["last-detected-species"]["date"] %}
{% if date | date("Y-m-d") == "now" | date("Y-m-d") %}
{{ "today" | trans }}
{% else %}
{{ "on" | trans }}
{{ date | format_datetime("full", "none") }}
{% endif %}
at
<span class="time">
{{ date | date("H:i") }}
</span>
</span>.
</li>
</ul>
</div>