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.
 
 
 
 
 
 

39 lines
1.8 KiB

<div>
{% if list %}
{% set _hue = (title|default('x')|length * 47) % 360 %}
<div
{{ attributes.defaults({ class: 'featured-list featured-list--wall' }) }}
role="region"
aria-label="{{ title|e('html_attr') }}"
>
{% for item in list %}
<article class="featured-tile" style="--tile-hue: {{ _hue }};">
<a
class="featured-tile__link"
href="{{ (item.pubkey and npub_from_hex(item.pubkey) != '') ? path('article', { npub: npub_from_hex(item.pubkey), slug: item.slug }) : path('article-legacy-redirect', { slug: item.slug }) }}"
>
<div class="featured-tile__head">
<span class="featured-tile__cat">{{ title }}</span>
</div>
<div class="featured-tile__media featured-tile__media--ar{{ loop.index0 % 4 }}">
<img
src="{{ article_card_cover(item.image, item.pubkey) }}"
alt="{{ ('Illustration for ' ~ item.title)|e('html_attr') }}"
width="1200"
height="675"
loading="lazy"
decoding="async"
>
</div>
<div class="card-body">
<h2 class="card-title">{{ item.title }}</h2>
<p class="lede truncate">
{{ item.summary }}
</p>
</div>
</a>
</article>
{% endfor %}
</div>
{% endif %}
</div>