templates/document/card-carousel/blog-post-card.html.twig line 1

Open in your IDE?
  1. <div class="col{% if layoutMode == 'horizontal' %} col-lg-4 col-md-4{% else %} col-lg-6 col-md-6{% endif %} col-sm-6 col-xs-12 case-studies">
  2.   {% set blogPostLink = app_blog_post_link(blogPost) %}
  3.   <a href="{{ blogPostLink }}" class="card-link">
  4.     <div class="card--inner card--blog-post">
  5.       <div class="row no-gutter">
  6.         {% set featureImagePosition = blogPost.getFeatureImagePosition() == 'left' ? 'object-position:left;' : blogPost.getFeatureImagePosition() == 'right' ? 'object-position:right;' : '' %} 
  7.         {% if blogPost.getFeaturedImage() %}
  8.         <div class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
  9.           <div class="feat-img-container">
  10.             {{ blogPost.getFeaturedImage().getThumbnail('width_500').getHtml({
  11.               imgAttributes: {
  12.                 class: "img--object-cover",
  13.                 style: featureImagePosition,
  14.               }
  15.             })|raw }}
  16.           </div>
  17.         </div>
  18.         {% endif %}
  19.         <div class="{% if blogPost.getFeaturedImage() %}col-lg-8 col-md-8{% else %}col-lg-12 col-md-12{% endif %} col-sm-8 col-xs-8">
  20.           <div class="padding-2em">
  21.             <div class="position-relative card-content-container">
  22.               <div class="absolute-top-right">
  23.                 {{ source("@torq_static/img/icons/arrow-right.svg") }}
  24.               </div>
  25.               {# <div class="tag">
  26.                 <p>Blog Post</p>
  27.               </div> #}
  28.               {% if blogPost.getSolutions() %}
  29.               <div class="tags">
  30.                 <i class="fa fa-tag"></i> {{ blogPost.getSolutions()|join(', ') }}
  31.               </div>
  32.               {% endif %}
  33.               <h3{% if not blogPost.getSolutions() %} style="max-width: calc(100% - 60px);"{% endif %}>{{ blogPost.getTitle() }}</h3>
  34.               {% set blogDate = blogPost.getDate().format('F j, Y') %}
  35.               <p class="meta--date">{{ blogDate }}</p>
  36.             </div>
  37.           </div>
  38.         </div>
  39.       </div>
  40.     </div>
  41.   </a>
  42. </div>