wallabag/templates/Entry/_reading_time.html.twig
2024-02-19 10:32:55 +01:00

7 lines
364 B
Twig

{% set reading_time = entry.readingTime / app.user.config.readingSpeed * 200 %}
<i class="material-icons grey-text">timer</i>
{% if reading_time > 0 %}
<span>{{ 'entry.list.reading_time_minutes_short'|trans({'%readingTime%': reading_time|round}) }}</span>
{% else %}
<span>{{ 'entry.list.reading_time_less_one_minute_short'|trans|raw }}</span>
{% endif %}