Fix entries_layout: grid

Close #2639
This commit is contained in:
Michael Rose
2020-08-04 12:59:44 -04:00
parent 5741539e17
commit d57fe1de2c
7 changed files with 19 additions and 13 deletions

View File

@@ -15,13 +15,14 @@ layout: archive
{% endfor %}
</ul>
{% assign entries_layout = page.entries_layout | default: 'list' %}
{% assign postsByYear = site.posts | where_exp: "item", "item.hidden != true" | group_by_exp: 'post', 'post.date | date: "%Y"' %}
{% for year in postsByYear %}
<section id="{{ year.name }}" class="taxonomy__section">
<h2 class="archive__subtitle">{{ year.name }}</h2>
<div class="entries-{{ page.entries_layout | default: 'list' }}">
<div class="entries-{{ entries_layout }}">
{% for post in year.items %}
{% include archive-single.html type=page.entries_layout %}
{% include archive-single.html type=entries_layout %}
{% endfor %}
</div>
<a href="#page-title" class="back-to-top">{{ site.data.ui-text[site.locale].back_to_top | default: 'Back to Top' }} &uarr;</a>