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.
50 lines
2.6 KiB
50 lines
2.6 KiB
{# |
|
NIP-51 30004 home strip: section title from list `title` tag; each item reads like a static landing |
|
section — illustration (max 400px, natural aspect), headline, then full article body (Markdown + |
|
highlights as on /p/…/d/…). Body is not wrapped in a single <a> (markdown may contain links). |
|
#} |
|
{% if tiles is not empty %} |
|
<section |
|
class="home-curation-landmark" |
|
{% if section_title|default('') != '' %} |
|
aria-labelledby="home-curation-landmark-heading" |
|
{% else %} |
|
aria-label="{{ (website_name ~ ' — curated articles')|e('html_attr') }}" |
|
{% endif %} |
|
> |
|
{% if section_title|default('') != '' %} |
|
<h2 id="home-curation-landmark-heading" class="home-curation-landmark__title">{{ section_title|e }}</h2> |
|
{% endif %} |
|
<div class="home-curation-landmark__articles"> |
|
{% for tile in tiles %} |
|
{% set item = tile.article %} |
|
{% set article_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 }) %} |
|
<article class="curation-article-display"> |
|
<div class="curation-article-display__pane"> |
|
<div class="curation-article-display__media"> |
|
<a href="{{ article_href }}" tabindex="-1" aria-hidden="true"> |
|
<img |
|
src="{{ article_card_cover(item.image, item.pubkey) }}" |
|
alt="{{ ('Illustration for ' ~ item.title)|e('html_attr') }}" |
|
loading="{{ loop.first ? 'eager' : 'lazy' }}" |
|
decoding="async" |
|
> |
|
</a> |
|
</div> |
|
<div class="curation-article-display__body"> |
|
<h3 class="curation-article-display__headline"> |
|
<a class="curation-article-display__title-link" href="{{ article_href }}">{{ item.title|e }}</a> |
|
</h3> |
|
<div |
|
class="article-main curation-article-display__main" |
|
data-controller="user-highlight-tooltip" |
|
> |
|
{{ tile.body_html|raw }} |
|
</div> |
|
</div> |
|
</div> |
|
</article> |
|
{% endfor %} |
|
</div> |
|
</section> |
|
{% endif %}
|
|
|