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.
31 lines
1.4 KiB
31 lines
1.4 KiB
{% if article is defined %} |
|
<div class="card"> |
|
<div class="metadata"> |
|
{% if category %} |
|
<small>{{ category }}</small> |
|
{% else %} |
|
{% if not is_author_profile %} |
|
<p>by <twig:Molecules:UserFromNpub ident="{{ article.pubkey }}" /></p> |
|
{% endif %} |
|
<small>{{ article.createdAt|date('F j Y') }}</small> |
|
{% endif %} |
|
</div> |
|
<a href="{{ (article.pubkey and npub_from_hex(article.pubkey) != '') ? path('article', { npub: npub_from_hex(article.pubkey), slug: article.slug }) : path('article-legacy-redirect', { slug: article.slug }) }}"> |
|
<div class="card-header"> |
|
{% if category %}<small class="text-uppercase">{{ category }}</small>{% endif %} |
|
{% 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"> |
|
{{ article.summary }} |
|
</p> |
|
{% endif %} |
|
</div> |
|
</a> |
|
<div class="card-footer"></div> |
|
</div> |
|
{% endif %}
|
|
|