{% import "WebPortfolio/macros/base.html" as wp with context %}
{% extends "WebPortfolio/Module/Cms/Post/_layout.html" %}

{%  block post_content %}
<!-- Page Header -->
        <div class="container">
            <div class="row">
                <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
                    <div class="post-header">
                        <h1>{{ post.title }}</h1>

                        {% if post_show_byline %}
                        <span class="meta">
                            Posted by <a href="{{ post.author.url }}">{{ post.author.name }}</a> on {{ post.published_at | date_since }}
                        </span>
                        {% endif %}
                    </div>
                </div>
            </div>
        </div>

{% if post.featured_media_top %}
        <div class="container">
            <div class="row">
                <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
                    <div class="featured-top">
                        {% if post.featured_media_top == "embed" and post.featured_embed%}
                            {{ wp.oembed(post.featured_embed) }}
                        {% elif post.featured_media_top == "image" and post.featured_image %}
                            {{ wp.img_src(post.featured_image) }}
                        {% endif %}
                    </div>
                </div>
            </div>
        </div>
{% endif %}


    <!-- Post Content -->
    <article>
        <div class="container">

            {% if "show_sharing_buttons" in post.options.social %}
                <div class="row">
                    <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
                        <div class="pull-right">
                            {{ wp.share_buttons() }}
                        </div>
                    </div>
                </div>
            {% endif %}

            <div class="row">
                <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
					<div class="post-content">
						{{ post.content | markdown(lazy_images=true) | safe }}
					</div>
				</div>
            </div>
        </div>
    </article>
{%  endblock %}