mirror of
https://github.com/wallabag/wallabag.git
synced 2024-12-20 22:56:30 +00:00
Fix entry reading time
This commit is contained in:
parent
7719346328
commit
6ed615ac74
3 changed files with 9 additions and 10 deletions
|
@ -1,8 +1,6 @@
|
|||
<div class="card-action">
|
||||
<span class="reading-time grey-text">
|
||||
<i class="material-icons" title="{{ 'entry.list.reading_time'|trans }}">timer</i>
|
||||
{{ entry.readingTime / app.user.config.readingSpeed|round }} min
|
||||
|
||||
{% include "@WallabagCore/themes/material/Entry/_reading_time.html.twig" with {'entry': entry} only %}
|
||||
<i class="material-icons hide-on-med-and-down" title="{{ 'entry.view.created_at'|trans }}">today</i>
|
||||
<span class="hide-on-med-and-down"> {{ entry.createdAt|date('Y-m-d') }}</span>
|
||||
</span>
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
{% set readingTime = entry.readingTime / app.user.config.readingSpeed %}
|
||||
<i class="material-icons">timer</i>
|
||||
{% if readingTime > 0 %}
|
||||
{{ 'entry.list.reading_time_minutes_short'|trans({'%readingTime%': readingTime|round}) }}
|
||||
{% else %}
|
||||
{{ 'entry.list.reading_time_less_one_minute_short'|trans|raw }}
|
||||
{% endif %}
|
|
@ -214,13 +214,7 @@
|
|||
<aside>
|
||||
<ul class="tools">
|
||||
<li>
|
||||
{% set readingTime = entry.readingTime / app.user.config.readingSpeed %}
|
||||
<i class="material-icons">timer</i>
|
||||
{% if readingTime > 0 %}
|
||||
{{ 'entry.list.reading_time_minutes_short'|trans({'%readingTime%': readingTime|round}) }}
|
||||
{% else %}
|
||||
{{ 'entry.list.reading_time_less_one_minute_short'|trans|raw }}
|
||||
{% endif %}
|
||||
{% include "@WallabagCore/themes/material/Entry/_reading_time.html.twig" with {'entry': entry} only %}
|
||||
</li>
|
||||
<li>
|
||||
<i class="material-icons" title="{{ 'entry.view.created_at'|trans }}">today</i>
|
||||
|
|
Loading…
Reference in a new issue