mirror of
https://framagit.org/la-chariotte/la-chariotte.git
synced 2025-05-02 11:52:27 +02:00
169 lines
No EOL
5.9 KiB
HTML
169 lines
No EOL
5.9 KiB
HTML
{% load static %}
|
|
<!DOCTYPE html>
|
|
<html lang="fr">
|
|
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<meta property="og:type" content="website">
|
|
<meta property="og:locale" content="fr_FR" />
|
|
<meta property="og:site_name" content="La chariotte">
|
|
<meta property="og:url" content="{{ BASE_URL }}{{ request.path }}">
|
|
|
|
<title>{% block title %}{% endblock %} - La Chariotte</title>
|
|
{% block css %}
|
|
<link rel="stylesheet" href="{% static 'css/app.css' %}">
|
|
<link rel="stylesheet" href="{% static 'fork-awesome/css/fork-awesome.min.css' %}">
|
|
{% block extra_css %}{% endblock extra_css %}
|
|
{% endblock css %}
|
|
<link rel="shortcut icon" href="{% static 'img/icons/chariotte.ico' %}">
|
|
</head>
|
|
|
|
<body>
|
|
<main>
|
|
<!-- Top navbar -->
|
|
<nav class="top-nav navbar">
|
|
<!-- Navbar brand : always visible (all screen sizes)-->
|
|
<div class="navbar-brand">
|
|
<p class="navbar-item is-size-4 has-text-weight-semibold">
|
|
{% block content_title %}Bienvenue :){% endblock %}
|
|
</p>
|
|
</div>
|
|
<div class="navbar-menu">
|
|
<div class="navbar-end">
|
|
<div class="navbar-item">
|
|
<div class="buttons">
|
|
{% if user.is_authenticated %}
|
|
<p class="mr-4">{{ user.get_full_name }}</p>
|
|
<a class="button is-light" href="{% url 'accounts:logout' %}">
|
|
<i class="fa fa-sign-out mr-3" aria-hidden="true"></i>Se déconnecter
|
|
</a>
|
|
{% else %}
|
|
<a class="button is-light" href="{% url 'accounts:signup' %}">
|
|
<i class="fa fa-user-plus mr-3" aria-hidden="true"></i><strong>Créer un compte</strong>
|
|
</a>
|
|
<a class="button is-primary" href="{% url 'accounts:login' %}">
|
|
<i class="fa fa-sign-in mr-3" aria-hidden="true"></i>Se connecter
|
|
</a>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
<!-- End Top navbar -->
|
|
|
|
<!-- Side navbar -->
|
|
<nav class="side-nav navbar is-fixed-top is-flex-desktop" role="navigation" aria-label="main navigation">
|
|
<!-- Navbar brand : always visible (all screen sizes)-->
|
|
<div class="navbar-brand">
|
|
<a class="navbar-item" href="{% url 'home' %}">
|
|
<img src="{% static 'img/logos/logo_la_chariotte.png' %}">
|
|
</a>
|
|
|
|
{% if user.is_authenticated %}
|
|
<div class="navbar-item desktop-hidden">
|
|
<a class="button is-light" href="{% url 'order:index' %}">
|
|
<i class="fa fa-shopping-basket mr-3" aria-hidden="true"></i>Mes commandes
|
|
</a>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="navbarBasicExample">
|
|
<span aria-hidden="true"></span>
|
|
<span aria-hidden="true"></span>
|
|
<span aria-hidden="true"></span>
|
|
</a>
|
|
</div>
|
|
|
|
<!-- Navbar menu : only visible on desktop-->
|
|
<div id="navbarBasicExample" class="navbar-menu">
|
|
<div class="navbar-start">
|
|
<a class="navbar-item" href="{% url 'home' %}">
|
|
<i class="fa fa-home mr-3" aria-hidden="true"></i>Accueil
|
|
</a>
|
|
|
|
{% if user.is_authenticated %}
|
|
<a class="navbar-item" href="{% url 'order:index' %}">
|
|
<i class="fa fa-shopping-basket mr-3" aria-hidden="true"></i>Mes commandes groupées
|
|
</a>
|
|
|
|
<a class="navbar-item" href="{% url 'order:create_grouped_order' %}">
|
|
<i class="fa fa-plus-circle mr-3" aria-hidden="true"></i>Créer une commande groupée
|
|
</a>
|
|
{% endif %}
|
|
|
|
<a class="navbar-item" href="{% url 'join_grouped_order' %}">
|
|
<i class="fa fa-users mr-3" aria-hidden="true"></i>Rejoindre une commande groupée
|
|
</a>
|
|
|
|
<a class="navbar-item" href="{% url 'notice' %}">
|
|
<i class="fa fa-question-circle mr-3" aria-hidden="true"></i>Comment ça marche ?
|
|
</a>
|
|
</div>
|
|
<hr>
|
|
<div class="navbar-item desktop-hidden">
|
|
<div class="buttons">
|
|
{% if user.is_authenticated %}
|
|
<a class="button is-light" href="{% url 'accounts:logout' %}">
|
|
<i class="fa fa-sign-out mr-3" aria-hidden="true"></i>Se déconnecter
|
|
</a>
|
|
{% else %}
|
|
<a class="button is-light" href="{% url 'accounts:signup' %}">
|
|
<strong>Créer un compte</strong>
|
|
</a>
|
|
<a class="button is-primary" href="{% url 'accounts:login' %}">
|
|
<i class="fa fa-sign-in mr-3" aria-hidden="true"></i>Se connecter
|
|
</a>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
<!-- End Navbar -->
|
|
<div class="content">
|
|
{% block content %}
|
|
{% endblock %}
|
|
</div>
|
|
</main>
|
|
<footer class="footer">
|
|
<div class="content has-text-centered columns">
|
|
<div class="column">
|
|
<p>
|
|
<strong>La Chariotte</strong> | version 1.0.0
|
|
</p>
|
|
</div>
|
|
<div class="column">
|
|
<a href="{% url 'legal_notice' %}">Mentions légales</a>
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
</body>
|
|
|
|
</html>
|
|
|
|
<script>
|
|
// For responsive menu
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
|
|
// Get all "navbar-burger" elements
|
|
const $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll('.navbar-burger'), 0);
|
|
|
|
// Add a click event on each of them
|
|
$navbarBurgers.forEach(el => {
|
|
el.addEventListener('click', () => {
|
|
|
|
// Get the target from the "data-target" attribute
|
|
const target = el.dataset.target;
|
|
const $target = document.getElementById(target);
|
|
|
|
// Toggle the "is-active" class on both the "navbar-burger" and the "navbar-menu"
|
|
el.classList.toggle('is-active');
|
|
$target.classList.toggle('is-active');
|
|
|
|
});
|
|
});
|
|
|
|
});
|
|
{% block extra_js %} {% endblock %}
|
|
</script> |