clone of github.com/decent-newsroom/newsroom
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

43 lines
1.7 KiB

<div {{ attributes }}>
{% if nzines is not empty %}
{% for item in nzines %}
<div class="card">
<div class="card-body text-center">
<h3 class="card-title">
<a href="{{ path('magazine-index', {mag: item.slug}) }}">
{% if item and item.title %}
{{ item.title }}
{% elseif item.slug %}
{{ item.slug }}
{% else %}
Untitled Magazine
{% endif %}
</a>
</h3>
{% if item and item.summary %}
<p class="lede">{{ item.summary }}</p>
{% endif %}
{# Category links (from 'a' tags) #}
{% set categoryTags = [] %}
{% if item.tags is defined %}
{% for tag in item.tags %}
{% if tag[0] is defined and tag[0] == 'a' %}
{% set categoryTags = categoryTags|merge([tag]) %}
{% endif %}
{% endfor %}
{% endif %}
{% if categoryTags is not empty %}
<ul class="list-unstyled d-flex flex-row gap-3 justify-content-center mt-3">
{% for catTag in categoryTags %}
<li class="list-inline-item"><twig:Molecules:CategoryLink :coordinate="catTag" :mag="item.slug" /></li>
{% endfor %}
</ul>
{% endif %}
</div>
</div>
<br>
{% endfor %}
{% else %}
<p><small>No magazines yet.</small></p>
{% endif %}
</div>