Sha256: 082befe38434dee1f28adca2856a27f22e233d8f9a582d4a75da03597c8597ca

Contents?: true

Size: 1.29 KB

Versions: 5

Compression:

Stored size: 1.29 KB

Contents

{%- assign list_items = include.list_items -%}
{%- assign list_type = include.list_type -%}

<div class="archive-list">
    {%- if list_type == "posts" -%}
    {% assign posts_by_years = list_items | group_by_exp: 'post', 'post.date | date: "%Y"' %}
    {% for year in posts_by_years %}
    <a data-toggle="collapse" href="#posts_in_{{ year.name }}" role="button" aria-expanded="false"
        aria-controls="posts_in_{{ year.name }}">
        <h2 id="posts_in_{{ year.name }}_heading">{{ year.name }}</h2>
    </a>
    <div class="collapse show" id="posts_in_{{ year.name }}">
        {% for post in year.items %}
            {% include archive-single.html item=post %}
        {% endfor %}
    </div>
    {% endfor %}
    {%- else -%}
    {% assign taxonomies = list_items %}
    {% for taxonomy in taxonomies %}
    {%- capture tax_0 -%} {{ taxonomy[0] | slugify }} {%- endcapture -%}
    <a data-toggle="collapse" href="#posts_in_{{ tax_0 }}" role="button" aria-expanded="false"
        aria-controls="posts_in_{{ tax_0 }}">
        <h2 id="posts_in_{{ tax_0 }}_heading">{{ tax_0 }}</h2>
    </a>
    <div class="collapse show" id="posts_in_{{ tax_0 }}">
        {% for post in taxonomy[1] %}
            {% include archive-single.html item=post %}
        {% endfor %}
    </div>
    {% endfor %}
    {%- endif -%}
</div>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
lone-wolf-theme-1.0.7 _includes/archive-list.html
lone-wolf-theme-1.0.6 _includes/archive-list.html
lone-wolf-theme-1.0.5 _includes/archive-list.html
lone-wolf-theme-1.0.4 _includes/archive-list.html
lone-wolf-theme-1.0.3 _includes/archive-list.html