Add same styling from talks page to blog

This commit is contained in:
Oliver Davies 2021-06-30 08:00:00 +01:00
parent 2f6f27e1fa
commit 9cc4952c6d

View file

@ -4,25 +4,20 @@ use:
- posts
---
{% set activeYear = false %}
<p class="mt-4 text-xl">I enjoy writing articles and have written a number of them so far during my career, both to document my own learning as well to act as resources for others.</p>
{% for post in data.posts %}
{% set postYear = post.date|date('Y') %}
<div class="mt-6">
<div class="space-y-6">
{% for talk in data.posts %}
<article>
<h2 class="text-xl">
<a class="text-blue-700" href="{{ talk.url }}">
{{ talk.title }}
</a>
</h2>
{% if postYear != activeYear %}
{% if activeYear != false %}
</ul>
{% endif %}
{% set activeYear = postYear %}
<h2>{{ postYear }}</h2>
<ul>
{% endif %}
<li>
<a href="{{ post.url }}">{{ post.title }}</a>
- {{ post.date|date('jS F Y') }}
</li>
<p class="mt-1 text-xl leading-7">{{ talk.excerpt }}</p>
</article>
{% endfor %}
</div>
</div>