Display article covers

This commit is contained in:
Baptiste Gelez
2018-10-31 11:43:56 +01:00
parent 95326c09e0
commit 4a2f5aeeeb
4 changed files with 32 additions and 3 deletions
+3
View File
@@ -1,5 +1,8 @@
{% macro post_card(article) %}
<div class="card">
{% if article.cover %}
<div class="cover" style="background-image: url('{{ article.cover.url }}')"></div>
{% endif %}
<h3><a href="{{ article.url }}">{{ article.post.title }}</a></h3>
<main>
<p>
+3
View File
@@ -35,6 +35,9 @@
<span class="badge">{{ "Draft" }}</span>
{% endif %}
</div>
{% if article.cover %}
<div class="cover" style="background-image: url('{{ article.cover.url }}')"></div>
{% endif %}
<article>
{{ article.post.content | safe }}
</article>