{% extends '::threadandmirror.html.twig' %}
{% import 'StemsCoreBundle:Macro:core.html.twig' as macros %}
{% import 'StemsSocialBundle:Macro:share.html.twig' as share %}

{% block windowTitle %}{{ post.title }} - {{ post.subtitle }}{% endblock %}
{% block metaDescription %}{{ post.metaDescription }}{% endblock %}
{% block metaKeywords %}{{ post.metaKeywords }}{% endblock %}
{% block twitterCardTitle %}{{ post.title }} - {{ post.subtitle }}{% endblock %}
{% block twitterCardDescription %}{{ post.excerpt }}{% endblock %}
{% block twitterCardImage %}{{ getMediaImage(post.image).src|imagine_filter('page_banner') }}{% endblock %}

{% block layout %}
    <div class="magazine-layout-inset">
        <div class="magazine-layout-inset__header-wrapper">
            <div class="magazine-layout-inset__banner-wrapper">
                <div class="magazine-layout-inset__banner" style="background-image:url('{{ getMediaImage(post.image).src|imagine_filter('page_banner') }}');background-size:cover;background-position:center;"></div>
                <div class="magazine-layout-inset__header-inset text-center">
                    <div class="magazine-layout-inset__thumbnail" style="background-image:url('{{ getMediaImage(post.image).src|imagine_filter('page_banner') }}');background-size:cover;background-position:center;"></div>
                    <div class="magazine-layout-inset__social">
                        {{ share.shareGoogleplus(post.sharer('googleplus')) }}
                        {{ share.sharePinterest(post.sharer('pinterest')) }}
                        {{ share.shareTwitter(post.sharer('twitter')) }}
                        {{ share.shareFacebook(post.sharer('facebook')) }}
                    </div>
                    <p class="magazine-layout-inset__date">{{ post.published|date('jS F Y') }}</p>
                    <p class="magazine-layout-inset__accreditation">{{ getMediaImage(post.image).accreditation|raw }}</p>
                    <h1 class="magazine-layout-inset__title">{{ post.title }}<span class="magazine-layout-inset__subtitle">{{ post.subtitle }}</span></h1>
                    <hr class="magazine-layout-inset__hr">
                    <p class="magazine-layout-inset__caption">{{ post.excerpt }}</p>
                </div>
            </div>
        </div>
        <div class="container magazine-layout-inset__body-wrapper">
            <article class="magazine-layout-inset__article" itemscope itemtype="http://schema.org/Article">
                <div class="magazine-layout-inset__article-wrapper col-{{ post.span }}" style="height:{{ post.height }}px">
                    {% for section in sections %}
                        {{ section|raw }}
                    {% endfor %}
                </div>
            </article>
            {#</div>#}
            {#<div class="comments">#}
            {#<div class="background"></div>#}
            {#<div class="wrapper">#}
            {#&#123;&#35; Comment configuration parameters &#35;&#125;#}
            {#{% if 'threadandmirror.blog.comments.moderated'|parameter %}#}
            {#{% set comments = post.moderatedComments %}#}
            {#{% else %}#}
            {#{% set comments = post.undeletedComments %}#}
            {#{% endif %}#}
            {#{% if 'threadandmirror.blog.comments.require_login'|parameter and app.user is empty %}#}
            {#{% set authorised = false %}#}
            {#{% else %}#}
            {#{% set authorised = true %}#}
            {#{% endif %}#}
            {#{% if 'threadandmirror.blog.comments.enabled'|parameter %}#}
            {#<script>#}
            {#var idcomments_acct = '68806c77daa6d4bce5c5b1ef56c01258';#}
            {#var idcomments_post_id;#}
            {#var idcomments_post_url;#}
            {#</script>#}
            {#<span id="IDCommentsPostTitle" style="display:none"></span>#}
            {#<script type='text/javascript' src='http://www.intensedebate.com/js/genericCommentWrapperV2.js'></script>#}
            {#<div class="add-comment-form">#}

            {#</div>#}
            {#{% endif %}#}
            {#</div>#}

            {#</div>#}
        </div>
        {{ render(controller('ThreadAndMirrorBlogBundle:Widget:nextAndPreviousPosts', { post: post, route: 'thread_blog_front_editors_pick' })) }}
    </div>
{% endblock %}

{% block banner %}

{% endblock %}

