themes/bases/Campussuite2015/modules/News/View/build/sn.html.twig line 1

Open in your IDE?
  1. <div class="cs-module csm-news-article-feature">
  2.     <div class="csm-news-article">
  3.         <div class="csm-news-article-heading">
  4.             <h1 class="csm-news-article-title">{{ item.headline }}</h1>
  5.         </div>
  6.         <ul class="csm-news-article-meta">
  7.             <li class="csm-news-article-date">Posted {{ item.createdAt|cms_date }}</li>
  8.         </ul>
  9.         <div class="csm-news-article-body">
  10.             {% if item.media|length %}
  11.                 {% set images = item.media.features|decorate_media %}
  12.                 {% if images|length == 1 -%}
  13.                     <figure class="csm-news-article-img-inline">
  14.                         <img
  15.                             src="{{- images[0]._urls.medium -}}"
  16.                             alt="{{ images[0].alt }}"
  17.                         />
  18.                         {% if images[0].note -%}
  19.                             <figcaption class="cs-img-caption"><p>{{- images[0].note -}}</p></figcaption>
  20.                         {% endif -%}
  21.                     </figure>
  22.                 {% else %}
  23.                     <div class="csm-news-article-img-inline">
  24.                         <div id="news-carousel" class="carousel" data-ride="carousel" data-interval="false">
  25.                             <div class="carousel-inner">
  26.                                 {% for image in images %}
  27.                                     <div class="item {% if loop.first %}active{% endif %}">
  28.                                         <img
  29.                                             src="{{- image._urls.medium -}}"
  30.                                             alt="{{- image.alt|default(null) -}}"
  31.                                         />
  32.                                         {% if image.note|default(null) -%}
  33.                                             <div class="carousel-caption">
  34.                                                 <p>{{ image.note }}</p>
  35.                                             </div>
  36.                                         {% endif %}
  37.                                     </div>
  38.                                 {% endfor %}
  39.                             </div>
  40.                             <a style="display: flex; align-items: center;" class="left carousel-control" href="#news-carousel" role="button" data-slide="prev">
  41.                                 <span style="margin-left: auto; margin-right: auto;" class="fa fa-chevron-left" aria-hidden="true"></span>
  42.                                 <span class="sr-only">Previous</span>
  43.                             </a>
  44.                             <a style="display: flex; align-items: center;" class="right carousel-control" href="#news-carousel" role="button" data-slide="next">
  45.                                 <span style="margin-left: auto; margin-right: auto;" class="fa fa-chevron-right" aria-hidden="true"></span>
  46.                                 <span class="sr-only">Next</span>
  47.                             </a>
  48.                         </div>
  49.                     </div>
  50.                     <script>
  51.                         Campussuite.Tools.injectSources('{{ assett('bootstrap::/dist/js/bootstrap.min.js') }}');
  52.                     </script>
  53.                 {% endif %}
  54.             {% endif %}
  55.             {{ item.html|raw }}
  56.         </div>
  57.     </div>
  58. </div>