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.
32 lines
1.4 KiB
32 lines
1.4 KiB
{% if article is defined %} |
|
<div class="card"> |
|
<div class="metadata"> |
|
{% if not is_author_profile and app.current_route != 'latest_articles' %} |
|
{% set pubkey = article.pubkey %} |
|
{% set user = authors_metadata[pubkey] ?? null %} |
|
<p>by <twig:Molecules:UserFromNpub :user="user" :ident="pubkey" /></p> |
|
{% endif %} |
|
<small>{{ article.createdAt|date('F j Y') }}</small> |
|
</div> |
|
{% set link = path('article-slug', {slug: article.slug|url_encode }) %} |
|
{% if cat and mag %} |
|
{% set link = path('magazine-category-article', {slug: article.slug|url_encode, cat: cat, mag: mag}) %} |
|
{% endif %} |
|
<a href="{{ link }}"> |
|
<div class="card-header"> |
|
{% if article.image %} |
|
<img src="{{ article.image }}" alt="Cover image for {{ article.title }}" onerror="this.style.display='none';" > |
|
{% endif %} |
|
</div> |
|
<div class="card-body"> |
|
<h2 class="card-title">{{ article.title }}</h2> |
|
{% if article.summary %} |
|
<p class="lede line-clamp-5"> |
|
{{ article.summary }} |
|
</p> |
|
{% endif %} |
|
</div> |
|
</a> |
|
<div class="card-footer"></div> |
|
</div> |
|
{% endif %}
|
|
|