themes/bases/Campussuite2015/controllers/feed/landing.html.twig line 1

Open in your IDE?
  1. <style type="text/css">
  2.     .cs-list-default.cs-list-default-thumb-sm .cs-li-date-block {
  3.         width: 64px;
  4.     }
  5.     .cs-list-default.cs-list-default-thumb-md .cs-li-date-block {
  6.         width: 120px;
  7.     }
  8.     .cs-list-default.cs-list-default-thumb-lg .cs-li-date-block {
  9.         width: 250px;
  10.     }
  11. </style>
  12. <div class="row">
  13.     <div class="col-md-12">
  14.         <h2>{{ vars.department.name }} Feed</h2>
  15.     </div>
  16. </div>
  17. <div class="row">
  18. {#    <div class="col-md-4 quick-links">#}
  19. {#        <ul class="csw#}
  20. {#            cs-icon-group-stacked#}
  21. {#            cs-icon-sm#}
  22. {#            cs-icon-left#}
  23. {#            cs-icon-default#}
  24. {#            cs-icon-bg-default#}
  25. {#            cs-icon-text-default#}
  26. {#        ">#}
  27. {#            <li class="cs-icon-wrap">#}
  28. {#                <a href="#">#}
  29. {#                    <em class="cs-icon fa fa-file-text-o" aria-hidden="true"></em>#}
  30. {#                    <span class="cs-icon-text">Feed</span>#}
  31. {#                </a>#}
  32. {#            </li>#}
  33. {#            <li class="cs-icon-wrap">#}
  34. {#                <a href="#">#}
  35. {#                    <em class="cs-icon fa fa-calendar" aria-hidden="true"></em>#}
  36. {#                    <span class="cs-icon-text">Calendar</span>#}
  37. {#                </a>#}
  38. {#            </li>#}
  39. {#            <li class="cs-icon-wrap">#}
  40. {#                <a href="#">#}
  41. {#                    <em class="cs-icon fa fa-suitcase" aria-hidden="true"></em>#}
  42. {#                    <span class="cs-icon-text">Media</span>#}
  43. {#                </a>#}
  44. {#            </li>#}
  45. {#        </ul>#}
  46. {#    </div>#}
  47.     <div class="col-md-12">
  48.         <div class="csmw cs-news-list-default">
  49.             {% for result in results %}
  50.                 {% set entry = result.entry %}
  51.                 {% set school = entry.department|schoolify %}
  52.                 {% set link = web_url_view(entry, true) ?: '#' %}
  53.                 {% set opener = (result.link is defined and result.link and result.linkExternal) %}
  54.                 <div class="cs-list-default cs-list-default-thumb-md">
  55.                     <div class="cs-li-default">
  56.                         {% if entry.type == 'event' %}
  57.                             <div class="cs-li-date-block">
  58.                                 <div class="cs-li-date-block-month">{{ result.startsAt|cms_dt('M')|upper }}</div>
  59.                                 <div class="cs-li-date-block-date">{{ result.stopsAt|cms_dt('j') }}</div>
  60.                             </div>
  61.                         {% else %}
  62.                             <div class="cs-li-default-image">
  63.                                 {% set thumb = 'https://via.placeholder.com/150' %}
  64.                                 {% if entry.media|length > 0 %}
  65.                                     {% do entry.media.feature|decorate_media %}
  66.                                     {% if entry.type is same as('video') %}
  67.                                         {% set thumb = entry.media.feature._urls.thumbs.default %}
  68.                                     {% else %}
  69.                                         {% set thumb = entry.media.feature._urls.thumb %}
  70.                                     {% endif %}
  71.                                 {% endif %}
  72.                                 <img
  73.                                     src="{{ thumb }}"
  74.                                     onclick="return Campussuite.Tools.jslink('{{- link|e('js') -}}', {{ opener ? 'true' : 'false' }});"
  75.                                     onkeypress="return Campussuite.Tools.jslink('{{- link|e('js') -}}', {{ opener ? 'true' : 'false' }});"
  76.                                     tabindex="-1"
  77.                                     alt=""
  78.                                 />
  79.                             </div>
  80.                         {% endif %}
  81.                         <div class="cs-li-default-wrap">
  82.                             <div class="cs-li-default-heading">
  83.                                 <h3 class="cs-li-default-title">
  84.                                     <a href="{{- link|e('html_attr') -}}"{% if opener %} target="_blank"{% endif %}>
  85.                                         {{- entry.label -}}
  86.                                     </a>
  87.                                 </h3>
  88.                                 {% if entry.type == 'event' %}
  89.                                     {% set dts = result|cms_calendar_span({
  90.                                         dateFormat: 'M j, Y',
  91.                                         timeFormat: 'g:i A',
  92.                                     }) %}
  93.                                     {% if dts.hasStartOrEnd %}
  94.                                         {% include cms_theme_override('/includes/calendarEventItem.html.twig') with {
  95.                                             dts: dts,
  96.                                             primaryClass: 'cs-li-default-meta',
  97.                                             startLabel: (dts.multiday) ? 'Start:' : null,
  98.                                             endLabel: (dts.multiday) ? 'End:': null,
  99.                                             showStartDate: (dts.multiday),
  100.                                             showEndDate: (dts.multiday),
  101.                                             separator: ( not (dts.allday or dts.multiday) and dts.hasStartTimeAndEndTime) ? '-' : null,
  102.                                         } %}
  103.                                     {% endif %}
  104.                                 {% else %}
  105.                                     <div class="cs-li-default-meta">
  106.                                         <span class="cs-li-default-date">{{ entry.timestamp|cms_date }}</span>
  107.                                     </div>
  108.                                 {% endif %}
  109.                             </div>
  110.                             {% set body = cms_abstract(result.blurb, entry.preview)|trim %}
  111.                             {% if body is not empty %}
  112.                                 <div class="cs-li-default-body">
  113.                                     <p>{{ body }}</p>
  114.                                 </div>
  115.                             {% endif %}
  116.                         </div>
  117.                     </div>
  118.                 </div>
  119.             {% endfor %}
  120.         </div>
  121.         {% include cms_theme_override('/includes/sn/pagination.html.twig', vars.theme) %}
  122.     </div>
  123. </div>