{% load static %}
<!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>Debusine - {% block title %}{% endblock %}</title>

    <link rel="stylesheet" type="text/css" href="{% static "web/css/debusine.css" %}">
    <link rel="stylesheet" type="text/css" href="{% static "web/vendor/bootstrap/css/bootstrap.min.css" %}">
    <link rel="stylesheet" href="{% static "web/vendor/bootstrap/css/bootstrap-icons.min.css" %}">
</head>

<body>

<nav class="navbar navbar-expand-lg bg-body-tertiary mb-3">
    <div class="container-fluid">
        <a class="navbar-brand" href="{% url 'homepage:homepage' %}">Debusine</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-lg-0">
                <li class="nav-item">
                    <a class="nav-link" aria-current="page" href="{% url "workspaces:list" %}">Workspaces</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="{% url "work-requests:list" %}">Work requests</a>
                </li>
                {% if user.is_authenticated %}
                <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
                        Plumbing
                    </a>
                    <ul class="dropdown-menu">
                        <li><a class="dropdown-item" href="{% url "artifacts:create" %}">Create artifact</a></li>
                        <li><a class="dropdown-item" href="{% url "work-requests:create" %}">Create work request</a></li>
                    </ul>
                </li>
                {% endif %}
            </ul>
            <ul class="navbar-nav mb-2 mb-lg-0">
                {% if user.is_authenticated %}
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
                            {{ user.username }}
                        </a>
                        <ul class="dropdown-menu">
                            <li><a class="dropdown-item" href="{% url "user:token-list" %}">Tokens</a></li>
                            <li><hr class="dropdown-divider"></li>
                            <li><a class="dropdown-item" href="{% url "accounts:logout" %}">Log out</a></li>
                        </ul>
                    </li>
                {% else %}
                    <li class="nav-item">
                        <a class="nav-link" href="{% url "accounts:login" %}">Log in</a>
                    </li>
                {% endif %}
            </ul>
        </div>
    </div>
</nav>

<div class="container">
    {% block content %}{% endblock %}
</div>

<div class="container">
  <footer class="mt-3 border-top text-muted text-center">
    {% block footer %}
    <p class="mt-2 mb-0">© 2019-2024 <a href="https://salsa.debian.org/freexian-team/debusine/-/blob/devel/AUTHORS">Debusine Developers</a></p>
    <p class="mt-0 mb-0">
    <a href="https://freexian-team.pages.debian.net/debusine/" target="_blank">Documentation</a> •
    <a href="https://salsa.debian.org/freexian-team/debusine/-/issues" target="_blank">Bugs</a> •
    <a href="https://salsa.debian.org/freexian-team/debusine/" target="_blank">Code</a> •
    <a href="https://freexian-team.pages.debian.net/debusine/howtos/contribute.html" target="_blank">Contributing</a>
    </p>
    {% endblock %}
  </footer>
</div>

<div id="beta-stamp">BETA</div>

<script src="{% static "web/vendor/bootstrap/js/bootstrap.bundle.min.js" %}"></script>
</body>

</html>
