From 265ae2515e2479a8c42fc6adcf6114b8f63eacc4 Mon Sep 17 00:00:00 2001 From: Joost Rijneveld Date: Wed, 14 Nov 2018 10:31:18 +0100 Subject: [PATCH] Fix 'older Thabloids' category The condition was always True, and the class name was incorrect --- website/thabloid/templatetags/thabloid_cards.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/thabloid/templatetags/thabloid_cards.py b/website/thabloid/templatetags/thabloid_cards.py index d8a79770..5406d512 100644 --- a/website/thabloid/templatetags/thabloid_cards.py +++ b/website/thabloid/templatetags/thabloid_cards.py @@ -9,8 +9,8 @@ register = template.Library() @register.inclusion_tag('includes/grid_item.html') def thabloid_card(year, thabloid): - class_name = 'older' - if thabloid.year - 3 < year: + class_name = 'year-older' + if thabloid.year >= year - 3: class_name = 'year-{}'.format(thabloid.year) view_url = reverse('thabloid:pages', args=[thabloid.year, thabloid.issue]) -- GitLab