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.
 
 
 
 
 
 

30 lines
1.2 KiB

{% if article is defined %}
<div class="card">
<div class="metadata">
{% if not is_author_profile %}
<p>by <twig:Molecules:UserFromNpub ident="{{ article.pubkey }}" /></p>
{% endif %}
<small>{{ article.createdAt|date('F j Y') }}</small>
</div>
{% set link = path('article-slug', {slug: article.slug}) %}
{% if cat and mag %}
{% set link = path('magazine-category-article', {slug: article.slug, 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 %}