mirror of
https://github.com/mgrove36/bbc-young-reporter.git
synced 2026-03-03 03:17:07 +00:00
Refine navbar
Add year subtitles automatically and remove need for categories on posts
This commit is contained in:
@@ -12,13 +12,18 @@
|
|||||||
<i class="material-icons mdc-list-item__graphic" aria-hidden="true">home</i>
|
<i class="material-icons mdc-list-item__graphic" aria-hidden="true">home</i>
|
||||||
<span class="mdc-list-item__text">Home Page</span>
|
<span class="mdc-list-item__text">Home Page</span>
|
||||||
</a>
|
</a>
|
||||||
{% if site.categories.articles %}
|
{% if site.posts %}
|
||||||
<div class="mdc-list-group">
|
<div class="mdc-list-group">
|
||||||
<h3 class="mdc-list-group__subheader">Articles</h3>
|
<h3 class="mdc-list-group__subheader">Articles</h3>
|
||||||
{% for page in site.categories.articles %}
|
{% for article in site.posts %}
|
||||||
|
{% assign currentdate = article.date | date: "%Y" %}
|
||||||
|
{% if currentdate != date %}
|
||||||
|
<h3 class="mdc-list-group__subheader">{{ currentdate }}</h3>
|
||||||
|
{% assign date = currentdate %}
|
||||||
|
{% endif %}
|
||||||
<a class="mdc-list-item" href="{{ page.url | relative_url }}" data-mdc-auto-init="MDCRipple">
|
<a class="mdc-list-item" href="{{ page.url | relative_url }}" data-mdc-auto-init="MDCRipple">
|
||||||
<i class="material-icons mdc-list-item__graphic" aria-hidden="true">assignment</i>
|
<i class="material-icons mdc-list-item__graphic" aria-hidden="true">assignment</i>
|
||||||
<span class="mdc-list-item__text">{{ page.title }}</span>
|
<span class="mdc-list-item__text">{{ article.title }}</span>
|
||||||
</a>
|
</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ date: 2019-01-01 7:01
|
|||||||
authors: Name
|
authors: Name
|
||||||
image-caption: A caption for the cover image
|
image-caption: A caption for the cover image
|
||||||
layout: article
|
layout: article
|
||||||
categories: articles
|
|
||||||
---
|
---
|
||||||
|
|
||||||
Content
|
Content
|
||||||
|
|||||||
Reference in New Issue
Block a user