<!doctype html>
<html lang="en">

<head>
    {% block head %}
        <!-- Required meta tags -->
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
        <!-- Optional JavaScript -->
        <!-- jQuery first, then Popper.js, then Bootstrap JS -->
        <script src="https://code.jquery.com/jquery-3.4.1.min.js"
                integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
        <!-- <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>#}
        <!-- Bootbox -->
        <script src="https://cdnjs.cloudflare.com/ajax/libs/bootbox.js/6.0.0/bootbox.js"></script>
        <!-- Bootstrap CSS -->
        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css"
              integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN"
              crossorigin="anonymous">
        <!-- Bootstrap filter table CSS -->
        <link rel="stylesheet" href="{{ url_for('static', filename='excel-bootstrap-table-filter-style.css') }}">


        <!-- //fontawesome: -->
        <link rel="stylesheet" href="https://use.fontawesome.com/releases/v6.5.1/css/all.css" crossorigin="anonymous">

        <link rel="stylesheet" href="{{ url_for('static', filename='main.css') }}">


        <link rel="shortcut icon" href="#"/>

        <title>{% block title %}{{ config['APP_TITLE'] }} {% endblock %}</title>

    {% endblock %}
</head>

<body>
{% if config['ENVIRONMENT'] == 'test' %}
    <div class="banner"><i class="fa fa-exclamation-triangle"></i> THIS IS A TEST INSTANCE WORKING WITH (POSSIBLY
        OUTDATED) COPIES OF THE ONTOLOGIES <i class="fa fa-exclamation-triangle"></i></div>
{% endif %}
<nav class="navbar navbar-expand-lg p-3"
     style="background: {{ { 'development': '#48ff00', 'test': '#ff4800', 'production': '#123456'}.get(config['ENVIRONMENT'], 'fuchsia') }}"
     data-bs-theme="dark">
    <div class="container-fluid">
        <a class="navbar-brand" href="#">
            {% if APP_TITLE2 is defined %}
                {{ APP_TITLE2 }}
            {% else %}
                {{ config['APP_TITLE'] }}
            {% endif %}
        </a>
        <div class="collapse navbar-collapse">
            <ul class="navbar-nav me-auto mb-2 mb-lg-0">
                <li class="nav-item">
                    <a class="nav-link active" aria-current="page" href="{{ url_for('main.home') }}">
                        <i class="fa fa-home"></i> Home
                    </a>
                </li>
                {% if has_any_permission("hierarchical-spreadsheets", "index", "repository-config-view") %}
                    <li class="nav-item">
                        <a class="nav-link active" aria-current="page" href="{{ url_for('admin.dashboard') }}">
                            <i class="fa fa-gear"></i> Admin
                        </a>
                    </li>
                {% endif %}
            </ul>
        </div>

        {% if login %}
            <div class="dropdown">
                <a class="btn btn-light dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown"
                   aria-expanded="false"><i class="fas fa-user"></i> {{ login }}</a>

                <ul class="dropdown-menu  dropdown-menu-end">
                    <li><a class="dropdown-item" href="{{ url_for('authentication.logout') }}">Logout</a></li>
                </ul>

            </div>
        {% endif %}
    </div>
</nav>
<div class="container-fluid">
    <div id="content">

        <div class="container-fluid">
            <nav aria-label="breadcrumb" style="margin-top: 14px">
                <ol class="breadcrumb">
                    <li class="breadcrumb-item"><a href="{{ url_for('main.home') }}">Home</a></li>
                    {% if breadcrumb is defined %}
                        {% for segment in breadcrumb %}
                            {% if loop.last %}
                                <li class="breadcrumb-item active" aria-current="page">
                                    {{ segment.name }}
                                </li>
                            {% else %}

                                <li class="breadcrumb-item">
                                    <a href="{{ config[URL_PREFIX] }}/{{ segment.path }}">{{ segment.name }}</a>
                                </li>
                            {% endif %}
                        {% endfor %}
                    {% endif %}


                    {#                    {% if repo_name %}#}
                    {#                    <li class="breadcrumb-item"><a#}
                    {#                            href="{{url_for('main.repo', repo_key=repo_name)}}">{{ repo_name }}</a></li>#}
                    {#                    {% if folder %}#}
                    {#                    <li class="breadcrumb-item"><a href="{{url_for('main.repo', repo_key=repo_name, folder_path= folder)}}">{{ folder }}</a></li>#}
                    {#                    {% if spreadsheet_name %}#}
                    {#                    <li class="breadcrumb-item"><a href="{{url_for('main.repo', repo_key=repo_name, folder_path= folder+'/'+spreadsheet_name)}}">{{ spreadsheet_name }}</a></li>#}
                    {#                    {% endif %}#}
                    {#                    {% endif %}#}
                    {#                    {% endif %}#}
                </ol>
            </nav>
        </div>
        <hr/>

        {% block content %}{% endblock %}

    </div>

{#    <div id="footer">#}
{#        {% block footer %}#}
{#            <hr/>#}
{#            <p class="text-center">#}
{#                <a href="mailto:j.hastings@ucl.ac.uk">Contact</a>#}
{#            </p>#}
{#        {% endblock %}#}
{#    </div>#}
</div>




{% block javascriptblock %}

{% endblock %}


<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"
        integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL"
        crossorigin="anonymous"></script>
</body>

</html>
