{% set title = post.post_title %}
{% set content = post.post_content %}
{% set date = fn.get_the_date() %}

{% set thumbL = fn.get_the_post_thumbnail_url( post.ID, 'large') %}
{% set thumbM = fn.get_the_post_thumbnail_url(post.ID, 'medium') %}
{% set thumbS = fn.get_the_post_thumbnail_url(post.ID, 'thumbnail') %}
{% if not thumbL %}{% set thumbL = fn.get_template_directory_uri()~'/dist/images/og-format@3x.png' %}{% endif %}
{% if not thumbM %}{% set thumbM = fn.get_template_directory_uri()~'/dist/images/og-format@2x.png' %}{% endif %}
{% if not thumbS %}{% set thumbS = fn.get_template_directory_uri()~'/dist/images/og-format.png' %}{% endif %}

{# og #}
{% set og_title = title %}
{% set og_desc = post.post_excerpt %}
{% set og_thumb = fn.get_the_post_thumbnail_url(post.ID, 'thumbnail') %}
{% set og_url = fn.get_the_permalink(post.ID) %}
{% if not og_desc %}{% set og_desc =  post.post_excerpt ? post.post_excerpt : post.post_content|slice(0,180)  %}{% endif %}

{% extends 'm_layout/base.twig' %}

{% block main %}
{% if title or content %}
<article class="article" m-pack-single>
  <section class="headline">
    <strong class="h1 headline__type">{{title}}</strong>
  </section>
  {% if content %}
  <section class="m_content">
    <div class="m_content">
      {{ fn.apply_filters('the_content', content)|raw }}
    </div>
  </section>
  {% endif %}
</article>

{% endif %}

{% if comp %}
    {{ render_comp(comp, 'main') }}
{% endif %}

{% endblock %}
