Lay out all posts nicely
This commit is contained in:
parent
27d746a9d5
commit
8d20d21b1b
28
posts.liquid
28
posts.liquid
|
@ -9,16 +9,22 @@ data:
|
||||||
<a href="/tagged/">Post by tag</a>
|
<a href="/tagged/">Post by tag</a>
|
||||||
|
|
||||||
{% assign years = "2019, 2018, 2017, 2016, 2015, 2014, 2013, 2012, 2011" | split: ", " %}
|
{% assign years = "2019, 2018, 2017, 2016, 2015, 2014, 2013, 2012, 2011" | split: ", " %}
|
||||||
{% for year in years %}
|
<table>
|
||||||
|
{% for year in years -%}
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
<td><h3>{{year}}</h3></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<h3>{{year}}</h3>
|
{%- for post in collections.posts.pages %}
|
||||||
|
{%- assign postyear = post.published_date | date: "%Y" %}
|
||||||
|
{%- if postyear == year %}
|
||||||
|
<tr>
|
||||||
|
<td>{{ post.published_date | date: "%d. %b"}}</td>
|
||||||
|
<td><a href="/{{post.permalink }}">{{post.title}}</a></td>
|
||||||
|
</tr>
|
||||||
|
{%- endif %}
|
||||||
|
{%- endfor %}
|
||||||
|
|
||||||
<ul>
|
{%- endfor %}
|
||||||
{% for post in collections.posts.pages %}
|
</table>
|
||||||
{% assign postyear = post.published_date | date: "%Y" %}
|
|
||||||
{% if postyear == year %}
|
|
||||||
<li>{{ post.published_date | date: "%d %b"}}: <a href="/{{post.permalink }}">{{post.title}}</a></li>
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
{%endfor%}
|
|
||||||
|
|
Loading…
Reference in a new issue