Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
thalia
concrexit
Commits
35cc97d3
Verified
Commit
35cc97d3
authored
May 17, 2019
by
Sébastiaan Versteeg
Browse files
Fix thabloids out-of-item rendering
parent
ecf7b09a
Changes
2
Hide whitespace changes
Inline
Side-by-side
website/thabloid/templates/thabloid/index.html
View file @
35cc97d3
...
...
@@ -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>
...
...
website/thabloid/templatetags/thabloid_cards.py
View file @
35cc97d3
...
...
@@ -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'
,
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment