cleaned up some navbar items into a dropdown

This commit is contained in:
2022-06-07 08:13:12 -05:00
parent 7dc99507e3
commit 0232420d5d

View File

@@ -1,131 +1,139 @@
{% load static i18n %}<!DOCTYPE html> {% load static i18n %}<!DOCTYPE html>
{% get_current_language as LANGUAGE_CODE %} {% get_current_language as LANGUAGE_CODE %}
<html lang="{{ LANGUAGE_CODE }}"> <html lang="{{ LANGUAGE_CODE }}">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge"> <meta http-equiv="x-ua-compatible" content="ie=edge">
<title>{% block title %}BenchCoach{% endblock title %}</title> <title>{% block title %}BenchCoach{% endblock title %}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="An assistant coach for TeamSnap"> <meta name="description" content="An assistant coach for TeamSnap">
<meta name="author" content="Anthony Correa"> <meta name="author" content="Anthony Correa">
<link rel="icon" href="{% static 'images/favicons/favicon.ico' %}"> <link rel="icon" href="{% static 'images/favicons/favicon.ico' %}">
{% block css %} {% block css %}
<!-- Latest compiled and minified Bootstrap CSS --> <!-- Latest compiled and minified Bootstrap CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.1.3/css/bootstrap.min.css" integrity="sha512-GQGU0fMMi238uA+a/bdWJfpUGKUkBdgfFdgBm72SUQ6BeyWjoY/ton0tEjH+OSH9iP4Dfh+7HM0I9f5eR0L/4w==" crossorigin="anonymous" referrerpolicy="no-referrer" /> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.1.3/css/bootstrap.min.css" integrity="sha512-GQGU0fMMi238uA+a/bdWJfpUGKUkBdgfFdgBm72SUQ6BeyWjoY/ton0tEjH+OSH9iP4Dfh+7HM0I9f5eR0L/4w==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- Your stuff: Third-party CSS libraries go here --> <!-- Your stuff: Third-party CSS libraries go here -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.8.2/font/bootstrap-icons.css"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.8.2/font/bootstrap-icons.css">
<!-- This file stores project-specific CSS --> <!-- This file stores project-specific CSS -->
<link href="{% static 'css/project.css' %}" rel="stylesheet"> <link href="{% static 'css/project.css' %}" rel="stylesheet">
{% endblock %} {% endblock %}
<!-- Le javascript <!-- Le javascript
================================================== --> ================================================== -->
{# Placed at the top of the document so pages load faster with defer #} {# Placed at the top of the document so pages load faster with defer #}
{% block javascript %} {% block javascript %}
<!-- Bootstrap JS --> <!-- Bootstrap JS -->
<script defer src="{% static 'js/bootstrap.js' %}"></script> <script defer src="{% static 'js/bootstrap.js' %}"></script>
<!-- Your stuff: Third-party javascript libraries go here --> <!-- Your stuff: Third-party javascript libraries go here -->
<!-- place project specific Javascript in this file --> <!-- place project specific Javascript in this file -->
<script defer src="{% static 'js/project.js' %}"></script> <script defer src="{% static 'js/project.js' %}"></script>
<script defer src="{% static 'js/Sortable.js' %}"></script> <script defer src="{% static 'js/Sortable.js' %}"></script>
<script src="{% static 'js/chart.js' %}"></script> <script src="{% static 'js/chart.js' %}"></script>
{% endblock javascript %} {% endblock javascript %}
</head> </head>
<body> <body>
<div class="mb-1"> <div class="mb-1">
<nav class="navbar navbar-expand-md navbar-dark bg-navbar"> <nav class="navbar navbar-expand-md navbar-dark bg-navbar">
<div class="container-fluid"> <div class="container-fluid">
<button class="navbar-toggler navbar-toggler-right" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> <button class="navbar-toggler navbar-toggler-right" 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> <span class="navbar-toggler-icon"></span>
</button> </button>
<a class="navbar-brand" href="{% url 'home' %}"> <a class="navbar-brand" href="{% url 'home' %}">
<img class="d-inline-block" width="32" height="32" src="{% static 'images/benchcoach.svg' %}" /> <img class="d-inline-block" width="32" height="32" src="{% static 'images/benchcoach.svg' %}" />
BenchCoach BenchCoach
</a> </a>
<div class="collapse navbar-collapse" id="navbarSupportedContent"> <div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto"> <ul class="navbar-nav mr-auto">
<li class="nav-item active"> <li class="nav-item active">
<a class="nav-link" href="{% url 'home' %}">Home <span class="visually-hidden">(current)</span></a> <a class="nav-link" href="{% url 'home' %}">Home <span class="visually-hidden">(current)</span></a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="{% url 'about' %}">About</a> <a class="nav-link" href="{% url 'about' %}">About</a>
</li> </li>
{% if request.user.is_authenticated %} {% if request.user.is_authenticated %}
<li class="nav-item"> <li class="nav-item">
{# URL provided by django-allauth/account/urls.py #} <a class="nav-link" href="{% url 'teamsnap_dashboard' %}">{% translate "Dashboard" %}</a>
<a class="nav-link" href="{% url 'users:detail' request.user.username %}">{% translate "My Profile" %}</a> </li>
</li> <li class="nav-item">
<li class="nav-item"> <a class="nav-link" href="{% url 'teamsnap_schedule' %}">{% translate "Schedule" %}</a>
<a class="nav-link" href="{% url 'teamsnap_dashboard' %}">{% translate "Dashboard" %}</a> </li>
</li>
<li class="nav-item"> <li class="nav-item dropdown">
<a class="nav-link" href="{% url 'teamsnap_schedule' %}">{% translate "Schedule" %}</a> <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
</li> Profile
<li class="nav-item"> </a>
<ul class="dropdown-menu dropdown-menu-dark" aria-labelledby="navbarDropdown">
<li class="dropdown-item">
<a class="nav-link" href="{% url 'teamsnap_preferences' %}">{% translate "Preferences" %}</a> <a class="nav-link" href="{% url 'teamsnap_preferences' %}">{% translate "Preferences" %}</a>
</li> </li>
<li class="nav-item"> <li class="dropdown-item">
{# URL provided by django-allauth/account/urls.py #} <a class="nav-link" href="{% url 'users:detail' request.user.username %}">{% translate "My Profile" %}</a>
</li>
<li><hr class="dropdown-divider"></li>
<li class="dropdown-item">
<a class="nav-link" href="{% url 'account_logout' %}">{% translate "Sign Out" %}</a> <a class="nav-link" href="{% url 'account_logout' %}">{% translate "Sign Out" %}</a>
</li> </li>
{% else %} </ul>
{% if ACCOUNT_ALLOW_REGISTRATION %} </li>
{% else %}
{% if ACCOUNT_ALLOW_REGISTRATION %}
<li class="nav-item"> <li class="nav-item">
{# URL provided by django-allauth/account/urls.py #} {# URL provided by django-allauth/account/urls.py #}
<a id="sign-up-link" class="nav-link" href="{% url 'account_signup' %}">{% translate "Sign Up" %}</a> <a id="sign-up-link" class="nav-link" href="{% url 'account_signup' %}">{% translate "Sign Up" %}</a>
</li> </li>
{% endif %} {% endif %}
<li class="nav-item"> <li class="nav-item">
{# URL provided by django-allauth/account/urls.py #} {# URL provided by django-allauth/account/urls.py #}
<a id="log-in-link" class="nav-link" href="{% url 'account_login' %}">{% translate "Sign In" %}</a> <a id="log-in-link" class="nav-link" href="{% url 'account_login' %}">{% translate "Sign In" %}</a>
</li> </li>
{% endif %} {% endif %}
</ul>
</div>
</div>
</nav>
</ul>
</div>
</div> </div>
</nav>
<div class="container"> </div>
{% if messages %} <div class="container">
{% for message in messages %}
<div class="alert alert-dismissible {% if message.tags %}alert-{{ message.tags }}{% endif %}">
{{ message }}
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
{% endfor %}
{% endif %}
{% block content %} {% if messages %}
<p>Use this document as a way to quick start any new project.</p> {% for message in messages %}
{% endblock content %} <div class="alert alert-dismissible {% if message.tags %}alert-{{ message.tags }}{% endif %}">
{{ message }}
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
{% endfor %}
{% endif %}
</div> <!-- /container --> {% block content %}
<p>Use this document as a way to quick start any new project.</p>
{% endblock content %}
{% block modal %}{% endblock modal %} </div> <!-- /container -->
{% block inline_javascript %} {% block modal %}{% endblock modal %}
{% comment %}
{% block inline_javascript %}
{% comment %}
Script tags with only code, no src (defer by default). To run Script tags with only code, no src (defer by default). To run
with a "defer" so that you run inline code: with a "defer" so that you run inline code:
<script> <script>
window.addEventListener('DOMContentLoaded', () => {/* Run whatever you want */}); window.addEventListener('DOMContentLoaded', () => {/* Run whatever you want */});
</script> </script>
{% endcomment %} {% endcomment %}
{% endblock inline_javascript %} {% endblock inline_javascript %}
</body> </body>
</html> </html>