{% load i18n static tailwind_tags %}
<!DOCTYPE html>
<html lang="en" class="dark">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Birder</title>
    <meta name="description" content="">
    <meta name="keywords" content="">
    <script src="/static/admin/js/vendor/jquery/jquery.js"></script>
    <script src="/static/admin/js/jquery.init.js"></script>
    <script src="{% static "birder.js" %}"></script>

    {% tailwind_css %}
    {% block extrahead %}{% endblock %}
</head>

<body>

<!--Nav-->
<nav id="header" class="w-full z-30 top-0 py-1">
    <div class="w-full container mx-auto flex flex-wrap items-center justify-between mt-0 px-6 py-3">

        <label for="menu-toggle" class="cursor-pointer md:hidden block">
            <svg class="fill-current " xmlns="http://www.w3.org/2000/svg" width="20" height="20"
                 viewBox="0 0 20 20">
                <title>menu</title>
                <path d="M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z"></path>
            </svg>
        </label>
        <input class="hidden" type="checkbox" id="menu-toggle"/>
        <div class="hidden z-30 md:flex md:items-center md:w-auto w-full order-3 md:order-1" id="menu">
            <nav class="z-30">
                <ul class="md:flex items-center justify-between text-base pt-4 md:pt-0">
                    <li><a class="inline-block no-underline hover:underline py-2 px-4" href="/">Home</a></li>
                    {% if monitor %}
                        <li><a class="inline-block no-underline hover:underline py-2 px-4 w-8"
                               href="{% url "project-detail" monitor.project.pk %}">{{ monitor.project.name }}</a></li>
                    {% else %}
                        <li><span class="inline-block no-underline hover:underline py-2 px-4 w-8"></span></li>
                    {% endif %}
                </ul>
            </nav>
        </div>

        <div class="order-1 md:order-2">
            <div class="flex items-center tracking-wide no-underline hover:no-underline font-bold  text-xl">
                <img class="w-16 birder-logo" src="{% static "images/birder.svg" %}">
                Birder
            </div>
        </div>

        <div class="order-2 md:order-3 flex items-center" id="nav-content">
            {% if user.is_authenticated %}
                <div class="hidden sm:flex">{% translate "Hi" %}, {{ user }}&nbsp;&nbsp;</div>
                <form method="post" action="{% url "logout" %}" id="logout-form">
                    {% csrf_token %}
                    <button type="submit" class="btn-link">logout</button>
                </form>
            {% else %}
                <a class="inline-block no-underline " href="{% url "login" %}">login</a>
            {% endif %}
            {% if user.is_staff %}
                <a class="inline-block no-underline px-2" target="_admin"
                   href="{% url "admin:index" %}">{% translate "admin" %}</a>
            {% endif %}
        </div>
    </div>
</nav>
{% block content %}

{% endblock content %}
{% block footer %}
    <footer class="mx-4 bg-whitepy-2 border-t mt-10">
        <div class="container flex px-3 py-4">
            <div class="flow-root w-full">
                <div class="px-2 md:px-0 block md:float-left">
                    <div class="inline-flex">Copyright (c) OS4D ltd</div>
                </div>
            </div>
            <a href="https://github.com/os4d/birder">
            <svg height="32" aria-hidden="true" viewBox="0 0 24 24" width="32" data-view-component="true"
                 class="octicon octicon-mark-github">
                <path d="M12 1C5.9225 1 1 5.9225 1 12C1 16.8675 4.14875 20.9787 8.52125 22.4362C9.07125 22.5325 9.2775 22.2025 9.2775 21.9137C9.2775 21.6525 9.26375 20.7862 9.26375 19.865C6.5 20.3737 5.785 19.1912 5.565 18.5725C5.44125 18.2562 4.905 17.28 4.4375 17.0187C4.0525 16.8125 3.5025 16.3037 4.42375 16.29C5.29 16.2762 5.90875 17.0875 6.115 17.4175C7.105 19.0812 8.68625 18.6137 9.31875 18.325C9.415 17.61 9.70375 17.1287 10.02 16.8537C7.5725 16.5787 5.015 15.63 5.015 11.4225C5.015 10.2262 5.44125 9.23625 6.1425 8.46625C6.0325 8.19125 5.6475 7.06375 6.2525 5.55125C6.2525 5.55125 7.17375 5.2625 9.2775 6.67875C10.1575 6.43125 11.0925 6.3075 12.0275 6.3075C12.9625 6.3075 13.8975 6.43125 14.7775 6.67875C16.8813 5.24875 17.8025 5.55125 17.8025 5.55125C18.4075 7.06375 18.0225 8.19125 17.9125 8.46625C18.6138 9.23625 19.04 10.2125 19.04 11.4225C19.04 15.6437 16.4688 16.5787 14.0213 16.8537C14.42 17.1975 14.7638 17.8575 14.7638 18.8887C14.7638 20.36 14.75 21.5425 14.75 21.9137C14.75 22.2025 14.9563 22.5462 15.5063 22.4362C19.8513 20.9787 23 16.8537 23 12C23 5.9225 18.0775 1 12 1Z"></path>
            </svg>
            </a>
            <div class="inline-flex">
                <img id="darkmode" alt="github" class="w-8 cursor-pointer" src="{% static "images/off.svg" %}">
                <span class="hidden align-middle pt-1 px-1 dark:inline-flex">dark</span>
                <span class="dark:hidden align-middle pt-1  inline-flex">light</span>
            </div>
        </div>
    </footer>
{% endblock footer %}
</body>
</html>
