Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions _includes/article.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ <h2 class="article__title">
<p class="article__excerpt">{{ post.description }}</p>
{% endif %}

<div>
<span class="post__reading-time">
{% include reading-time.html %}</span>
</div>

</div>
</div>
</div>
6 changes: 6 additions & 0 deletions _includes/reading-time.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{% capture words %}
{{ content | number_of_words | minus: 180 }}
{% endcapture %}
{% unless words contains '-' %}
{{ words | plus: 150 | divided_by: 150 | append: ' minutes to read' }}
{% endunless %}
15 changes: 8 additions & 7 deletions _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="post-head">
<div class="container">
<div class="row">

{% if page.video_embed %}
<div class="col col-12">
<div class="post-video">
Expand All @@ -25,21 +25,21 @@
{%endif %}

{% endif %}

{% if page.video_embed %} {% assign videoInfo = 'post__info-video' %} {% endif %}
<div class="col {% if page.video_embed %}col-12{% else %}col-6 col-d-12{% endif %}">
<div class="post__info {{videoInfo}}">

{% if page.tags.size >= 1 %}
<div class="post__tags">
{% for tag in page.tags %}
<a href="{{ site.baseurl }}/tags#{{ tag }}" class="post__tag">{{ tag }}</a>
{% endfor %}
</div>
{% endif %}

<h1 class="post__title">{{ page.title | escape }}</h1>

<div class="post__meta">
<a href="{{site.baseurl}}/about/" class="post__author-image">
<img class="lazy" data-src="{{site.author.author__avatar}}" alt="{{site.author.author__name}}">
Expand All @@ -48,9 +48,10 @@ <h1 class="post__title">{{ page.title | escape }}</h1>
<div class="post__meta-bottom">
<a class="post__author" href="{{site.baseurl}}/about/">{{site.author.author__name}}</a>
<time class="post__date" datetime="{{ page.date | date_to_xmlschema }}">{{ page.date | date_to_string }}</time>
<span class="post__reading-time">{% include reading-time.html %}</span>
</div>
</div>

</div>
</div>
</div>
Expand Down Expand Up @@ -97,7 +98,7 @@ <h1 class="post__title">{{ page.title | escape }}</h1>
<div class="container">
<div class="row">
<div class="col col-12">
{% include disqus-comments.html %}
{% include disqus-comments.html %}
</div>
</div>
</div>
Expand Down