custom/plugins/NetzpBlog6/src/Resources/views/storefront/page/blog/post-image-small.html.twig line 1

Open in your IDE?
  1. {% block blog_content_post_wrapper %}
  2. <div class="row mb-5">
  3.     {% block blog_content_post_inner_wrapper %}
  4.     <div class="col-md-8">
  5.         {% if config.showmeta %}
  6.             {% sw_include "@Storefront/storefront/page/blog/post-meta.html.twig" %}
  7.         {% endif %}
  8.         {% block blog_content_post_inner_title %}
  9.             <h2>{{ post.translated.title }}</h2>
  10.         {% endblock %}
  11.         {% block blog_content_post_inner_contents %}
  12.             {{ render_blog_listing_template(post.translated.contents, post)|raw }}
  13.         {% endblock %}
  14.         {% block blog_content_post_inner_author %}
  15.             {% if config.showmeta and config.showauthor %}
  16.                 {% sw_include "@Storefront/storefront/page/blog/post-author.html.twig" %}
  17.             {% endif %}
  18.         {% endblock %}
  19.     </div>
  20.     {% endblock %}
  21.     {% if post.image %}
  22.         {% block blog_content_post_inner_image %}
  23.             <div class="col-md-4 mt-3 mt-md-0">
  24.                 {% if post.image.mediaType.name == 'IMAGE' %}
  25.                     {% sw_thumbnails 'blog_small_image_thumbnail' with {
  26.                         media: post.image,
  27.                         sizes: {
  28.                             'xs': '501px',
  29.                             'sm': '315px',
  30.                             'md': '427px',
  31.                             'lg': '333px',
  32.                             'xl': '284px',
  33.                             'default': '100vw'
  34.                         },
  35.                         attributes: {
  36.                             'class': 'img-fluid',
  37.                             'alt':   post.image.translated.alt ?: '',
  38.                             'title': post.translated.title ?: ''
  39.                         }
  40.                     } %}
  41.                 {% elseif post.image.mediaType.name == 'VIDEO' %}
  42.                     <video class="card-img-top {{ thumbnailClass }}" controls>
  43.                         <source src="{{ post.image.url }}" type="{{ post.image.mimetype }}">
  44.                         Your browser does not support HTML5 video.
  45.                     </video>
  46.                 {% endif %}
  47.             </div>
  48.         {% endblock %}
  49.     {% endif %}
  50. </div>
  51. {% endblock %}