1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2024-12-20 22:42:21 +00:00
nk20/templates/base.html

159 lines
7.4 KiB
HTML
Raw Normal View History

2020-02-03 14:20:37 +00:00
{% load static i18n pretty_money static %}
2019-08-14 13:17:14 +00:00
{% comment %}
SPDX-License-Identifier: GPL-3.0-or-later
{% endcomment %}
2019-08-10 17:00:16 +00:00
<!DOCTYPE html>
2019-08-14 13:17:14 +00:00
<html lang="en" class="position-relative h-100">
2019-08-10 17:00:16 +00:00
<head>
2019-08-14 13:17:14 +00:00
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<title>
{% block title %}{{ title }}{% endblock title %} - {{ request.site.name }}
</title>
<meta name="description" content="{% trans "The ENS Paris-Saclay BDE note." %}">
2019-08-10 17:00:16 +00:00
2019-08-14 13:17:14 +00:00
{# Favicon #}
<link rel="apple-touch-icon" sizes="180x180" href="{% static "favicon/apple-touch-icon.png" %}">
<link rel="icon" type="image/png" sizes="32x32" href="{% static "favicon/favicon-32x32.png" %}">
<link rel="icon" type="image/png" sizes="16x16" href="{% static "favicon/favicon-16x16.png" %}">
<link rel="manifest" href="{% static "favicon/site.webmanifest" %}">
<link rel="mask-icon" href="{% static "favicon/safari-pinned-tab.svg" %}" color="#5bbad5">
<link rel="shortcut icon" href="{% static "favicon/favicon.ico" %}">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-config" content="{% static "favicon/browserconfig.xml" %}">
<meta name="theme-color" content="#ffffff">
2019-08-10 17:00:16 +00:00
2019-08-14 13:17:14 +00:00
{# Bootstrap CSS #}
<link rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"
integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO"
crossorigin="anonymous">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
{% block extracss %}{% endblock %}
</head>
2019-08-10 17:00:16 +00:00
<body>
2019-08-14 13:17:14 +00:00
<main>
<nav class="navbar navbar-expand-md navbar-light bg-light fixed-navbar">
<a class="navbar-brand" href="/">{{ request.site.name }}</a>
<button class="navbar-toggler" type="button" data-toggle="collapse"
data-target="#navbarNavAltMarkup"
aria-controls="navbarNavAltMarkup" aria-expanded="false"
aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavDropdown">
<ul class="navbar-nav">
<li class="nav-item active">
<a class="nav-link" href="#"><i class="fa fa-coffee"></i> Consos</a>
</li>
<li class="nav-item active">
<a class="nav-link" href="{% url 'member:club_list' %}"><i class="fa fa-users"></i> Clubs</a>
</li>
<li class="nav-item active">
<a class="nav-link" href="#"><i class="fa fa-calendar"></i> Activités</a>
</li>
<li class="nav-item active">
<a class="nav-link" href="{% url 'note:template_list' %}"><i class="fa fa-coffee"></i> Bouton</a>
</li>
</ul>
<ul class="navbar-nav ml-auto">
{% if user.is_authenticated %}
2019-08-10 17:00:16 +00:00
<li class="dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
2020-02-03 14:20:37 +00:00
<i class="fa fa-user"></i> {{ user.username }} ({{ user.note.balance | pretty_money }})
2019-08-10 17:00:16 +00:00
</a>
2019-08-14 13:17:14 +00:00
<div class="dropdown-menu dropdown-menu-right"
aria-labelledby="navbarDropdownMenuLink">
<a class="dropdown-item" href="{% url 'member:user_detail' pk=user.profile.pk %}">
<i class="fa fa-user"></i> Mon compte
</a>
2019-08-10 17:00:16 +00:00
<a class="dropdown-item" href="{% url 'logout' %}">
2019-08-14 13:17:14 +00:00
<i class="fa fa-sign-out"></i> Se déconnecter
</a>
2019-08-10 17:00:16 +00:00
</div>
</li>
2019-08-14 13:17:14 +00:00
{% else %}
2019-08-10 17:00:16 +00:00
<li class="nav-item active">
2019-08-11 14:21:59 +00:00
<a class="nav-link" href="{% url 'member:signup' %}">
2019-08-10 17:00:16 +00:00
<i class="fa fa-user-plus"></i> S'inscrire
</a>
</li>
<li class="nav-item active">
<a class="nav-link" href="{% url 'login' %}">
<i class="fa fa-sign-in"></i> Se connecter
</a>
</li>
2019-08-14 13:17:14 +00:00
{% endif %}
</ul>
</div>
</nav>
<div class="container-fluid mb-5 mt-2">
<div class="row">
2020-02-03 18:21:14 +00:00
<div class="col-md-1">
2019-08-14 13:17:14 +00:00
{% block sidebar %}
{% endblock %}
2019-08-10 17:00:16 +00:00
</div>
2019-08-14 13:17:14 +00:00
<div class="col-md-10 text-justify">
{% block contenttitle %}<h1>{{ title }}</h1>{% endblock %}
{% block content %}
2019-08-10 17:00:16 +00:00
<p>Default content...</p>
2019-08-14 13:17:14 +00:00
{% endblock content %}
2019-08-10 17:00:16 +00:00
</div>
</div>
2019-08-14 13:17:14 +00:00
</div>
</main>
2019-09-23 10:51:09 +00:00
<footer class="bg-light fixed-bottom py-2">
2019-08-14 13:17:14 +00:00
<div class="container-fluid">
<div class="row">
<div class="col-sm">
<form action="{% url 'set_language' %}" method="post"
class="form-inline">
<span class="text-muted mr-1">
NoteKfet2020 -
<a href="mailto:tresorie.bde@lists.crans.org"
class="text-muted">Nous contacter</a> -
</span>
{% csrf_token %}
<select title="language" name="language"
class="custom-select custom-select-sm"
onchange="this.form.submit()">
{% get_current_language as LANGUAGE_CODE %}
{% get_available_languages as LANGUAGES %}
{% get_language_info_list for LANGUAGES as languages %}
{% for language in languages %}
<option value="{{ language.code }}"
{% if language.code == LANGUAGE_CODE %}
selected{% endif %}>
{{ language.name_local }} ({{ language.code }})
</option>
{% endfor %}
</select>
<noscript>
<input type="submit">
</noscript>
</form>
</div>
<div class="col-sm text-right">
<a href="#" class="text-muted">Retour en haut</a>
</div>
2019-08-10 17:00:16 +00:00
</div>
2019-08-14 13:17:14 +00:00
</div>
</footer>
2019-08-10 17:00:16 +00:00
2019-08-14 13:17:14 +00:00
{# Bootstrap JavaScript #}
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"
integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49"
crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"
integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy"
crossorigin="anonymous"></script>
{% block extrajavascript %}
{% endblock extrajavascript %}
2019-08-10 17:00:16 +00:00
</body>
</html>