feat: display word count when hovering over read time

main
welpo 2 years ago
parent 23f5c6d309
commit d9cd64e5a4
No known key found for this signature in database
GPG Key ID: A2F978CF4EC1F5A6

@ -119,3 +119,11 @@ table td {
table tbody tr:nth-child(even) {
background-color: var(--bg-0);
}
.meta span:hover::before {
content: attr(word-count);
}
.meta span::before {
content: attr(reading-time);
}

@ -119,7 +119,7 @@
{% endif %}
<span> {{ page.reading_time }} minute read{% if page.taxonomies and page.taxonomies.tags %}&nbsp;{%
<span reading-time="{{ page.reading_time }} min read" word-count="{{ page.word_count }} words">{% if page.taxonomies and page.taxonomies.tags %}&nbsp;{%
endif %}</span>
{% if page.taxonomies and page.taxonomies.tags %}

Loading…
Cancel
Save