{% from 'bootstrap5/nav.html' import render_nav_item %}
{% from 'bootstrap5/utils.html' import render_messages %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>Bootstrap-Flask Demo Application</title>
    <link rel="icon" href="{{ url_for('static', filename='favicon.ico') }}">
    {{ bootstrap.load_css() }}
    <style>
        pre {
            background: #ddd;
            padding: 10px;
        }
        h2 {
            margin-top: 20px;
        }
        footer {
            margin: 20px;
        }
    </style>
</head>
<body>
    <nav class="navbar navbar-expand-lg navbar-light bg-light mb-4">
        <div class="container">
        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent"
                aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarSupportedContent">
            <ul class="navbar-nav mr-auto">
                {{ render_nav_item('index', 'Home') }}
                {{ render_nav_item('test_form', 'Form') }}
                {{ render_nav_item('test_nav', 'Nav') }}
                {{ render_nav_item('test_pagination', 'Pagination') }}
                {{ render_nav_item('test_flash', 'Flash Messages') }}
                {{ render_nav_item('test_table', 'Table') }}
                {{ render_nav_item('test_icon', 'Icon') }}
                {{ render_nav_item('test_icons', 'Icons') }}
                <li class="nav-item"><a class="nav-link" href="https://bootstrap-flask.readthedocs.io/" target="_blank">Documentation</a></li>
                <li class="nav-item"><a class="nav-link" href="https://getbootstrap.com/docs/5.1/getting-started/introduction/" target="_blank">Bootstrap Documentation</a></li>
                <li class="nav-item"><a class="nav-link" href="https://github.com/greyli/bootstrap-flask" target="_blank">GitHub</a></li>
            </ul>
        </div>
        </div>
    </nav>
    
    <main class="container">
        {{ render_messages(container=False, dismissible=True) }}
        {% block content %}{% endblock %}
    </main>

    <footer class="text-center">
        {% block footer %}
            <small> &copy; 2018–<script>document.write(new Date().getFullYear())</script> <a href="https://github.com/greyli">Grey Li</a>
            </small>
        {% endblock %}
    </footer>

    {{ bootstrap.load_js() }}
</body>
</html>
