Don't display empty sections on the homepage
This commit is contained in:
parent
13a04198f0
commit
9b119691d3
@ -77,10 +77,12 @@
|
|||||||
</svg>
|
</svg>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
{% macro home_feed(title, link, articles) %}
|
{% macro home_feed(title, link, articles) %}
|
||||||
<h2>{{ title | _ }} — <a href="{{ link }}">{{ "View all" | _ }}</a></h2>
|
{% if articles | length > 0 %}
|
||||||
<div class="cards spaced">
|
<h2>{{ title | _ }} — <a href="{{ link }}">{{ "View all" | _ }}</a></h2>
|
||||||
{% for article in articles %}
|
<div class="cards spaced">
|
||||||
{{ macros::post_card(article=article) }}
|
{% for article in articles %}
|
||||||
{% endfor %}
|
{{ macros::post_card(article=article) }}
|
||||||
</div>
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
Loading…
Reference in New Issue
Block a user