{% if posts %}
    {% extends 'widgets/base.twig' %}
    {% block widget_content %}
        <div class="row">
            <div class="medium-6 columns">
                <article>
                    {% if posts|first.thumbnail.src %}
                        <figure>
                            <a href="{{ posts|first.link }}">
                                <img src="{{ posts|first.thumbnail.src('large') }}" alt="{{ posts|first.title }}">
                            </a>
                        </figure>
                    {% endif %}
                    <header>
                        <h3 class="entry-title">
                            <a href="{{ posts|first.link }}">
                                {{ posts|first.title }}
                            </a>
                        </h3>
                        <div class="post-info">
	                        <span>
							    <i class="fa fa-rss" aria-hidden="true"></i>
					    			{% if posts|first.get_field('author') %}
                                        {{ posts|first.get_field('author') }}
                                    {% else %}
                                        {{ posts|first.author }}
                                    {% endif %}
							</span>
                            <span>
	                            <i class="fa fa-calendar" aria-hidden="true"></i> {{ posts|first.date }}
							</span>
                        </div>
                    </header>

                    <p class="hidden-small show-for-medium">
                        {{ posts|first.content|excerpt(20) }}
                    </p>
                </article>
            </div>
            <div class="medium-6 columns basketsite-news-widget-other-items">
                {% for post in posts|slice(1, length) %}
                    <article>
                        <div class="row">
                            <div class="medium-4 columns">
                                <figure>
                                    <a href="{{ post.link }}">
                                        <img src="{{ post.thumbnail.src('large') }}" alt="{{ post.title }}">
                                    </a>
                                </figure>
                            </div>
                            <div class="medium-8 columns">
                                <header>
                                    <h3 class="entry-title-smaller">
                                        <a href="{{ post.link }}">
                                            {{ post.title }}
                                        </a>
                                    </h3>
                                    <div class="post-info">
				                        <span>
										    <i class="fa fa-rss" aria-hidden="true"></i>
											{% if post.get_field('author') %}
                                                {{ post.get_field('author') }}
                                            {% else %}
                                                {{ post.author }}
                                            {% endif %}
										</span>
                                        <span>
				                            <i class="fa fa-calendar" aria-hidden="true"></i> {{ post.date }}
										</span>
                                    </div>
                                </header>
                            </div>
                        </div>
                    </article>
                {% endfor %}
            </div>
        </div>
    {% endblock %}
{% endif %}