<div class="csmw cs-events-list-default">
{% if _widget.heading is not empty %}
<div class="cs-widget-header">
<div class="cs-widget-header-heading">
<{{ _widget.headingSize|default('h2') }} class="cs-widget-header-title">{{ _widget.heading }}</{{ _widget.headingSize|default('h2') }}>
</div>
{% if _widget.description is not empty %}
<div class="cs-widget-header-body">{{ _widget.description }}</div>
{% endif %}
</div>
{% endif %}
{% if items|length > 0 %}
<div class="cs-list-default">
{% for item in items %}
<div class="cs-li-default">
{% if _widget.thumbnails is not same as('na') %}
{% if _widget.thumbnails is same as('datebox') or _widget.thumbnails is empty %}
<div class="cs-li-date-block">
<div class="cs-li-date-block-month">{{ item.data.startDate|cms_dt('M')|upper }}</div>
<div class="cs-li-date-block-date">{{ item.data.startDate|cms_dt('j') }}</div>
</div>
{% endif %}
{% endif %}
<div class="cs-li-default-wrap">
<div class="cs-li-default-heading">
<{{ _widget.titleSizes|default('h3') }} class="cs-li-default-title">
<a href="{{ cms_path_prefix(containers) }}/calendar/{{ item.id }}/{{ item.data.slug }}">{{ item.data.title }}</a>
</{{ _widget.titleSizes|default('h3') }}>
{% if _widget.timestamps is same as(true) %}
{% set dts = item|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: (_widget.thumbnails is same as('na') or dts.multiday),
showEndDate: (dts.multiday),
separator: ( not (dts.allday or dts.multiday) and dts.hasStartTimeAndEndTime) ? '-' : null
} %}
{% endif %}
{% endif %}
</div>
{% if _widget.teasers is same as(true) %}
{% set bdy = cms_abstract(item.data.abstract, item.data.description) %}
{% if bdy is not empty %}
<div class="cs-li-default-body">
<p>{{ bdy }}</p>
{% if _widget.readLinks is same as(true) %}
<p class="cs-li-default-link">
<a href="{{ cms_path_prefix(containers) }}/calendar/{{ item.id }}/{{ item.data.slug }}">Event Details</a>
</p>
{% endif %}
</div>
{% endif %}
{% endif %}
</div>
</div>
{% endfor %}
</div>
{% else %}
<div class="cs-data-na">
<p>We're sorry, no events were found for this calendar.</p>
</div>
{% endif %}
{% if _widget.linkText is not empty or _widget.showSubscribe is same as(true) %}
<div class="csw-footer">
{% if _widget.linkText is not empty %}
<a href="{{ cms_path_prefix(containers) }}/calendar" class="csw-view-more">{{ _widget.linkText }}</a>
{% endif %}
{% if _widget.showSubscribe is same as(true) %}
<a href="{{ cms_path_prefix(containers) }}/calendar/subscribe" class="csw-rss">Subscribe</a>
{% endif %}
</div>
{% endif %}
{% include cms_theme_override('/includes/calendarEventItemModalTrigger.html.twig') %}
</div>