{% extends 'layout/base.html.twig' %}

{% block body %}

  {% set title -%}
    {% block title %}{% endblock %}
  {%- endset %}

  {% set parentPageName -%}
    {% block parentPageName %}{% endblock %}
  {%- endset %}

  {% set parentPageUrl = '.' %}
  {% if parentPageName == 'Components' %}
    {% set parentPageUrl = '/' %}
  {% endif %}

  {% set isUnstable -%}
    {% block isUnstable %}{% endblock %}
  {%- endset %}

  {% block header %}
    {% include 'partials/header.html.twig' with { themes } only %}
    {% include 'partials/cover.html.twig' with { isUnstable, parentPageName, parentPageUrl, title } only %}
  {% endblock %}

  {# Pre-render page content due to TwigX limitations. #}
  {%- set renderedContent -%}
    {% block content %}{% endblock %}
  {%- endset -%}

  <main class="py-1000">

      {{ renderedContent }}

  </main>

  {% include 'partials/footer.html.twig' only %}

{% endblock %}
