1
Fork 0

Lay out all posts nicely

This commit is contained in:
Jan-Erik Rediger 2019-04-23 23:09:40 +02:00
parent 27d746a9d5
commit 8d20d21b1b
2 changed files with 19 additions and 11 deletions

View file

@ -9,16 +9,22 @@ data:
<a href="/tagged/">Post by tag</a>
{% assign years = "2019, 2018, 2017, 2016, 2015, 2014, 2013, 2012, 2011" | split: ", " %}
{% for year in years %}
<table>
{% for year in years -%}
<tr>
<td>&nbsp;</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>
{% for post in collections.posts.pages %}
{% 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%}
{%- endfor %}
</table>

View file

@ -238,3 +238,5 @@ blockquote p {
}
/* close commented backslash hack */
table, tr, td { border: none; }