DRY up archive include

- Combine grid and list view into one include
This commit is contained in:
Michael Rose
2016-03-19 20:58:17 -04:00
parent da90ccaf49
commit 109f4ffb44
16 changed files with 75 additions and 76 deletions

View File

@ -9,7 +9,7 @@ author_profile: false
{% capture written_label %}'None'{% endcapture %}
{% for collection in site.collections %}
{% unless collection.output == false or collection.label == 'posts' %}
{% unless collection.output == false or collection.label == "posts" %}
{% capture label %}{{ collection.label }}{% endcapture %}
{% if label != written_label %}
<h2 id="{{ label | slugify }}" class="archive__subtitle">{{ label }}</h2>
@ -17,8 +17,8 @@ author_profile: false
{% endif %}
{% endunless %}
{% for post in collection.docs %}
{% unless collection.output == false or collection.label == 'posts' %}
{% include archive-list-single.html %}
{% unless collection.output == false or collection.label == "posts" %}
{% include archive-single.html %}
{% endunless %}
{% endfor %}
{% endfor %}