{% for item in items %}

    {% if item.type == 'facebook' %}
        <aside class="login-panel feeditem feeditem-facebook bg-white">
            <div class="feeditem-brand">
                <i class="icon-brand-facebook text-brand-facebook"></i>
            </div>
            <div class="feeditem-content">
                <small class="feeditem-date text-natural">{{ item.date|format_date(null, null, null, constant('IntlDateFormatter::MEDIUM')) }}</small>
                <p>
                    {% if item.link is defined %}<a href="{{ item.link }}">{% endif %}
                        {{ item.description|default(item.title)|raw }}
                    {% if item.link is defined %}</a>{% endif %}
                </p>                
                {% if item.image is defined %}
                    <div class="spacer"></div>
                    <div class="row">
                        {% if item.link is defined %}<a href="{{ item.link }}">{% endif %}
                            <img src="{{ item.image }}" alt="" class="col-xs-12" />
                        {% if item.link is defined %}</a>{% endif %}
                    </div>
                {% endif %}
            </div>
            <div class="feeditem-footer">
                {% if item.feed_link is defined %}
                    <a href="{{ item.feed_link }}" target="_blank" class="text-natural">Volg ons op Facebook <i class="icon-arrow-right"></i></a>
                {% endif %}
            </div>
        </aside>
        <div class="spacer"></div>
    {% endif %}

    {% if item.type == 'twitter' %}
        <aside class="login-panel feeditem feeditem-twitter bg-white">
            <div class="feeditem-brand">
                <i class="icon-brand-twitter text-brand-twitter"></i>
            </div>
            <div class="row feeditem-content">                
                <div class="{% if item.image is defined %}col-sm-8{% else %}col-xs-12{% endif %}">
                    <small class="feeditem-date text-natural">{{ item.date|format_date(null, null, null, constant('IntlDateFormatter::MEDIUM')) }}</small>
                    <h2 class="feeditem-title">{{ item.title|raw }}</h2>
                </div>
                {% if item.image is defined %}
                    <div class="col-xs-12 col-sm-4">
                        <div class="row">
                            <img src="{{ item.image }}" alt="" class="col-xs-12" />
                        </div>
                    </div>
                {% endif %}
            </div>
            <div class="feeditem-footer">
                {% if item.feed_link is defined %}
                    <a href="{{ item.feed_link }}" target="_blank" class="text-natural">Volg ons op Twitter <i class="icon-arrow-right"></i></a>
                {% endif %}
            </div>
        </aside>
        <div class="spacer"></div>
    {% endif %}

    {% if item.type == 'rss' %}
        <aside class="login-panel feeditem feeditem-rss bg-white">
            <div class="feeditem-brand">
                <i class="icon-brand-visualmedia text-brand-visualmedia"></i>
            </div>
            <div class="row feeditem-content">
                
                <div class="col-sm-8">
                    <small class="feeditem-date text-natural">{{ item.date|format_date(null, null, null, constant('IntlDateFormatter::MEDIUM')) }}</small>
                    <h2 class="feeditem-title"><a href="{{ item.link }}">{{ item.title }}</a></h2>
                    <p>
                        <a href="{{ item.link }}">
                            {{ item.description|raw }}
                        </a>
                    </p>
                </div>
                <div class="col-xs-12 col-sm-4">
                    {% if item.image is defined %}
                        <div class="row">
                            <a href="{{ item.link }}">
                                <img src="{{ item.image }}" alt="" class="col-xs-12" />
                            </a>
                        </div>
                    {% endif %}
                </div>
            </div>
            <div class="feeditem-footer">
                {% if item.feed_link is defined %}
                    <a href="{{ item.feed_link }}" target="_blank" class="text-natural">Bekijk al het nieuws <i class="icon-arrow-right"></i></a>
                {% endif %}
            </div>
        </aside>
        <div class="spacer"></div>
    {% endif %}

{% endfor %}