Guide_3DS/_includes/read-time.html

16 lines
707 B
HTML
Raw Normal View History

2016-11-23 02:29:35 +01:00
{% assign words_per_minute = site.words_per_minute | default: 200 %}
2016-10-30 01:02:14 +02:00
{% if post.read_time %}
{% assign words = post.content | strip_html | number_of_words %}
{% elsif page.read_time %}
{% assign words = page.content | strip_html | number_of_words %}
{% endif %}
2017-09-28 23:42:38 +02:00
{% if words < words_per_minute %}
2016-11-23 02:29:35 +01:00
{{ site.data.ui-text[site.locale].less_than | default: "less than" }} 1 {{ site.data.ui-text[site.locale].minute_read | default: "minute read" }}
2017-09-28 23:42:38 +02:00
{% elsif words == words_per_minute %}
2016-11-23 02:29:35 +01:00
1 {{ site.data.ui-text[site.locale].minute_read | default: "minute read" }}
2016-10-30 01:02:14 +02:00
{% else %}
2016-11-23 02:29:35 +01:00
{{ words | divided_by:words_per_minute }} {{ site.data.ui-text[site.locale].minute_read | default: "minute read" }}
{% endif %}