Skip to content

Commit d57fe1d

Browse files
committedAug 4, 2020
Fix entries_layout: grid
Close mmistakes#2639
1 parent 5741539 commit d57fe1d

File tree

7 files changed

+19
-13
lines changed

7 files changed

+19
-13
lines changed
 

‎_includes/archive-single.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
{% assign title = post.title %}
1111
{% endif %}
1212

13-
<div class="{{ include.type | default: "list" }}__item">
13+
<div class="{{ include.type | default: 'list' }}__item">
1414
<article class="archive__item" itemscope itemtype="https://schema.org/CreativeWork">
1515
{% if include.type == "grid" and teaser %}
1616
<div class="archive__item-teaser">

‎_layouts/categories.html

+3-2
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,15 @@
2525
{% endfor %}
2626
</ul>
2727

28+
{% assign entries_layout = page.entries_layout | default: 'list' %}
2829
{% for i in (1..categories_max) reversed %}
2930
{% for category in site.categories %}
3031
{% if category[1].size == i %}
3132
<section id="{{ category[0] | slugify | downcase }}" class="taxonomy__section">
3233
<h2 class="archive__subtitle">{{ category[0] }}</h2>
33-
<div class="entries-{{ page.entries_layout | default: 'list' }}">
34+
<div class="entries-{{ entries_layout }}">
3435
{% for post in category.last %}
35-
{% include archive-single.html type=page.entries_layout %}
36+
{% include archive-single.html type=entries_layout %}
3637
{% endfor %}
3738
</div>
3839
<a href="#page-title" class="back-to-top">{{ site.data.ui-text[site.locale].back_to_top | default: 'Back to Top' }} &uarr;</a>

‎_layouts/category.html

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
{{ content }}
66

7-
<div class="entries-{{ page.entries_layout }}">
8-
{% include posts-category.html taxonomy=page.taxonomy type=page.entries_layout %}
7+
{% assign entries_layout = page.entries_layout | default: 'list' %}
8+
<div class="entries-{{ entries_layout }}">
9+
{% include posts-category.html taxonomy=page.taxonomy type=entries_layout %}
910
</div>

‎_layouts/collection.html

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
{{ content }}
66

7-
<div class="entries-{{ page.entries_layout }}">
8-
{% include documents-collection.html collection=page.collection sort_by=page.sort_by sort_order=page.sort_order type=page.entries_layout %}
7+
{% assign entries_layout = page.entries_layout | default: 'list' %}
8+
<div class="entries-{{ entries_layout }}">
9+
{% include documents-collection.html collection=page.collection sort_by=page.sort_by sort_order=page.sort_order type=entries_layout %}
910
</div>

‎_layouts/posts.html

+3-2
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@
1515
{% endfor %}
1616
</ul>
1717

18+
{% assign entries_layout = page.entries_layout | default: 'list' %}
1819
{% assign postsByYear = site.posts | where_exp: "item", "item.hidden != true" | group_by_exp: 'post', 'post.date | date: "%Y"' %}
1920
{% for year in postsByYear %}
2021
<section id="{{ year.name }}" class="taxonomy__section">
2122
<h2 class="archive__subtitle">{{ year.name }}</h2>
22-
<div class="entries-{{ page.entries_layout | default: 'list' }}">
23+
<div class="entries-{{ entries_layout }}">
2324
{% for post in year.items %}
24-
{% include archive-single.html type=page.entries_layout %}
25+
{% include archive-single.html type=entries_layout %}
2526
{% endfor %}
2627
</div>
2728
<a href="#page-title" class="back-to-top">{{ site.data.ui-text[site.locale].back_to_top | default: 'Back to Top' }} &uarr;</a>

‎_layouts/tag.html

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
{{ content }}
66

7-
<div class="entries-{{ page.entries_layout | default: 'list' }}">
8-
{% include posts-tag.html taxonomy=page.taxonomy type=page.entries_layout %}
7+
{% assign entries_layout = page.entries_layout | default: 'list' %}
8+
<div class="entries-{{ entries_layout }}">
9+
{% include posts-tag.html taxonomy=page.taxonomy type=entries_layout %}
910
</div>

‎_layouts/tags.html

+3-2
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,15 @@
2525
{% endfor %}
2626
</ul>
2727

28+
{% assign entries_layout = page.entries_layout | default: 'list' %}
2829
{% for i in (1..tags_max) reversed %}
2930
{% for tag in site.tags %}
3031
{% if tag[1].size == i %}
3132
<section id="{{ tag[0] | slugify | downcase }}" class="taxonomy__section">
3233
<h2 class="archive__subtitle">{{ tag[0] }}</h2>
33-
<div class="entries-{{ page.entries_layout | default: 'list' }}">
34+
<div class="entries-{{ entries_layout }}">
3435
{% for post in tag.last %}
35-
{% include archive-single.html type=page.entries_layout %}
36+
{% include archive-single.html type=entries_layout %}
3637
{% endfor %}
3738
</div>
3839
<a href="#page-title" class="back-to-top">{{ site.data.ui-text[site.locale].back_to_top | default: 'Back to Top' }} &uarr;</a>

0 commit comments

Comments
 (0)
Please sign in to comment.