diff options
author | jeffreytse <jeffreytse.mail@gmail.com> | 2020-07-16 19:25:52 +0800 |
---|---|---|
committer | jeffreytse <jeffreytse.mail@gmail.com> | 2020-07-16 19:25:52 +0800 |
commit | 2363157807dec4519a9d227b9951814429cf3691 (patch) | |
tree | ba6538a73d6fef9864024fdfa9ad2356a9932e23 /_includes/views/pagination.html | |
parent | 36641effb1af5e4462868a79c472a2ed6a4f0ea8 (diff) |
feat: add reading time and icons
Diffstat (limited to '_includes/views/pagination.html')
-rw-r--r-- | _includes/views/pagination.html | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/_includes/views/pagination.html b/_includes/views/pagination.html index 48e27bb..bcc3620 100644 --- a/_includes/views/pagination.html +++ b/_includes/views/pagination.html @@ -11,6 +11,11 @@ {%- for post in paginator.posts -%} <li> {%- assign date_format = site.yat.date_format | default: "%b %-d, %Y" -%} + + {% assign article = post.content %} + {%- include functions.html func='get_reading_time' -%} + {% assign reading_time = return %} + <h2 class="post-title"> {%- assign post_url = post.url | relative_url -%} <a class="post-link" href="{{ post_url }}"> @@ -18,7 +23,8 @@ </a> </h2> <div class="post-meta"> - <span class="post-date">{{ post.date | date: date_format }}</span> + <span class="post-date"><i class="fa fa-calendar"></i> {{ post.date | date: date_format }}</span> + <span class="post-reading-time left-vsplit"><i class="fa fa-clock-o"></i> {{ reading_time }}</span> </div> <p class="post-excerpt"> {{ post.content | strip_html | truncatewords: 50 }} |