Verified Commit 35cc97d3 authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Fix thabloids out-of-item rendering

parent ecf7b09a
......@@ -57,7 +57,9 @@
<div class="row">
{% for thabloid in thabloids %}
{% thabloid_card year thabloid %}
<div class="mix {% if thabloid.year >= year|add:-3 %}year-{{ thabloid.year }}{% else %}year-older{% endif %} col-6 col-md-3 my-3">
{% thabloid_card year thabloid %}
</div>
{% endfor %}
</div>
</div>
......
......@@ -9,10 +9,6 @@ register = template.Library()
@register.inclusion_tag('includes/grid_item.html')
def thabloid_card(year, thabloid):
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])
buttons = (
'<div class="text-center mt-2">'
......@@ -33,5 +29,5 @@ def thabloid_card(year, thabloid):
meta_text=buttons,
url=None,
image_url=get_thumbnail_url(thabloid.cover, '255x360'),
class_name=f'thabloid-card mix {class_name} col-6 col-md-3 my-3',
class_name=f'thabloid-card',
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment