{% set draft = _args.draft|default(false) %}
{% set modal = _args.modal|default(null) %}
{% set link = _args.link|default('#') %}
{% set target = _args.target|default(null) %}
{% set title = _args.title %}
{% set preview = _args.preview|default(null) %}
{% set feature = _args.feature|default(null) %}
{% set more = (_args.more is defined) ? (not not _args.more) : true %}
{% set scheduledAt = _args.scheduledAt|default(null) %}
<div class="feedsbox{% if draft %}{% if scheduledAt %} feedsbox--scheduled{% else%} feedsbox--unpublished{% endif %}{% endif %} feedbox__calendar">
<div class="feedsbox__inner">
{% include '@ui2022/schoolnow/feed__item__meta.html.twig' with _args %}
<div class="feedbox__content">
<a
class="feedbox__title"
href="{{ link|e('html_attr') }}"
{% if target %}target="{{ target }}"{% endif %}
{% if modal -%}
data-toggle="modal"
data-target="#{{ modal }}"
{%- endif %}
>
<h3>{{ title }}</h3>
</a>
{% if preview %}
<div class="feedbox__excerpt">
<p>{{ preview|raw }}{% if not (preview matches '/[[:punct:]]$/') %}…{% endif %}</p>
{% if more %}
<a class="readmore" href="{{ link }}"{% if modal %} data-toggle="modal" data-target="#{{ modal }}"{% endif %}>Read more</a>
{% endif %}
</div>
{% endif %}
</div>
{% if feature %}
<div class="feedbox__media media__single">
<a class="feedbox__media--link" href="{{ link }}"{% if modal %} data-toggle="modal" data-target="#{{ modal }}"{% endif %}>
<img src="{{ (feature|decorate_media)._urls.preview }}" />
</a>
{% if photos > 1 %}
<a class="feedbox__media--more" href="{{ link }}"{% if modal %} data-toggle="modal" data-target="#{{ modal }}"{% endif %}>
<i class="icon-multiplephotos"></i>
<span>{{ photos }} photos</span>
</a>
{% endif %}
</div>
{% endif %}
</div>
</div>