templates/themes/ismart/block/featured-article.html.twig line 1

Open in your IDE?
  1. <section class= "home-info" >
  2.     <div class="container">
  3.         <div class="row justify-content-center">
  4.             <div class="col-md-10 col-12">
  5.                 <h2 class="page-title mb-3" data-aos="fade-up">{{ block.title | raw }}</h2>
  6.                 <p class="text-center page-description mb-5" >
  7.                     {{ block.description | striptags('p') | raw }}
  8.                 </p>
  9.             </div>
  10.         </div>
  11.         <div class="row">
  12.             <div class="col-12">
  13.                 {% if isMobile %}
  14.                     <div class="info-mobile-slide blaze-slider overflow-visible">
  15.                         <div class="blaze-container">
  16.                             <div class="blaze-track-container">
  17.                                 <div class="blaze-track">
  18.                                     {% set articles = getFeaturedArticle() %}
  19.                                     {% for entity in articles %}
  20.                                         <a
  21.                                                 href="{{ forceSSL(url('frontend_site_post_detail',{slug:entity.post.slug })) }}"
  22.                                                 target="_blank">
  23.                                             <div class="card">
  24.                                                 <picture class="feature-card-img-top card-img-top picture-lazy">
  25.                                                     <img
  26.                                                             loading="lazy"
  27.                                                             src="{{ getImageWebp(getImageBySize(entity.post.image, 'small')) }}"
  28.                                                             data-src="{{ getImageWebp(getImageBySize(entity.post.image, 'thumb')) }}"
  29.                                                             alt="" class="d-block w-100 h-100">
  30.                                                 </picture>
  31.                                                 <div class="card-body">
  32.                                                     <h5 class="card-title">{{ entity.post.title }}</h5>
  33.                                                 </div>
  34.                                             </div>
  35.                                         </a>
  36.                                     {% endfor %}
  37.                                 </div>
  38.                             </div>
  39.                             <div class="blaze-pagination d-flex align-items-center justify-content-center flex-row"></div>
  40.                         </div>
  41.                     </div>
  42.                 {% else %}
  43.                     <div class="info-slide">
  44.                         {% set articles = getFeaturedArticle() %}
  45.                         {% for entity in articles %}
  46.                             <a
  47.                                     href="{{ forceSSL(url('frontend_site_post_detail',{slug:entity.post.slug })) }}"
  48.                                     target="_blank">
  49.                                 <div class="card">
  50.                                     <picture class="feature-card-img-top card-img-top picture-lazy">
  51.                                         <img
  52.                                                 loading="lazy"
  53.                                                 src="{{ getImageWebp(getImageBySize(entity.post.image, 'small')) }}"
  54.                                                 data-src="{{ getImageWebp(getImageBySize(entity.post.image, 'feature')) }}"
  55.                                                 alt="" class="d-block w-100 h-100">
  56.                                     </picture>
  57.                                     <div class="card-body"><h5 class="card-title">{{ entity.post.title }}</h5>
  58.                                         <p class="card-text">{{ entity.post.description }}</p>
  59.                                         <span href="#" class="btn btn-primary">Go somewhere</span>
  60.                                     </div>
  61.                                 </div>
  62.                             </a>
  63.                         {% endfor %}
  64.                     </div>
  65.                 {% endif %}
  66.             </div>
  67.         </div>
  68.     </div>
  69. </section>