{% load static %}
{% load ndr_values %}

{% config_value 'main_view' as logo_view_name %}

<!doctype html>
<html lang="en">
    <head>
        {% include 'ndr_core/base/base_header_tags.html' %}
        <link href="{% static 'ndr_core/css/ndr_core_top_fixed.css' %}" rel="stylesheet">
        {% block custom_css %}
            <!-- custom css -->
        {% endblock %}
    </head>

    <body>
        <nav class="navbar navbar-expand-md navbar-dark fixed-top accent-1-bg">
            {% block logo %}
                <a class="navbar-brand" href="/">
                    <img src="{% block logo_url %}{% static 'ndr_core/images/logo.png' %}{% endblock %}" style="height: 3em;"/>
                </a>
            {% endblock logo %}

            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse" id="navbarCollapse">
                <ul class="navbar-nav mr-auto">
                    {% for nav_item in navigation %}
                        <li class="nav-item">
                            <a class="nav-link ndr-text-fg" href="{{ nav_item.url }}">{{ nav_item.label }}</a>
                        </li>
                    {% endfor %}
                </ul>
                <form class="form-inline mt-2 mt-md-0">
                    <input class="form-control mr-sm-2" type="text" placeholder="Search" aria-label="Search">
                    <button class="btn btn-outline-secondary my-2 my-sm-0" type="submit">Search</button>
                </form>
            </div>
        </nav>

        <main role="main" class="container" style="padding-top: 7em;">
            {% block page_title %}
                <h1>{{ page.name }}</h1>
            {% endblock %}

            {% block generated_content %}
            {% endblock %}

            {% block content %}
                {{ page.template_text|safe }}
            {% endblock %}
        </main>
        {% block footer %}
            NDR core
        {% endblock %}

        <script src="{% static 'ndr_core/js/popper.min.js' %}"></script>
        <script src="{% static 'ndr_core/js/bootstrap.min.js' %}"></script>
        <script src="{% static 'fontawesome/js/all.min.js' %}"></script>

        {% block page_js %}
        {% endblock %}

    </body>
</html>