{% import "Toucan/macros/master.html" as master with context %}
{% import "Toucan/macros/forms.html" as f with context %}
{% include "Toucan/Plugin/Publisher/Admin/_include.html" %}

    <div class="container preview">

        <div class="row">
            <div class="col-md-12">
                    <a href="{{ url_for("PublisherAdmin:index") }}" class="btn btn-default"><i class="fa fa-arrow-left"></i></a>
                    <a href="{{ url_for("PublisherAdmin:edit", id=post.id) }}" class="btn btn-default"><i class="fa fa-pencil"></i> Edit</a>
            </div>
        </div>

        <div class="row">
            <div class="col-md-12">
                <h1 class="main-title">{{ post.title }}</h1>
            </div>
        </div>

        {% if post.featured_media_top %}
            <div class="row">
                <div class="col-md-12">
                    <div class="featured-top">
                        {% if post.featured_media_top == "embed" and post.featured_embed%}
                            {{ master.oembed(post.featured_embed) }}
                        {% elif post.featured_media_top == "image" and post.featured_image %}
                            {{ master.img_src(post.featured_image) }}
                        {% endif %}
                    </div>
                </div>
            </div>
        {% endif %}


        <div class="row">
            <div class="col-md-12">
                <div class="post-content">
                    {{ post.content | markdown(lazy_images=true) | safe }}
                </div>
            </div>
        </div>
    </div>

