default text for empty sections

This commit is contained in:
Ell 2023-08-12 13:14:10 +02:00
parent 2d7743f8f5
commit 624020a1d0

View file

@ -21,6 +21,7 @@ summary: A fun simulation game where you mess with people's lives
<br><span class="text-muted">The slug for this section is <code>{{ section.slug }}</code>.</span>
</p>
{% assign any = false %}
{% for content in site.data.community-content %}
{% if content.section == section.slug %}
<div class="community-content">
@ -41,8 +42,12 @@ summary: A fun simulation game where you mess with people's lives
<img id="{{ content.slug }}" src="/media/community/{{ content.slug }}.png" alt="An image showing off {{ content.name }}" width="100%">
</div>
</div>
{% assign any = true %}
{% endif %}
{% endfor %}
{% unless any %}
<em>There's nothing in this section yet.</em>
{% endunless %}
</div>
{% endfor %}
</div>