Add a link to author's profile on article card

Use a macro to render those cards too
This commit is contained in:
Bat
2018-05-13 18:19:23 +01:00
parent 5e7d513a7e
commit 91b19bccb5
8 changed files with 36 additions and 19 deletions
+2 -5
View File
@@ -1,4 +1,5 @@
{% extends "base" %}
{% import "macros" as macros %}
{% block title %}
{{ instance.name }}
@@ -9,10 +10,6 @@
<h2>Latest articles</h2>
{% for article in recents %}
<div>
<h3><a href="{{ article.url }}">{{ article.post.title }}</a></h3>
<p>{{ article.post.content | escape | truncate(length=200) }}…</p>
<p>By {{ article.author.display_name }} ⋅ {{ article.date | date(format="%B %e") }}</p>
</div>
{{ macros::post_card(article=article) }}
{% endfor %}
{% endblock content %}