Small changes to reading time to prevent redraws

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2020-10-22 16:01:44 +02:00
parent 72baee9555
commit 91425c3708
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
2 changed files with 6 additions and 11 deletions

View File

@ -1,9 +1,6 @@
<span class="reading-time" title="Estimated reading time">
<span class="reading-time-label">Estimated reading time: </span>
{% assign words = content | number_of_words %}
{% if words < 360 %}
1 minute
{% else %}
{{ words | divided_by:180 }} minutes
{% endif %}
</span>
{%- assign words = content | number_of_words -%}
{%- if words < 360 -%}
<p><em class="reading-time">Estimated reading time: 1 minute</em></p>
{%- else -%}
<p><em class="reading-time">Estimated reading time: {{ words | divided_by:180 }} minutes</em></p>
{%- endif -%}

View File

@ -10,9 +10,7 @@
}
.reading-time {
font-style: italic;
font-size: 12px;
display: block;
color: rgba(13, 86, 125, 0.55);
}