themes/bases/Campussuite2015/widgets/ModuleNewsList/build/sn.html.twig line 1

Open in your IDE?
  1. <div class="csmw cs-news-list-default">
  2.     {% if _widget.heading is not empty %}
  3.         <div class="cs-widget-header">
  4.             <div class="cs-widget-header-heading">
  5.                 <{{ _widget.headingSize|default('h2') }} class="cs-widget-header-title">{{ _widget.heading }}</{{ _widget.headingSize|default('h2') }}>
  6.             </div>
  7.             {% if _widget.description is not empty %}
  8.                 <div class="cs-widget-header-body">{{ _widget.description }}</div>
  9.             {% endif %}
  10.         </div>
  11.     {% endif %}
  12.     {% if items|length > 0 %}
  13.         <div class="cs-list-default{% if _widget.thumbnails is not same as('na') %} cs-list-default-thumb-{{ _widget.thumbnails|default('md') }}{% endif %}">
  14.             {% for item in items %}
  15.                 {% set item_link = web_url_view(item, true) ?: '#' %}
  16.                 {% set item_opener = (item.link and item.linkExternal) %}
  17.                 <div class="cs-li-default">
  18.                     {% if _widget.thumbnails is not same as('na') %}
  19.                         {% set item_feature = item.feature|decorate_media %}
  20.                         <div class="cs-li-default-image">
  21.                             <img
  22.                                 src="{{- item_feature
  23.                                     ? item_feature._urls.tiny
  24.                                     : cms_placeholderUrl('MASKS__RECTANGLE__SMALL', 'news')
  25.                                 -}}"
  26.                                 onclick="return Campussuite.Tools.jslink('{{- item_link|e('js') -}}', {{ item_opener ? 'true' : 'false' }});"
  27.                                 onkeypress="return Campussuite.Tools.jslink('{{- item_link|e('js') -}}', {{ item_opener ? 'true' : 'false' }});"
  28.                                 tabindex="-1"
  29.                                 alt="{{- item_feature ? item_feature.alt : '' -}}"
  30.                             />
  31.                         </div>
  32.                     {% endif %}
  33.                     <div class="cs-li-default-wrap">
  34.                         <div class="cs-li-default-heading">
  35.                             <{{ _widget.titleSizes|default('h3') }} class="cs-li-default-title">
  36.                                 <a href="{{- item_link|e('html_attr') -}}"{% if item_opener %} target="_blank"{% endif %}>{{ item.headline }}</a>
  37.                             </{{ _widget.titleSizes|default('h3') }}>
  38.                             {% if _widget.timestamps is same as(true) %}
  39.                                 <div class="cs-li-default-meta">
  40.                                     <span class="cs-li-default-date">{{ item.createdAt|cms_date }}</span>
  41.                                 </div>
  42.                             {% endif %}
  43.                         </div>
  44.                         {% if _widget.teasers is same as(true) %}
  45.                             {% set bdy = cms_abstract(null, item.html) %}
  46.                             {% if bdy is not empty %}
  47.                                 <div class="cs-li-default-body">
  48.                                     <p>{{ bdy }}</p>
  49.                                     {% if _widget.readLinks is same as(true) %}
  50.                                         <p class="cs-li-default-link">
  51.                                             <a class="cs-li-default-more-link" tabindex="-1" aria-hidden="true" href="#" onclick="return Campussuite.Tools.jslink('{{- item_link|e('js') -}}', {{ item_opener ? 'true' : 'false' }});">
  52.                                                 Read Article
  53.                                                 <span class="sr-only">{{ item.headline }}</span>
  54.                                             </a>
  55.                                         </p>
  56.                                     {% endif %}
  57.                                 </div>
  58.                             {% endif %}
  59.                         {% endif %}
  60.                     </div>
  61.                 </div>
  62.             {% endfor %}
  63.         </div>
  64.     {% else %}
  65.         <div class="cs-data-na">
  66.             <p>We're sorry, no articles were found for this listing.</p>
  67.         </div>
  68.     {% endif %}
  69.     {% if _widget.linkText is not empty or _widget.showSubscribe is same as(true) %}
  70.         <div class="csw-footer">
  71.             {% if _widget.linkText is not empty %}
  72.                 <a href="{{- (web_url_landing(container, module) ?: '#')|e('html_attr') -}}" class="csw-view-more">{{ _widget.linkText }}</a>
  73.             {% endif %}
  74.             {% if _widget.showSubscribe is same as(true) %}
  75.                 <a href="{{- (web_url_subscribe(container, module) ?: '#')|e('html_attr') -}}" class="csw-rss">Subscribe to News</a>
  76.             {% endif %}
  77.         </div>
  78.     {% endif %}
  79. </div>