{% extends "oy/contrib/bs4/base.html" %}
{% import 'oy/contrib/bs4/macros.html' as bs4_macros with context %}
{% import 'oy/contrib/bs4/page/page_macros.html' as page_macros with context %}

{% block head_meta %}
  {{ super() }}
  <meta name="description" content="{% block meta_desc %}{% endblock %}">
  <meta name="author" content="{% block meta_author %}{{settings.title}}{%endblock %}">
  <meta name="keywords" content="{% block meta_keywords %}{%endblock %}">
{% endblock %}

{% block subtitle %}{{current_page.title}}{% endblock %}

{% block extra_head %}
  <link rel="stylesheet" type="text/css" href="{{ url_for('oy.contrib.bootstrap4.static', filename='css/custom.css') }}">
{% endblock %}

{% block page_header %}
  {% block navigation %}
    <nav class="navbar navbar-expand-md navbar-dark bg-dark sticky-top">
    <a class="navbar-brand" href="/">{{settings.title}}</a>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="{{_trans('Toggle navigation menu') }}">
    <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="navbarCollapse">
    <ul class="navbar-nav">
    {% for page in pages %}
      {{ page_macros.render_page(page, current_page) }}
	{% endfor %}
    </ul>
    </div>
    </nav>
  {% endblock %}
{% endblock %}

{% block body_wrapper %}
<main class="container" id="pagewrapper">

{% if messages %}
<aside class="container-fluid">
  <div class="row">
	<div class="col-md-8 p-4">
	{{ bs4_macros.messages() }}
	</div>
  </div>
</aside>
{% endif %}

{% block page_body %}
  {% block content %}{% endblock %}
  <hr>
{% endblock %}

{% block footer %}
  {% include 'oy/contrib/bs4/page/includes/footer.html' with context %}
{% endblock footer %}
</main>
{% endblock %}
