<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="description" content="">
    <meta name="author" content="">
    <meta name="turbolinks-cache-control" content="no-cache">
    <link rel="canonical" href="{{ view.url }}" />
    <link rel="icon" href="{{ static('favicon.ico') }}">

    <title>{% block title %}{{ view.title_html }}{% endblock %} {% if settings.SITE_TITLE %}- {{ settings.SITE_TITLE }}{% endif %}</title>

    <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">

    <script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
    {% block bundles %}
      {% block style_bundle %}
      <link href="{{ static('crudlfap.css') }}" rel="stylesheet">
      {% endblock %}

      {% block script_bundle %}
      <script src="{{ static('crudlfap.js') }}" defer></script>
      {% endblock %}
    {% endblock %}

    {% block extra_style %}{% endblock %}
  </head>

  <body class="{% block body_class %}{% endblock %}">
    {% include 'crudlfap/_menu_main.html' %}
    {% block breadcrumb %}{% endblock %}
    {% include 'crudlfap/_messages.html' %}
    {% block before_container %}{% endblock %}
    {% block content_open %}<div class="container" id="modal-body-ajax">{% endblock %}
    {% block title_heading %}
      {% if getattr(view, 'get_title_heading', None) %}
      <h2
        class="text-{{ view.style|default('default') }} hide-in-modal"
        id="modal-title-ajax"
      >{{ view.title_heading }}</h2>
      {% endif %}
    {% endblock %}

    {% block form_open %}{% endblock %}
    {% block content %}{% block form %}{% endblock %}{% endblock %}
    {% block buttons %}{% endblock %}
    {% block form_close %}{% endblock %}
    {% block content_close %}</div>{% endblock %}

    <div id="modal" class="modal">
        <div class="modal-content" id="modal-body">
           <p>Ooopsy</p>
        </div>
    </div>

    {% block after_container %}
    {# i wish you put some super elegant hack here #}
    {% endblock %}
  </body>
</html>
