Files
benchcoach-django/benchcoach/templates/base.html

170 lines
6.9 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% load static i18n %}<!DOCTYPE html>
{% get_current_language as LANGUAGE_CODE %}
<html lang="{{ LANGUAGE_CODE }}">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>{% block title %}BenchCoach{% endblock title %}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="An assistant coach for TeamSnap">
<meta name="author" content="Anthony Correa">
<link rel="icon" href="{% static 'images/favicons/favicon.ico' %}">
{% include "apple_devices_head.html" %}
{% block css %}
<!-- Latest compiled and minified Bootstrap CSS -->
<link rel="stylesheet" href="{% static 'css/bootstrap.css' %}" />
<!-- 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">
<!-- This file stores project-specific CSS -->
<link href="{% static 'css/project.css' %}" rel="stylesheet">
{% endblock %}
<!-- Le javascript
================================================== -->
{# Placed at the top of the document so pages load faster with defer #}
{% block javascript %}
<!-- Bootstrap JS -->
<script defer src="{% static 'js/bootstrap.bundle.js' %}"></script>
<!-- Your stuff: Third-party javascript libraries go here -->
<!-- place project specific Javascript in this file -->
<script src="{% static 'js/chart.js' %}"></script>
{% endblock javascript %}
</head>
<body class="bg-light">
<div>
<nav class="shadow-sm navbar navbar-expand-md navbar-dark bg-navbar">
<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">
<span class="navbar-toggler-icon"></span>
</button>
<a class="navbar-brand" href="{% url 'home' %}">
<img class="d-inline-block" width="32" height="32" src="{% static 'images/benchcoach.svg' %}" />
BenchCoach
</a>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="{% url 'home' %}">Home <span class="visually-hidden">(current)</span></a>
</li>
{% if request.user.is_authenticated %}
{% if request.user.teamsnap_preferences %}
<li class="nav-item">
<a class="nav-link" href="{% url 'teamsnap_dashboard' %}">{% translate "Dashboard" %}</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{% url 'teamsnap_schedule' %}">{% translate "Schedule" %}</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{% url 'teamsnap_choose_multiple_lineups' team_id=request.user.teamsnap_preferences.managed_team_id%}?num=3">{% translate "Multi-Lineup" %}</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{% url 'teamsnap_opponents' team_id=request.user.teamsnap_preferences.managed_team_id%}">{% translate "Opponents" %}</a>
</li>
{% endif %}
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
Profile
</a>
<ul class="dropdown-menu dropdown-menu-dark" aria-labelledby="navbarDropdown">
<li class="dropdown-item">
<a class="nav-link" href="{% url 'users:detail' request.user.username %}">{% translate "My Profile" %}</a>
</li>
<li><hr class="dropdown-divider"></li>
{% if request.user.teamsnap_preferences %}
<li class="dropdown-item">
<a class="nav-link" href="{% url 'teamsnap_preferences' %}">{% translate "TeamSnap Preferences" %}</a>
</li>
{% endif %}
<li><hr class="dropdown-divider"></li>
{% if request.user.gamechanger_account %}
<li class="dropdown-item">
<a class="nav-link" href="{% url 'gamechanger_account' %}">{% translate "GameChanger Account" %}</a>
</li>
<li class="dropdown-item">
<a class="nav-link" href="{% url 'gamechanger_preferences' %}">{% translate "GameChanger Preferences" %}</a>
</li>
<li class="dropdown-item">
<a class="nav-link" href="{% url 'gamechanger_import_roster' %}">{% translate "GameChanger Import Roster" %}</a>
</li>
<li><hr class="dropdown-divider"></li>
{% endif %}
<li class="dropdown-item">
<a class="nav-link" href="{% url 'account_logout' %}">{% translate "Sign Out" %}</a>
</li>
</ul>
</li>
{% else %}
{% if ACCOUNT_ALLOW_REGISTRATION %}
<li class="nav-item">
{# URL provided by django-allauth/account/urls.py #}
<a id="sign-up-link" class="nav-link" href="{% url 'account_signup' %}">{% translate "Sign Up" %}</a>
</li>
{% endif %}
<li class="nav-item">
{# URL provided by django-allauth/account/urls.py #}
<a id="log-in-link" class="nav-link" href="{% url 'account_login' %}">{% translate "Sign In" %}</a>
</li>
{% endif %}
</ul>
</div>
</div>
</nav>
</div>
{% block pre_container %}<div class="mt-1"></div>{% endblock pre_container %}
<div class="container">
{% if messages %}
{% 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 %}
<p>Use this document as a way to quick start any new project.</p>
{% endblock content %}
</div> <!-- /container -->
<footer class="text-center pt-4 my-md-5 pt-md-5">
<div class="container">
<div class="row row-cols-1 row-cols-lg-3">
<div class="col">
<small class="text-muted my-2">Copyright © 2022 BenchCoach</small>
</div>
</div>
</div>
</footer>
{% block modal %}{% endblock modal %}
{% block inline_javascript %}
{% comment %}
Script tags with only code, no src (defer by default). To run
with a "defer" so that you run inline code:
<script>
window.addEventListener('DOMContentLoaded', () => {/* Run whatever you want */});
</script>
{% endcomment %}
{% endblock inline_javascript %}
</body>
</html>