<style type="text/css">
.cs-list-default.cs-list-default-thumb-sm .cs-li-date-block {
width: 64px;
}
.cs-list-default.cs-list-default-thumb-md .cs-li-date-block {
width: 120px;
}
.cs-list-default.cs-list-default-thumb-lg .cs-li-date-block {
width: 250px;
}
</style>
<div class="row">
<div class="col-md-12">
<h2>{{ vars.department.name }} Feed</h2>
</div>
</div>
<div class="row">
{# <div class="col-md-4 quick-links">#}
{# <ul class="csw#}
{# cs-icon-group-stacked#}
{# cs-icon-sm#}
{# cs-icon-left#}
{# cs-icon-default#}
{# cs-icon-bg-default#}
{# cs-icon-text-default#}
{# ">#}
{# <li class="cs-icon-wrap">#}
{# <a href="#">#}
{# <em class="cs-icon fa fa-file-text-o" aria-hidden="true"></em>#}
{# <span class="cs-icon-text">Feed</span>#}
{# </a>#}
{# </li>#}
{# <li class="cs-icon-wrap">#}
{# <a href="#">#}
{# <em class="cs-icon fa fa-calendar" aria-hidden="true"></em>#}
{# <span class="cs-icon-text">Calendar</span>#}
{# </a>#}
{# </li>#}
{# <li class="cs-icon-wrap">#}
{# <a href="#">#}
{# <em class="cs-icon fa fa-suitcase" aria-hidden="true"></em>#}
{# <span class="cs-icon-text">Media</span>#}
{# </a>#}
{# </li>#}
{# </ul>#}
{# </div>#}
<div class="col-md-12">
<div class="csmw cs-news-list-default">
{% for result in results %}
{% set entry = result.entry %}
{% set school = entry.department|schoolify %}
{% set link = web_url_view(entry, true) ?: '#' %}
{% set opener = (result.link is defined and result.link and result.linkExternal) %}
<div class="cs-list-default cs-list-default-thumb-md">
<div class="cs-li-default">
{% if entry.type == 'event' %}
<div class="cs-li-date-block">
<div class="cs-li-date-block-month">{{ result.startsAt|cms_dt('M')|upper }}</div>
<div class="cs-li-date-block-date">{{ result.stopsAt|cms_dt('j') }}</div>
</div>
{% else %}
<div class="cs-li-default-image">
{% set thumb = 'https://via.placeholder.com/150' %}
{% if entry.media|length > 0 %}
{% do entry.media.feature|decorate_media %}
{% if entry.type is same as('video') %}
{% set thumb = entry.media.feature._urls.thumbs.default %}
{% else %}
{% set thumb = entry.media.feature._urls.thumb %}
{% endif %}
{% endif %}
<img
src="{{ thumb }}"
onclick="return Campussuite.Tools.jslink('{{- link|e('js') -}}', {{ opener ? 'true' : 'false' }});"
onkeypress="return Campussuite.Tools.jslink('{{- link|e('js') -}}', {{ opener ? 'true' : 'false' }});"
tabindex="-1"
alt=""
/>
</div>
{% endif %}
<div class="cs-li-default-wrap">
<div class="cs-li-default-heading">
<h3 class="cs-li-default-title">
<a href="{{- link|e('html_attr') -}}"{% if opener %} target="_blank"{% endif %}>
{{- entry.label -}}
</a>
</h3>
{% if entry.type == 'event' %}
{% set dts = result|cms_calendar_span({
dateFormat: 'M j, Y',
timeFormat: 'g:i A',
}) %}
{% if dts.hasStartOrEnd %}
{% include cms_theme_override('/includes/calendarEventItem.html.twig') with {
dts: dts,
primaryClass: 'cs-li-default-meta',
startLabel: (dts.multiday) ? 'Start:' : null,
endLabel: (dts.multiday) ? 'End:': null,
showStartDate: (dts.multiday),
showEndDate: (dts.multiday),
separator: ( not (dts.allday or dts.multiday) and dts.hasStartTimeAndEndTime) ? '-' : null,
} %}
{% endif %}
{% else %}
<div class="cs-li-default-meta">
<span class="cs-li-default-date">{{ entry.timestamp|cms_date }}</span>
</div>
{% endif %}
</div>
{% set body = cms_abstract(result.blurb, entry.preview)|trim %}
{% if body is not empty %}
<div class="cs-li-default-body">
<p>{{ body }}</p>
</div>
{% endif %}
</div>
</div>
</div>
{% endfor %}
</div>
{% include cms_theme_override('/includes/sn/pagination.html.twig', vars.theme) %}
</div>
</div>