{% load static %}

<!doctype html>
<html lang="en">
    <head>
        <!-- Required meta tags -->
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
        {% block meta %}{% endblock %}

        <!-- FontAwesome -->
        <script defer src="{% static "js/all.js" %}"></script>
        <link type="text/css" href="{% static 'css/main.css' %}" rel="stylesheet" media="screen">

        <title>{% block title %}{% endblock %}</title>
    </head>
<body>
    <header class="site-header">
        {% block header %}{% endblock %}
    </header>
    <div id="main">
        <div class="container">
            <div class="row">
                <div class="col">
                    {% if messages %}
                        {% for message in messages %}
                            <div class="alert alert-{{ message.tags }}">
                                {{ message }}
                            </div>
                        {% endfor %}
                    {% endif %}
                </div>
            </div>
            <div class="row">
                <main class="col">
                    {% block content %}{% endblock %}
                </main>
            </div>
            <button id="back-to-top"
                    class="btn btn-primary btn-lg"
                    title="Click to return to the start of the page" data-toggle="tooltip" data-placement="left">
                <span class="fas fa-chevron-up"></span>
            </button>
        </div>
    </div>

    <footer class="site-footer small text-muted py-3">
        <div class="container">
            <div class="row">
                {% block footer %}{% endblock %}
            </div>
        </div>
    </footer>
    <!-- Optional JavaScript -->
    <!-- jQuery first, then Popper.js, then Bootstrap JS -->
    <script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"
            integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n"
            crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
            integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
            crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"
            integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6"
            crossorigin="anonymous"></script>
    {% block javascripts %}{% endblock %}

</body>
</html>
