From 3a5e5e33f71a1f34138a83e112ff73c8ac6354d4 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Mon, 4 Mar 2019 10:13:52 +0000 Subject: [PATCH] Hide dates on main articles page --- source/_partials/blog/post-summary.html.twig | 6 ++++-- source/articles/archive.html.twig | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/source/_partials/blog/post-summary.html.twig b/source/_partials/blog/post-summary.html.twig index 21a534b8..6948a445 100644 --- a/source/_partials/blog/post-summary.html.twig +++ b/source/_partials/blog/post-summary.html.twig @@ -1,11 +1,13 @@ -
+

{{ post.draft ? 'Draft: '|upper }}{{ post.title }}

-

Posted on {{ post.date|date('jS F Y') }}

+ {% if show_date %} +

Posted on {{ post.date|date('jS F Y') }}

+ {% endif %}
diff --git a/source/articles/archive.html.twig b/source/articles/archive.html.twig index 411922c0..2c41b2be 100644 --- a/source/articles/archive.html.twig +++ b/source/articles/archive.html.twig @@ -13,7 +13,9 @@ use: [posts]
{% for post in data.posts %}
- {% include 'blog/post-summary' %} + {% include 'blog/post-summary' with { + show_date: true, + } %}
{% endfor %}