Converting nav to supporting category pages.
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
{%- for category in site.categories -%}
|
||||
{%- if category[0] != page.category -%}
|
||||
{%- continue -%}
|
||||
{%- endif -%}
|
||||
|
||||
{%- assign posts = category[1] -%}
|
||||
|
||||
{%- if posts.size > 0 -%}
|
||||
<section id="articles" class="">
|
||||
<div class="container">
|
||||
{%- if page.list_title -%}
|
||||
<h3>{{ page.list_title | capitalize }}</h3>
|
||||
{%- endif -%}
|
||||
<div class="features">
|
||||
{%- assign date_format = site.date_format | default: "%b %-d, %Y" -%}
|
||||
{%- for post in posts -%}
|
||||
<article>
|
||||
<a href="{{ post.url | relative_url }}" class="image">
|
||||
<img src="{{ post.banner }}" alt="">
|
||||
</a>
|
||||
<div class="inner">
|
||||
<h4><a href="{{ post.url | relative_url }}">{{ post.title | escape }}</a></h4>
|
||||
{{ post.date | date: date_format }}
|
||||
{%- if site.show_excerpts -%}
|
||||
{{ post.excerpt }}
|
||||
{%- endif -%}
|
||||
</div>
|
||||
</article>
|
||||
{%- endfor -%}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{%- endif -%}
|
||||
{%- break -%}
|
||||
{%- endfor -%}
|
||||
Reference in New Issue
Block a user