mirror of
https://gitlab.crans.org/bde/nk20
synced 2024-11-27 02:43:01 +00:00
start frontend
This commit is contained in:
parent
fb8e6cafef
commit
28a747ac17
@ -30,13 +30,12 @@ ALLOWED_HOSTS = []
|
|||||||
|
|
||||||
INSTALLED_APPS = [
|
INSTALLED_APPS = [
|
||||||
# Theme overrides Django Admin templates
|
# Theme overrides Django Admin templates
|
||||||
'theme',
|
# 'theme',
|
||||||
|
|
||||||
# External apps
|
# External apps
|
||||||
'polymorphic',
|
'polymorphic',
|
||||||
'guardian',
|
'guardian',
|
||||||
'reversion',
|
'reversion',
|
||||||
|
|
||||||
# Django contrib
|
# Django contrib
|
||||||
'django.contrib.admin',
|
'django.contrib.admin',
|
||||||
'django.contrib.admindocs',
|
'django.contrib.admindocs',
|
||||||
@ -71,7 +70,7 @@ ROOT_URLCONF = 'note_kfet.urls'
|
|||||||
TEMPLATES = [
|
TEMPLATES = [
|
||||||
{
|
{
|
||||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||||
'DIRS': [],
|
'DIRS': [os.path.join(BASE_DIR,'templates')],
|
||||||
'APP_DIRS': True,
|
'APP_DIRS': True,
|
||||||
'OPTIONS': {
|
'OPTIONS': {
|
||||||
'context_processors': [
|
'context_processors': [
|
||||||
@ -150,7 +149,11 @@ USE_TZ = True
|
|||||||
# Don't put anything in this directory yourself; store your static files
|
# Don't put anything in this directory yourself; store your static files
|
||||||
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
|
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
|
||||||
# Example: "/var/www/example.com/static/"
|
# Example: "/var/www/example.com/static/"
|
||||||
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
|
STATIC_ROOT = os.path.realpath(__file__)
|
||||||
|
STATICFILES_DIRS = [
|
||||||
|
os.path.join(BASE_DIR,'static')]
|
||||||
|
|
||||||
|
CRISPY_TEMPLATE_PACK = 'bootstrap4'
|
||||||
|
|
||||||
# URL prefix for static files.
|
# URL prefix for static files.
|
||||||
# Example: "http://example.com/static/", "http://static.example.com/"
|
# Example: "http://example.com/static/", "http://static.example.com/"
|
||||||
|
17
static/css/base.css
Normal file
17
static/css/base.css
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
/* Footer en bas */
|
||||||
|
html {
|
||||||
|
position: relative;
|
||||||
|
min-height: 100%;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
margin-bottom: 70px; /* Margin bottom by footer height */
|
||||||
|
}
|
||||||
|
.footer {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 60px; /* Set the fixed height of the footer here */
|
||||||
|
line-height: 60px; /* Vertically center the text there */
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
}
|
||||||
|
/* Affichage des accords dans les interlignes */
|
106
templates/base.html
Normal file
106
templates/base.html
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
{% load static %}
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<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 %}NoteKfet2020{% endblock title %}</title>
|
||||||
|
<meta name="description" content="A framework for launching new Django projects quickly.">
|
||||||
|
<meta name="author" content="">
|
||||||
|
<link rel="shortcut icon" type="image/x-icon" href="{% static 'img/favicon.ico' %}">
|
||||||
|
|
||||||
|
{% block css %}
|
||||||
|
<!-- 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">
|
||||||
|
<link rel="stylesheet" href="{% static 'css/base.css' %}">
|
||||||
|
{% endblock %}
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<main>
|
||||||
|
<nav class="navbar navbar-expand-md navbar-light bg-light fixed-navbar">
|
||||||
|
<a class="navbar-brand" href="#">NK20-dev</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="#"><i class="fa fa-users"></i> Membres</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item active">
|
||||||
|
<a class="nav-link" href="#"><i class="fa fa-calendar"></i> Activités</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<ul class="navbar-nav ml-auto">
|
||||||
|
{% if user.is_authenticated%}
|
||||||
|
<li class="dropdown">
|
||||||
|
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
|
<i class="fa fa-user-circle"> {{ user.username }}</i>
|
||||||
|
</a>
|
||||||
|
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdownMenuLink">
|
||||||
|
<a class="dropdown-item" href="#"> <i class="fa fa-user"></i> Mon compte </a>
|
||||||
|
<a class="dropdown-item" href="{% url 'logout' %}">
|
||||||
|
<i class="fa fa-sign-out"></i>
|
||||||
|
Se déconnecter</a>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
{% else%}
|
||||||
|
<li class="nav-item active">
|
||||||
|
<a class="nav-link" href="{% url 'signup' %}">
|
||||||
|
<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>
|
||||||
|
{% endif%}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
<div class="container-fluid h-100">
|
||||||
|
<div class="row h-100">
|
||||||
|
<div class="col-md-2">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class ="col-md-10 text-justify mt-5">
|
||||||
|
{% block content %}
|
||||||
|
<p>Default content...</p>
|
||||||
|
{% endblock content %}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
<footer class="footer mt-2">
|
||||||
|
<div class="container">
|
||||||
|
<span class="text-muted"> NoteKfet2020 - Nous contacter - </span>
|
||||||
|
<p class="pull-right"> <a href="#">Retour en haut</a></p>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
{% block javascript %}
|
||||||
|
<!-- 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>
|
||||||
|
|
||||||
|
<!-- 3rd party JavaScript -->
|
||||||
|
|
||||||
|
<!-- Project JS -->
|
||||||
|
<script src="{% static 'js/base.js' %}"></script>
|
||||||
|
|
||||||
|
{% endblock javascript %}
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -1,28 +1,10 @@
|
|||||||
{% extends "admin/base_site.html" %}
|
{% extends "base.html" %}
|
||||||
{% comment %}
|
{% comment %}
|
||||||
SPDX-License-Identifier: GPL-2.0-or-later
|
SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
{% endcomment %}
|
{% endcomment %}
|
||||||
|
|
||||||
{% load i18n static %}
|
{% load i18n static %}
|
||||||
|
|
||||||
{% block breadcrumbs %}
|
|
||||||
<div class="breadcrumbs">
|
|
||||||
<a href="{% url 'index' %}">{% trans 'Home' %}</a>
|
|
||||||
{% if title %} › {{ title }}{% endif %}
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block extrahead %}{{ block.super }}
|
|
||||||
{# Load Django Admin widgets #}
|
|
||||||
<script type="text/javascript" src="{% url 'admin:jsi18n' %}"></script>
|
|
||||||
<script type="text/javascript" src="{% static 'admin/js/core.js' %}"></script>
|
|
||||||
{{ form.media }}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block extrastyle %}{{ block.super }}
|
|
||||||
<link rel="stylesheet" type="text/css" href="{% static "admin/css/forms.css" %}">
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<form method="post" onsubmit="window.onbeforeunload=null">{% csrf_token %}
|
<form method="post" onsubmit="window.onbeforeunload=null">{% csrf_token %}
|
||||||
{% if form.non_field_errors %}
|
{% if form.non_field_errors %}
|
16
templates/registration/logged_out.html
Normal file
16
templates/registration/logged_out.html
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{% extends "registration/logged_out.html" %}
|
||||||
|
{% comment %}
|
||||||
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
{% endcomment %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
|
{% block breadcrumbs %}
|
||||||
|
<div class="breadcrumbs">
|
||||||
|
<a href="{% url 'index' %}">{% trans 'Home' %}</a>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<p>{% trans "Thanks for spending some quality time with the Web site today." %}</p>
|
||||||
|
<p><a href="{% url 'index' %}">{% trans 'Log in again' %}</a></p>
|
||||||
|
{% endblock %}
|
8
templates/registration/login.html
Normal file
8
templates/registration/login.html
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{% extends "admin/login.html" %}
|
||||||
|
{% comment %}
|
||||||
|
SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
{% endcomment %}
|
||||||
|
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
|
{% block title %}{% trans "Log in" %}{% endblock %}
|
11
templates/registration/password_change_done.html
Normal file
11
templates/registration/password_change_done.html
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{% extends "registration/password_change_done.html" %}
|
||||||
|
{% comment %}
|
||||||
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
{% endcomment %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
|
{% block breadcrumbs %}
|
||||||
|
<div class="breadcrumbs">
|
||||||
|
<a href="{% url 'index' %}">{% trans 'Home' %}</a> › {% trans 'Password change' %}
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
11
templates/registration/password_change_form.html
Normal file
11
templates/registration/password_change_form.html
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{% extends "registration/password_change_form.html" %}
|
||||||
|
{% comment %}
|
||||||
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
{% endcomment %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
|
{% block breadcrumbs %}
|
||||||
|
<div class="breadcrumbs">
|
||||||
|
<a href="{% url 'index' %}">{% trans 'Home' %}</a> › {% trans 'Password change' %}
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
11
templates/registration/password_reset_complete.html
Normal file
11
templates/registration/password_reset_complete.html
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{% extends "registration/password_reset_complete.html" %}
|
||||||
|
{% comment %}
|
||||||
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
{% endcomment %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
|
{% block breadcrumbs %}
|
||||||
|
<div class="breadcrumbs">
|
||||||
|
<a href="{% url 'index' %}">{% trans 'Home' %}</a> › {% trans 'Password reset' %}
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
11
templates/registration/password_reset_confirm.html
Normal file
11
templates/registration/password_reset_confirm.html
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{% extends "registration/password_reset_confirm.html" %}
|
||||||
|
{% comment %}
|
||||||
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
{% endcomment %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
|
{% block breadcrumbs %}
|
||||||
|
<div class="breadcrumbs">
|
||||||
|
<a href="{% url 'index' %}">{% trans 'Home' %}</a> › {% trans 'Password reset confirmation' %}
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
11
templates/registration/password_reset_done.html
Normal file
11
templates/registration/password_reset_done.html
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{% extends "registration/password_reset_done.html" %}
|
||||||
|
{% comment %}
|
||||||
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
{% endcomment %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
|
{% block breadcrumbs %}
|
||||||
|
<div class="breadcrumbs">
|
||||||
|
<a href="{% url 'index' %}">{% trans 'Home' %}</a> › {% trans 'Password reset' %}
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
13
templates/registration/password_reset_email.html
Normal file
13
templates/registration/password_reset_email.html
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{% load i18n %}{% autoescape off %}
|
||||||
|
{% blocktrans %}You're receiving this email because you requested a password reset for your user account at {{ site_name }}.{% endblocktrans %}
|
||||||
|
|
||||||
|
{% trans "Please go to the following page and choose a new password:" %}
|
||||||
|
{% block reset_link %}
|
||||||
|
{{ protocol }}://{{ domain }}{% url 'password_reset_confirm' uidb64=uid token=token %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% trans "Thanks for using our site!" %}
|
||||||
|
|
||||||
|
{% blocktrans %}The {{ site_name }} team{% endblocktrans %}
|
||||||
|
|
||||||
|
{% endautoescape %}
|
11
templates/registration/password_reset_form.html
Normal file
11
templates/registration/password_reset_form.html
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{% extends "registration/password_reset_form.html" %}
|
||||||
|
{% comment %}
|
||||||
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
{% endcomment %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
|
{% block breadcrumbs %}
|
||||||
|
<div class="breadcrumbs">
|
||||||
|
<a href="{% url 'index' %}">{% trans 'Home' %}</a> › {% trans 'Password reset' %}
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
Loading…
Reference in New Issue
Block a user