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