{% block sas_blog_card %}
<article class="card blog-card">
{% block sas_blog_card_teaser_image %}
<a href="{{ seoUrl('sas.frontend.blog.detail', {'articleId': article.id}) }}"
title="{{ article.translated.title }}"
class="blog-image-link">
{% if article.media.url %}
{% set attributes = {
'class': 'blog-image card-img-top',
'alt': (article.media.translated.alt ?: article.media.fileName),
'title': (article.media.translated.title ?: article.media.fileName)
} %}
{% sw_thumbnails 'blog-image-thumbnails' with {
media: article.media,
sizes: {
'xs': '330px',
'sm': '650px',
'md': '650px',
'lg': '650px',
'xl': '900px',
}
} %}
{% else %}
<div class="blog-image-placeholder">
{% sw_icon 'placeholder' style {
'size': 'fluid'
} %}
</div>
{% endif %}
</a>
{% endblock %}
{% block sas_blog_card_body %}
<div class="card-body">
<div class="d-flex flex-column">
{% block sas_blog_card_title_date %}
<p class="mt-2 mb-1 d-flex align-items-center blog-date">
<small>{{ article.publishedAt|format_date('short', locale=app.request.locale) }}</small>
</p>
{% endblock %}
{% block sas_blog_card_title %}
<h2 class="card-title mt-0">
{% block sas_blog_card_title_link %}
<a href="{{ seoUrl('sas.frontend.blog.detail', { articleId: article.id }) }}"
title="{{ article.translated.title }}"
class="text-decoration-none">
{{ article.translated.title }}
</a>
{% endblock %}
</h2>
{% endblock %}
</div>
{% block sas_blog_card_teaser %}
<p class="card-text font-size-small mb-0">{{ article.translated.teaser }}</p>
{% endblock %}
</div>
{% endblock %}
{% block sas_blog_card_footer %}
<div class="card-footer text-muted">
{% block sas_blog_card_footer_author %}
{% if config('SasBlogModule').config.showAuthor %}
{% if article.blogAuthor.media.url %}
{% set attributes = {
'class': 'blog-author-avatar',
'alt': (article.blogAuthor.media.translated.alt ?: article.blogAuthor.media.fileName),
'title': (article.blogAuthor.media.translated.title ?: article.blogAuthor.media.fileName)
} %}
{% sw_thumbnails 'blog-author-avatar-thumbnails' with {
media: article.blogAuthor.media,
sizes: {
'xs': '80px'
}
} %}
{% else %}
<div class="blog-image-placeholder">
{% sw_icon 'placeholder' style {
'size': 'fluid'
} %}
</div>
{% endif %}
<p class="blog-author-display-name">{{ article.blogAuthor.displayName }}<br>
<small class="text-muted">{{ article.blogAuthor.blogEntries|length }} {{ 'sas-blog.box.author.countEntries'|trans|sw_sanitize }}</small>
</p>
{% endif %}
{% endblock %}
</div>
{% endblock %}
</article>
{% endblock %}