Configure entries layout list
or grid
Switch between list or grid view by adding `entries_layout` to YAML Front Matter.
This commit is contained in:
parent
d6605146ac
commit
467a748815
6 changed files with 8 additions and 8 deletions
|
@ -38,7 +38,7 @@ layout: archive
|
||||||
<h2 class="archive__subtitle">{{ category[0] }}</h2>
|
<h2 class="archive__subtitle">{{ category[0] }}</h2>
|
||||||
<div class="entries-{{ page.entries_layout | default: 'list' }}">
|
<div class="entries-{{ page.entries_layout | default: 'list' }}">
|
||||||
{% for post in category.last %}
|
{% for post in category.last %}
|
||||||
{% include archive-single.html %}
|
{% include archive-single.html type=page.entries_layout %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
<a href="#page-title" class="back-to-top">{{ site.data.text[site.locale].back_to_top | default: 'Back to Top' }} ↑</a>
|
<a href="#page-title" class="back-to-top">{{ site.data.text[site.locale].back_to_top | default: 'Back to Top' }} ↑</a>
|
||||||
|
|
|
@ -4,6 +4,6 @@ layout: archive
|
||||||
|
|
||||||
{{ content }}
|
{{ content }}
|
||||||
|
|
||||||
<div class="entries-{{ page.entries_layout | default: 'list' }}">
|
<div class="entries-{{ page.entries_layout }}">
|
||||||
{% include posts-category.html taxonomy=page.taxonomy %}
|
{% include posts-category.html taxonomy=page.taxonomy type=page.entries_layout %}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -4,6 +4,6 @@ layout: archive
|
||||||
|
|
||||||
{{ content }}
|
{{ content }}
|
||||||
|
|
||||||
<div class="entries-{{ page.entries_layout | default: 'list' }}">
|
<div class="entries-{{ page.entries_layout }}">
|
||||||
{% include documents-collection.html collection=page.collection sort_by=page.sort_by sort_order=page.sort_order %}
|
{% include documents-collection.html collection=page.collection sort_by=page.sort_by sort_order=page.sort_order type=page.entries_layout %}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -21,7 +21,7 @@ layout: archive
|
||||||
<h2 class="archive__subtitle">{{ year.name }}</h2>
|
<h2 class="archive__subtitle">{{ year.name }}</h2>
|
||||||
<div class="entries-{{ page.entries_layout | default: 'list' }}">
|
<div class="entries-{{ page.entries_layout | default: 'list' }}">
|
||||||
{% for post in year.items %}
|
{% for post in year.items %}
|
||||||
{% include archive-single.html %}
|
{% include archive-single.html type=page.entries_layout %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
<a href="#page-title" class="back-to-top">{{ site.data.text[site.locale].back_to_top | default: 'Back to Top' }} ↑</a>
|
<a href="#page-title" class="back-to-top">{{ site.data.text[site.locale].back_to_top | default: 'Back to Top' }} ↑</a>
|
||||||
|
|
|
@ -5,5 +5,5 @@ layout: archive
|
||||||
{{ content }}
|
{{ content }}
|
||||||
|
|
||||||
<div class="entries-{{ page.entries_layout | default: 'list' }}">
|
<div class="entries-{{ page.entries_layout | default: 'list' }}">
|
||||||
{% include posts-tag.html taxonomy=page.taxonomy %}
|
{% include posts-tag.html taxonomy=page.taxonomy type=page.entries_layout %}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -38,7 +38,7 @@ layout: archive
|
||||||
<h2 class="archive__subtitle">{{ tag[0] }}</h2>
|
<h2 class="archive__subtitle">{{ tag[0] }}</h2>
|
||||||
<div class="entries-{{ page.entries_layout | default: 'list' }}">
|
<div class="entries-{{ page.entries_layout | default: 'list' }}">
|
||||||
{% for post in tag.last %}
|
{% for post in tag.last %}
|
||||||
{% include archive-single.html %}
|
{% include archive-single.html type=page.entries_layout %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
<a href="#page-title" class="back-to-top">{{ site.data.text[site.locale].back_to_top | default: 'Back to Top' }} ↑</a>
|
<a href="#page-title" class="back-to-top">{{ site.data.text[site.locale].back_to_top | default: 'Back to Top' }} ↑</a>
|
||||||
|
|
Loading…
Reference in a new issue