chore: more context on dates
This commit is contained in:
parent
e3e24f2499
commit
f034ae2584
3 changed files with 11 additions and 2 deletions
|
@ -1,10 +1,17 @@
|
|||
---
|
||||
layout: default
|
||||
---
|
||||
{% assign bookData = books | bookStatus: 'finished' | bookFinishedYear: year %}
|
||||
{%- assign bookData = books | bookStatus: 'finished' | bookFinishedYear: year -%}
|
||||
{%- capture currentYear -%}{% currentYear %}{%- endcapture -%}
|
||||
{%- assign yearString = year | append: '' -%}
|
||||
{%- assign currentYearString = currentYear | append: '' -%}
|
||||
<p><a class="link-arrow flex-centered" href="/books">{% tablericon "arrow-left" "Go back" %} Go back</a></p>
|
||||
<h2 class="page-header">{{ title }}</h2>
|
||||
{{ content }}
|
||||
{% if yearString == currentYearString %}
|
||||
<p>I've finished <strong class="highlight-text">{{ bookData.size }} books</strong> this year.</p>
|
||||
{% else %}
|
||||
<p>I finished <strong class="highlight-text">{{ bookData.size }} books</strong> in {{ year }}</p>
|
||||
{% endif %}
|
||||
<hr class="large-spacing" />
|
||||
{% render "partials/now/media-grid.liquid", data:bookData, shape: "vertical", count: 200, loading: "eager" %}
|
Reference in a new issue