mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-11-23 03:51:00 +00:00
Don't display empty sections on the homepage
This commit is contained in:
parent
13a04198f0
commit
9b119691d3
1 changed files with 8 additions and 6 deletions
|
@ -77,10 +77,12 @@
|
||||||
</svg>
|
</svg>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
{% macro home_feed(title, link, articles) %}
|
{% macro home_feed(title, link, articles) %}
|
||||||
|
{% if articles | length > 0 %}
|
||||||
<h2>{{ title | _ }} — <a href="{{ link }}">{{ "View all" | _ }}</a></h2>
|
<h2>{{ title | _ }} — <a href="{{ link }}">{{ "View all" | _ }}</a></h2>
|
||||||
<div class="cards spaced">
|
<div class="cards spaced">
|
||||||
{% for article in articles %}
|
{% for article in articles %}
|
||||||
{{ macros::post_card(article=article) }}
|
{{ macros::post_card(article=article) }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
Loading…
Reference in a new issue