Skip to content

Commit 91425c3

Browse files
committed
Small changes to reading time to prevent redraws
Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 72baee9 commit 91425c3

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

_includes/read_time.html

+6-9
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
<span class="reading-time" title="Estimated reading time">
2-
<span class="reading-time-label">Estimated reading time: </span>
3-
{% assign words = content | number_of_words %}
4-
{% if words < 360 %}
5-
1 minute
6-
{% else %}
7-
{{ words | divided_by:180 }} minutes
8-
{% endif %}
9-
</span>
1+
{%- assign words = content | number_of_words -%}
2+
{%- if words < 360 -%}
3+
<p><em class="reading-time">Estimated reading time: 1 minute</em></p>
4+
{%- else -%}
5+
<p><em class="reading-time">Estimated reading time: {{ words | divided_by:180 }} minutes</em></p>
6+
{%- endif -%}

_scss/_utilities.scss

-2
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@
1010
}
1111

1212
.reading-time {
13-
font-style: italic;
1413
font-size: 12px;
15-
display: block;
1614
color: rgba(13, 86, 125, 0.55);
1715
}
1816

0 commit comments

Comments
 (0)