{% load static %}
<!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.0">
        <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-gH2yIJqKdNHPEq0n4Mqa/HGKIhSkIHeL5AyhkYV8i59U5AR6csBvApHHNl/vI1Bx" crossorigin="anonymous">
        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.9.1/font/bootstrap-icons.css">
        <link rel="stylesheet" href="{% static 'authentication/css/layout.css' %}">
        <title>{% block title %}{% endblock %}</title>
        {% block style %}{% endblock %}
    </head>
    <body>
        <nav class="navbar navbar-expand-md bg-white fixed-top">
            <div class="container-fluid">
                <a class="navbar-brand toDisableAnchorTag" href="/" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-title="Homepage">
                    <i class="bi bi-house-door fs-5 text-dark"></i>
                    <span class="badge fs-5 bg-dark text-white rounded-pill">
                        {{sitetitle}}
                    </span>
                </a>
                <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 me-auto mb-2 mb-md-0">
                        {% if request.user.is_authenticated %}
                        <li class="nav-item">
                            <a class="nav-link toDisableAnchorTag" href="" onclick="displayUpdatePasswordModal(event, '{{request.user.id}}');">Change Password</a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link toDisableAnchorTag" href="#">Close Account</a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link toDisableAnchorTag" href="{% url 'authentication:logout' %}">Logout</a>
                        </li>
                        {% endif %}
                    </ul>
                </div>
            </div>
        </nav>
        {% block body %}{% endblock %}
        <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-A3rJD856KowSb7dwlZdYEkO39Gagi7vIsF0jrRAoQmDKKtQBHUuLZ9AsSv4jD4Xa" crossorigin="anonymous"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.7.7/handlebars.js" integrity="sha512-c7SfJeKRl8g7wgL+zMGX78faYVGp+NZVQ587mRLrqeLySX/qHCQOKw/iZ5Pp64DaPjvedixWC/Fe73upnhBaRA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
        <!-- Bootstrap Tooltip -->
        <script>
            const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]')
            const tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl))
        </script>
        <!-- Bootstrap Popover -->
        <script>
            const popoverTriggerList = document.querySelectorAll('[data-bs-toggle="popover"]')
            const popoverList = [...popoverTriggerList].map(popoverTriggerEl => new bootstrap.Popover(popoverTriggerEl))
        </script>
        <script src="{% static 'authentication/js/layout.js' %}"></script>
        {% block script %}{% endblock %}
    </body>
</html>