custom/plugins/SasBlogModule/src/Resources/views/storefront/component/blog/card/box.html.twig line 1

Open in your IDE?
  1. {% block sas_blog_card %}
  2.     <article class="card blog-card">
  3.         {% block sas_blog_card_teaser_image %}
  4.             <a href="{{ seoUrl('sas.frontend.blog.detail', {'articleId': article.id}) }}"
  5.                    title="{{ article.translated.title }}"
  6.                    class="blog-image-link">
  7.                     {% if article.media.url %}
  8.                         {% set attributes = {
  9.                             'class': 'blog-image card-img-top',
  10.                             'alt': (article.media.translated.alt ?: article.media.fileName),
  11.                             'title': (article.media.translated.title ?: article.media.fileName)
  12.                         } %}
  13.                         {% sw_thumbnails 'blog-image-thumbnails' with {
  14.                             media: article.media,
  15.                             sizes: {
  16.                                 'xs': '330px',
  17.                                 'sm': '650px',
  18.                                 'md': '650px',
  19.                                 'lg': '650px',
  20.                                 'xl': '900px',
  21.                             }
  22.                         } %}
  23.                     {% else %}
  24.                         <div class="blog-image-placeholder">
  25.                             {% sw_icon 'placeholder' style {
  26.                                 'size': 'fluid'
  27.                             } %}
  28.                         </div>
  29.                     {% endif %}
  30.                 </a>
  31.         {% endblock %}
  32.         {% block sas_blog_card_body %}
  33.             <div class="card-body">
  34.                 <div class="d-flex flex-column">
  35.                     {% block sas_blog_card_title_date %}
  36.                         <p class="mt-2 mb-1 d-flex align-items-center blog-date">
  37.                             <small>{{ article.publishedAt|format_date('short', locale=app.request.locale) }}</small>
  38.                         </p>
  39.                     {% endblock %}
  40.                     {% block sas_blog_card_title %}
  41.                         <h2 class="card-title mt-0">
  42.                             {% block sas_blog_card_title_link %}
  43.                                 <a href="{{ seoUrl('sas.frontend.blog.detail', { articleId: article.id }) }}"
  44.                                    title="{{ article.translated.title }}"
  45.                                    class="text-decoration-none">
  46.                                     {{ article.translated.title }}
  47.                                 </a>
  48.                             {% endblock %}
  49.                         </h2>
  50.                     {% endblock %}
  51.                 </div>
  52.                 {% block sas_blog_card_teaser %}
  53.                     <p class="card-text font-size-small mb-0">{{ article.translated.teaser }}</p>
  54.                 {% endblock %}
  55.             </div>
  56.         {% endblock %}
  57.         {% block sas_blog_card_footer %}
  58.         <div class="card-footer text-muted">
  59.             {% block sas_blog_card_footer_author %}
  60.                 {% if config('SasBlogModule').config.showAuthor %}
  61.                     {% if article.blogAuthor.media.url %}
  62.                         {% set attributes = {
  63.                             'class': 'blog-author-avatar',
  64.                             'alt': (article.blogAuthor.media.translated.alt ?: article.blogAuthor.media.fileName),
  65.                             'title': (article.blogAuthor.media.translated.title ?: article.blogAuthor.media.fileName)
  66.                         } %}
  67.                         {% sw_thumbnails 'blog-author-avatar-thumbnails' with {
  68.                             media: article.blogAuthor.media,
  69.                             sizes: {
  70.                             'xs': '80px'
  71.                         }
  72.                             } %}
  73.                     {% else %}
  74.                         <div class="blog-image-placeholder">
  75.                             {% sw_icon 'placeholder' style {
  76.                                 'size': 'fluid'
  77.                                 } %}
  78.                         </div>
  79.                     {% endif %}
  80.                     <p class="blog-author-display-name">{{ article.blogAuthor.displayName }}<br>
  81.                         <small class="text-muted">{{ article.blogAuthor.blogEntries|length }} {{ 'sas-blog.box.author.countEntries'|trans|sw_sanitize }}</small>
  82.                     </p>
  83.                 {% endif %}
  84.             {% endblock %}
  85.         </div>
  86.         {% endblock %}
  87.     </article>
  88. {% endblock %}