Add lost password recovery
This commit is contained in:
5
templates/#_footer.html#
Normal file
5
templates/#_footer.html#
Normal file
@@ -0,0 +1,5 @@
|
||||
|
||||
<footer>
|
||||
<
|
||||
<p> Réalisé avec Flask et un thème bootstrap @mdo </p>
|
||||
</footer>
|
||||
39
templates/#new_article_blog.html#
Normal file
39
templates/#new_article_blog.html#
Normal file
@@ -0,0 +1,39 @@
|
||||
{% extends 'up_squelette.html' %}
|
||||
|
||||
|
||||
{% block main %}
|
||||
|
||||
<div class="col-sm-1"></div>
|
||||
<div class="col-sm-10">
|
||||
<br />
|
||||
<div class="well"> Hello <span id="majuscule">{{ session['username'] }} ! </span>
|
||||
Bienvenue sur la création d'un nouvel article de blog. Vous pouvez créer ou importer un article de blog ici,
|
||||
vous avez le choix de le rendre publique dès sa création en cochant publique ou le laisser en privé
|
||||
si vous souhaitez le modifier plus-tard avant sa publication.
|
||||
Par défaut il est laissé en privé pour éviter les publications
|
||||
accidentelles.
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<form method="POST" action="{{ url_for('blog.new_article') }}" id="postform">
|
||||
<!--<input type="text" name="category" id="category" placeholder="Catégorie" class="form-control"><br />-->
|
||||
<input type="text" name="title" id="title" placeholder="Titre" class="form-control"><br />
|
||||
<input type="text" name="subtitle" id="subtitle" placeholder="Sous-titre" class="form-control"><br />
|
||||
<hr>
|
||||
<textarea id="editeurMarkdown" class="form-control" form="postform" name="content" id="content" placeholder="Contenu" style="height:10vw;"></textarea><br />
|
||||
<div class="row">
|
||||
<div class="col-sm-4"></div>
|
||||
<div class="col-sm-1"><input type="radio" name="status" value="privé" checked> Privé </div>
|
||||
<div class="col-sm-2"></div>
|
||||
<div class="col-sm-1"><input type="radio" name="status" value="publique">Public<br></div>
|
||||
<div class="col-sm-4"></div>
|
||||
</div>
|
||||
<br />
|
||||
<button id="tada" class="btn btn-default btn-primary" type="submit"> Créer l'article </button>
|
||||
</form>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
15
templates/_flash_msgs.html
Normal file
15
templates/_flash_msgs.html
Normal file
@@ -0,0 +1,15 @@
|
||||
<div class="msginfo">
|
||||
{# on affiche les messages d'erreur puis les messages de succes #}
|
||||
{% for categorie in ['error', 'succes'] %}
|
||||
{% with msgs = get_flashed_messages(category_filter=[categorie]) %}
|
||||
{% if msgs %}
|
||||
<div class="flashed {{ categorie }}">
|
||||
{% for m in msgs %}
|
||||
<p>{{ m|safe }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
7
templates/_footer.html
Normal file
7
templates/_footer.html
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
|
||||
<footer>
|
||||
|
||||
<p> Réalisé avec Flask et un thème bootstrap @mdo </p>
|
||||
|
||||
</footer>
|
||||
@@ -15,5 +15,5 @@
|
||||
<link href="{{ url_for('static', filename='up.css') }}" rel="stylesheet">
|
||||
<link href="{{ url_for('static', filename='cover.css') }}" rel="stylesheet">
|
||||
<link href="{{ url_for('static', filename='simplemde.min.css') }}" rel="stylesheet">
|
||||
<script type="text/javascript" src="{{ url_for('static', filename='divhider.js') }}"></script>
|
||||
|
||||
</head>
|
||||
|
||||
5
templates/_js-core.html
Normal file
5
templates/_js-core.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<!-- Bootstrap core JavaScript -->
|
||||
<!--================================================== -->
|
||||
<!-- Placed at the end of the document so the pages load faster -->
|
||||
<script src="{{ url_for('static', filename='jquery.min.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='bootstrap.min.js') }}"></script>
|
||||
1
templates/_js-gallery.html
Normal file
1
templates/_js-gallery.html
Normal file
@@ -0,0 +1 @@
|
||||
<script src="{{ url_for('static', filename='docs.min.js') }}"></script>
|
||||
@@ -3,6 +3,7 @@
|
||||
<!-- Placed at the end of the document so the pages load faster -->
|
||||
<script src="{{ url_for('static', filename='jquery.min.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='bootstrap.min.js') }}"></script>
|
||||
|
||||
<script src="{{ url_for('static', filename='docs.min.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='simplemde.min.js') }}"></script>
|
||||
|
||||
|
||||
10
templates/_js_editor.html
Normal file
10
templates/_js_editor.html
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
<script src="{{ url_for('static', filename='simplemde.min.js') }}"></script>
|
||||
|
||||
<script>
|
||||
new SimpleMDE({
|
||||
element: document.getElementById("editeurMarkdown"),
|
||||
spellChecker: true,
|
||||
});
|
||||
|
||||
</script>
|
||||
@@ -1,6 +1,5 @@
|
||||
<!-- Fixed navbar -->
|
||||
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
@@ -8,22 +7,44 @@
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<!--<li class="active"><a href="/blog/">Blog</a></li>-->
|
||||
</div>
|
||||
<div class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li {% if section == "Post-it" %} class="active" {% endif %}>
|
||||
<a href="/post-it/">
|
||||
<span class="glyphicon glyphicon-globe" aria-hidden="true"></span>
|
||||
Post-it !
|
||||
</a>
|
||||
</li>
|
||||
<li{% if section == "Files" %} class="active" {% endif %} >
|
||||
<ul class="nav navbar-nav">
|
||||
<li{% if section == "Mon Blog" %} class="active" {% endif %}>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="glyphicon glyphicon-globe" aria-hidden="true"></span>
|
||||
Mon blog
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="/myblog/new-article/"> <span class="glyphicon" aria-hidden="true"></span>
|
||||
Ecrire un billet </a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/myblog/list-articles/"><span class="glyphicon" aria-hidden="true">
|
||||
</span>
|
||||
Gérer mes billets
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/myblog/personalize/"><span class="glyphicon glyphicon-cog" aria-hidden="true"></span>
|
||||
Personnaliser mon blog
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/myblog/view/"><span class="glyphicon" aria-hidden="true"></span>
|
||||
Voir mon blog
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li{% if section == "Files" %} class="active" {% endif %} >
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="glyphicon glyphicon-folder-open" aria-hidden="true"></span> Mes Fichiers</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="/view/"> <span class="glyphicon glyphicon-cloud-download" aria-hidden="true"></span>
|
||||
Fichiers envoyés </a></li>
|
||||
Fichiers envoyés </a></li>
|
||||
<li><a href="/filesupload/"><span class="glyphicon glyphicon-cloud-upload" aria-hidden="true"></span>
|
||||
Envoyer des fichiers</a></li>
|
||||
<li><a href="/gallery/"><span class="glyphicon glyphicon-cog" aria-hidden="true"></span>
|
||||
@@ -31,43 +52,47 @@
|
||||
</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
<li{% if section == "mailbox" %} class="active" {% endif %} >
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="glyphicon glyphicon-comment" aria-hidden="true"></span> Ma Messagerie </a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="/mymailbox/alias"><span class="glyphicon glyphicon-sunglasses" aria-hidden="true"></span>
|
||||
Gerer mes alias</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
<li{% if section == "mailbox" %} class="active" {% endif %} >
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="glyphicon glyphicon-comment" aria-hidden="true"></span> Ma Messagerie </a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="/mymailbox/alias"><span class="glyphicon glyphicon-sunglasses" aria-hidden="true"></span>
|
||||
Gerer mes alias</a></li>
|
||||
</li>
|
||||
<li{% if section == "Logs" %} class="active" {% endif %}>
|
||||
<a href="/logs/"><span class="glyphicon glyphicon-floppy-disk" aria-hidden="true"></span>
|
||||
Logs
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
<li{% if section == "Logs" %} class="active" {% endif %}>
|
||||
<a href="/logs/"><span class="glyphicon glyphicon-floppy-disk" aria-hidden="true"></span>
|
||||
Logs
|
||||
</a>
|
||||
</li>
|
||||
<li {% if section == "Profil" %} class="dropdown active" {% else %} class="dropdown" {% endif %}>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="glyphicon glyphicon-home" aria-hidden="true"></span> <span id="majuscule">{{ session['username'] }} </span><span class="caret"></span></a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="/profil/"><span class="glyphicon glyphicon-user" aria-hidden="true"></span> Profil</a></li>
|
||||
<li><a href="/profil/change-password/"> <span class="glyphicon glyphicon-lock" aria-hidden="true"></span>
|
||||
Changer mon mot de passe </a></li>
|
||||
<li><a href="/invitation/"><span class="glyphicon glyphicon-cog" aria-hidden="true"></span> Inviter une personne</a></li>
|
||||
<li><a href="/delete_me/"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> Supprimer mon compte </a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="/logout/">
|
||||
<span class="glyphicon glyphicon-off" aria-hidden="true"></span>
|
||||
Se déconnecter
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<li {% if section == "Profil" %} class="dropdown active" {% else %} class="dropdown" {% endif %}>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="glyphicon glyphicon-home" aria-hidden="true"></span>
|
||||
<span id="majuscule">{{ session['username'] }} </span>
|
||||
<span class="caret"></span></a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="/profil/"><span class="glyphicon glyphicon-user" aria-hidden="true"></span> Profil</a></li>
|
||||
<li><a href="/profil/change-password/"> <span class="glyphicon glyphicon-lock" aria-hidden="true"></span>
|
||||
Changer mon mot de passe </a></li>
|
||||
<li><a href="/invitation/"><span class="glyphicon glyphicon-cog" aria-hidden="true"></span> Inviter une personne</a></li>
|
||||
<li><a href="/delete_me/"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> Supprimer mon compte </a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="/logout/">
|
||||
<span class="glyphicon glyphicon-off" aria-hidden="true"></span>
|
||||
Se déconnecter
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div><!--/.nav-collapse -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="no-js" lang="fr">
|
||||
<html lang="fr">
|
||||
|
||||
{% include '_head.html' %}
|
||||
<body>
|
||||
@@ -35,6 +35,7 @@
|
||||
<input type="text" name="user" id="user" placeholder="Utilisateur" class="form-control" width="200px"><br />
|
||||
<input type="password" name="passwd" id="passwd" placeholder="Mot de passe" class="form-control"><br />
|
||||
<br>
|
||||
<p class="lead"><a href="{{ url_for('loginlogout.lost_password') }}"> Mouarf j'ai perdu mon mot de passe </a> </p>
|
||||
<button id="tada" class="btn btn-default btn-primary" type="submit"> Login </button>
|
||||
</form>
|
||||
</p>
|
||||
@@ -49,6 +50,8 @@
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% include '_footer.html' %}
|
||||
|
||||
{% include '_js.html' %}
|
||||
|
||||
</body>
|
||||
|
||||
@@ -1,100 +1,24 @@
|
||||
{% extends 'up_squelette.html' %}
|
||||
|
||||
|
||||
{% block main %}
|
||||
|
||||
<div class="col-sm-1"></div>
|
||||
<div class="col-sm-10">
|
||||
<br />
|
||||
<div class="well"> Hello <span id="majuscule">{{ session['username'] }} ! </span>
|
||||
Bienvenue sur le tableau de post-it communautaire.
|
||||
Il vous est possible de laisser des post-its en tout genre sur cette page.
|
||||
Vous disposez pour cela d'un éditeur de type Markdown.
|
||||
Une page <a href="/postit/board"><span class="glyphicon glyphicon-star" aria-hidden="true"></span>
|
||||
est là pour consulter le tableau public du serveur</a>.
|
||||
Celui-ci regroupe tout les post-it public des utilisateurs inscrits sur le serveur.<br>
|
||||
Vous pouvez aussi écrire des post-its privé que vous seul pourrez consulter.
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<form method="POST" action="{{ url_for('post-it.racine_blog') }}" id="postform">
|
||||
<!--<input type="text" name="category" id="category" placeholder="Catégorie" class="form-control"><br />-->
|
||||
<input type="text" name="title" id="title" placeholder="Titre" class="form-control"><br />
|
||||
<textarea id="editeurMarkdown" class="form-control" form="postform" name="content" id="content" placeholder="Contenu" style="height:10vw;"></textarea><br />
|
||||
<div class="row">
|
||||
<div class="col-sm-4"></div>
|
||||
<div class="col-sm-1"><input type="radio" name="status" value="prive" checked>Privé</div>
|
||||
<div class="col-sm-2"></div>
|
||||
<div class="col-sm-1"><input type="radio" name="status" value="public">Public<br></div>
|
||||
<div class="col-sm-4"></div>
|
||||
</div>
|
||||
<br />
|
||||
<button id="tada" class="btn btn-default btn-primary" type="submit">Publier</button>
|
||||
</form>
|
||||
|
||||
<br>
|
||||
|
||||
<div class="row">
|
||||
{% for post in posts %}
|
||||
|
||||
|
||||
<div class="well col-sm-5 post-it" style="margin: 30px;">
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title> Blog de {{ user }} </title>
|
||||
<link rel="stylesheet" href="/static/blog.css" type="text/css">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<div class="col-sm-1">
|
||||
{% if post.avatar != None %}
|
||||
<img src="/profil/{{ post.author }}/{{ post.avatar }}" class="img-rounded" alt="" width="50" height="50"/>
|
||||
{% endif %}
|
||||
</head>
|
||||
|
||||
<br><br>
|
||||
<p> {{ post.author }} </p>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-8 content" style="margin: 10px;">
|
||||
<h6>{{ post.time }}</h6>
|
||||
<h1>{{ post.title }}</h1>
|
||||
{{ post.content[0:100]|safe }} ...
|
||||
<br/>
|
||||
<br/>
|
||||
<button type="button" class="btn btn-default btn-primary" data-toggle="modal" data-target="#{{ post.id_postit }}"> Déplier </button>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-1">
|
||||
{% if post.author == session['username'] %}
|
||||
{% if post.status == 'prive' %}
|
||||
<h4><span class="label label-danger">Privé</span></h4>
|
||||
{% else %}
|
||||
<h4><span class="label label-success">Public</span></h4>
|
||||
{% endif %}
|
||||
<br /><br>
|
||||
<a href="{{ url_for('post-it.edit', title=post.title, time=post.time) }}"><button type="button" class="btn btn-sm btn-primary"><span class="glyphicon glyphicon-edit" aria-hidden="true"></span></button></a><br /><br>
|
||||
<a href="{{ url_for('post-it.delete', title=post.title, time=post.time ) }}"><button type="button" class="btn btn-sm btn-danger"><span class="glyphicon glyphicon-trash" aria-hidden="true"></span></button></a><br /><br>
|
||||
{% endif %}
|
||||
</div>
|
||||
<body>
|
||||
<div class="articles">
|
||||
|
||||
<h2 class="titre"> {{ post_info.title }} </h2>
|
||||
|
||||
<h5 class="titre">Publié le {{ post_info.time }} </h5>
|
||||
|
||||
</div>
|
||||
<h2 class="description titre"> {{ post_info.subtitle }} </h2>
|
||||
<hr/>
|
||||
{{ content|safe }}
|
||||
|
||||
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="{{ post.id_postit }}" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">{{ post.title }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{{ post.content|safe }}
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
|
||||
40
templates/edit_article.html
Normal file
40
templates/edit_article.html
Normal file
@@ -0,0 +1,40 @@
|
||||
{% extends 'up_squelette.html' %}
|
||||
|
||||
{% block main %}
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-1"></div>
|
||||
<div class="col-sm-10">
|
||||
<div class="well">Vous pouvez modifier votre article. Actuellement seule la date de première édition sera publiée. Prochainement : intégration de la date de mise à jour dans la base de donnée.</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2> {{ oldpost[0] }}</h2><br />
|
||||
<form action="" method="POST" id="postform" style="height: 15vw;">
|
||||
|
||||
<input type="text" name="subtitle" id="subtitle" placeholder="Titre" class="form-control" value="{{ oldpost[1] }}"><br />
|
||||
<textarea id="editeurMarkdown" class="form-control" form="postform" name="content" id="content" placeholder="Contenu" >{{ content }}</textarea><br />
|
||||
<h3> Visibilité </h3>
|
||||
<div class="row">
|
||||
{% if oldpost[2] == 'public' %}
|
||||
<div class="col-sm-4"></div>
|
||||
<div class="col-sm-1"><input type="radio" name="status" value="prive"> <br/>Privé </div>
|
||||
<div class="col-sm-2"></div>
|
||||
<div class="col-sm-1"><input type="radio" name="status" value="public" checked> <br/> Publique </div>
|
||||
<div class="col-sm-4"></div>
|
||||
{% else %}
|
||||
<div class="col-sm-4"></div>
|
||||
<div class="col-sm-1"><input type="radio" name="status" value="Privé" checked> <br/> Privé </div>
|
||||
<div class="col-sm-2"></div>
|
||||
<div class="col-sm-1"><input type="radio" name="status" value="public"> <br/> Publique </div>
|
||||
<div class="col-sm-4"></div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<br />
|
||||
<button id="tada" class="btn btn-default btn-primary" type="submit"> Mettre à jour </button>
|
||||
</form>
|
||||
<br />
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
</div>
|
||||
@@ -5,10 +5,6 @@
|
||||
|
||||
<div class="container theme-showcase" role="main">
|
||||
|
||||
<!--<div class="page-header">
|
||||
<h1>Images uploadées :</h1>
|
||||
</div>-->
|
||||
|
||||
<br />
|
||||
|
||||
{% if fichiers %}
|
||||
|
||||
27
templates/index_blog.html
Normal file
27
templates/index_blog.html
Normal file
@@ -0,0 +1,27 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title> Blog de {{ user }} </title>
|
||||
<link rel="stylesheet" href="/static/blog.css" type="text/css">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="articles">
|
||||
{% for post in posts %}
|
||||
|
||||
<h2 class="index"><a href="/blog/{{user}}/{{post.title}}"> {{ post.title }}</a></h2>
|
||||
<small>
|
||||
<time datetime="{{ post.time }}">
|
||||
Publié le {{ post.time }}
|
||||
</time>
|
||||
</small>
|
||||
<div class="slug">
|
||||
<p> {{ post.subtitle }} </p>
|
||||
<p class="readmore"> <a style="margin-right:2rem;" href="/blog/{{user}}/{{post.title}}"> Lire la suite... </a></p>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
44
templates/list_articles.html
Normal file
44
templates/list_articles.html
Normal file
@@ -0,0 +1,44 @@
|
||||
{% extends 'up_squelette.html' %}
|
||||
|
||||
|
||||
{% block main %}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h2> Vos articles de blog </h2>
|
||||
<table class="table" >
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Titre <span class="badge">{{ nb_articles }}</span></th>
|
||||
<th> Créé le : </th>
|
||||
<th> Dernière modification </th>
|
||||
<th> status </th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody style="text-align: left;">
|
||||
|
||||
{% for article in list_posts %}
|
||||
<tr>
|
||||
<td>{{ article.title }}</td>
|
||||
<td>{{ article.time }}</td>
|
||||
<td>{{ article.last_updated }} </td>
|
||||
<td>{{ article.status }}</td>
|
||||
<td><a href="{{ url_for('blog.edit', title=article.title) }}"><button type="button" class="btn btn-sm btn-info"> Editer </button></a></td>
|
||||
<td><a href="{{ url_for('blog.delete', title=article.title) }}"><button type="button" class="btn btn-sm btn-danger">Supprimer</button></a></td>
|
||||
<td><a href="{{ url_for('blog.edit', title=article.title) }}"><button type="button" class="btn btn-sm btn-success"> Publier </button></a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
53
templates/lost_password.html
Normal file
53
templates/lost_password.html
Normal file
@@ -0,0 +1,53 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
{% include '_head.html' %}
|
||||
<body>
|
||||
|
||||
{% block main %}
|
||||
|
||||
<div class="site-wrapper">
|
||||
|
||||
<div class="site-wrapper-inner">
|
||||
|
||||
<div class="cover-container">
|
||||
|
||||
<div class="masthead clearfix">
|
||||
<div class="inner">
|
||||
<h3 class="masthead-brand">Pywallter</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="inner cover">
|
||||
<h1 class="cover-heading"> J'ai perdu mon mot de passe </h1>
|
||||
<p class="lead">
|
||||
Hé oui ca arrive à tout le monde... Il existe des gestionnaire des mots de passe pour éviter que t'arrives trop souvent. <a href="https://keepassxc.org/">Tiens en voilà un par exemple</a> et ca existe <a href="https://apps.apple.com/fr/app/keepass-password-manager/id6461546929?platform=iphone"> pour iphone </a> et <a href="https://www.keepassdx.com/"> pour android </a>
|
||||
<br/>
|
||||
</p>
|
||||
<br>
|
||||
|
||||
{% include '_flash_msgs.html' %}
|
||||
<p class="lead">
|
||||
<form method="POST" action="{{ url_for('loginlogout.lost_password') }}">
|
||||
<input type="text" name="user" id="user" placeholder="Utilisateur" class="form-control" width="200px"><br />
|
||||
<button id="tada" class="btn btn-default btn-primary" type="submit"> Nom d'utilisateur </button>
|
||||
</form>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% include '_footer.html' %}
|
||||
|
||||
{% include '_js.html' %}
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -19,8 +19,8 @@
|
||||
|
||||
<div class="panel-body">
|
||||
<form method="POST" action="" enctype="multipart/form-data">
|
||||
|
||||
<p> Votre Adresse e-mail sur ce serveur : {{ address }} </p>
|
||||
|
||||
<p> Votre Adresse e-mail sur ce serveur : {{ username }} </p>
|
||||
|
||||
<label> Mot de passe </label>
|
||||
<input type="password" name="password" id="password" placeholder="Votre mot de passe" class="form-control"><br />
|
||||
|
||||
40
templates/new_article_blog.html
Normal file
40
templates/new_article_blog.html
Normal file
@@ -0,0 +1,40 @@
|
||||
|
||||
{% extends 'up_squelette.html' %}
|
||||
|
||||
|
||||
{% block main %}
|
||||
|
||||
<div class="col-sm-1"></div>
|
||||
<div class="col-sm-10">
|
||||
<br />
|
||||
<div class="well"> Hello <span id="majuscule">{{ session['username'] }} ! </span>
|
||||
Bienvenue sur la création d'un nouvel article de blog. Vous pouvez créer ou importer un article de blog ici,
|
||||
vous avez le choix de le rendre publique dès sa création en cochant publique ou le laisser en privé
|
||||
si vous souhaitez le modifier plus-tard avant sa publication.
|
||||
Par défaut il est laissé en privé pour éviter les publications
|
||||
accidentelles.
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<form method="POST" action="{{ url_for('blog.new_article') }}" id="postform">
|
||||
<!--<input type="text" name="category" id="category" placeholder="Catégorie" class="form-control"><br />-->
|
||||
<input type="text" name="title" id="title" placeholder="Titre" class="form-control"><br />
|
||||
<input type="text" name="subtitle" id="subtitle" placeholder="Sous-titre" class="form-control"><br />
|
||||
<hr>
|
||||
<textarea id="editeurMarkdown" class="form-control" form="postform" name="content" id="content" placeholder="Contenu" style="height:10vw;"></textarea><br />
|
||||
<div class="row">
|
||||
<div class="col-sm-4"></div>
|
||||
<div class="col-sm-1"><input type="radio" name="status" value="private" checked>Privé</div>
|
||||
<div class="col-sm-2"></div>
|
||||
<div class="col-sm-1"><input type="radio" name="status" value="public">Public<br></div>
|
||||
<div class="col-sm-4"></div>
|
||||
</div>
|
||||
<br />
|
||||
<button id="tada" class="btn btn-default btn-primary" type="submit"> Créer l'article </button>
|
||||
</form>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
@@ -5,30 +5,31 @@
|
||||
<div class="row">
|
||||
<div class="col-sm-1"></div>
|
||||
<div class="col-sm-10">
|
||||
<div class="well">Vous pouvez modifier votre article. Actuellement seule la date de première édition sera publiée. Prochainement : intégration des edit'time dans la base de donnée.</div>
|
||||
<div class="well">Vous pouvez modifier votre article. Actuellement seule la date de première édition sera publiée. Prochainement : intégration de la date de mise à jour dans la base de donnée.</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form action="" method="POST" id="postform" style="height: 15vw;">
|
||||
<input type="text" name="title" id="title" placeholder="Titre" class="form-control" value="{{ oldpost[0] }}"><br />
|
||||
<textarea id="editeurMarkdown" class="form-control" form="postform" name="content" id="content" placeholder="Contenu" >{{ oldpost[1] }}</textarea><br />
|
||||
<h3> Visibilité </h3>
|
||||
<div class="row">
|
||||
{% if oldpost[2] == 'public' %}
|
||||
<div class="col-sm-4"></div>
|
||||
<div class="col-sm-1"><input type="radio" name="status" value="prive"> <br/>Privé </div>
|
||||
<div class="col-sm-2"></div>
|
||||
<div class="col-sm-1"><input type="radio" name="status" value="public" checked> <br/> Public</div>
|
||||
<div class="col-sm-1"><input type="radio" name="status" value="public" checked> <br/> Publique </div>
|
||||
<div class="col-sm-4"></div>
|
||||
{% else %}
|
||||
<div class="col-sm-4"></div>
|
||||
<div class="col-sm-1"><input type="radio" name="status" value="prive" checked> <br/> Privé</div>
|
||||
<div class="col-sm-1"><input type="radio" name="status" value="prive" checked> <br/> Privé </div>
|
||||
<div class="col-sm-2"></div>
|
||||
<div class="col-sm-1"><input type="radio" name="status" value="public"> <br/>Public</div>
|
||||
<div class="col-sm-1"><input type="radio" name="status" value="public"> <br/> Public </div>
|
||||
<div class="col-sm-4"></div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<br />
|
||||
<button id="tada" class="btn btn-default btn-primary" type="submit">Publier</button>
|
||||
<button id="tada" class="btn btn-default btn-primary" type="submit"> Mettre à jour </button>
|
||||
</form>
|
||||
<br />
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
<label> Age </label>
|
||||
<input type="text" name="age" value="{% if profil['age'] != None %}{{ profil['age'] }}{%endif%}" class="form-control"><br />
|
||||
<label> Mail de secours </label>
|
||||
<input type="text" name="mail_rescue" id="mail_rescue" value="{% if profil['nom'] != None %}{{ profil['mail_rescue'] }}{%endif%}" class="form-control"><br />
|
||||
<input type="text" name="mail_rescue" id="mail_rescue" value="{% if profil['mail_rescue'] != None %}{{ profil['mail_rescue'] }}{%endif%}" class="form-control"><br />
|
||||
<button id="tada" class="btn btn-default btn-primary" type="submit">Envoyer</button>
|
||||
</form>
|
||||
{# on affiche les messages d'erreur puis les messages de succes #}
|
||||
|
||||
@@ -1,34 +1,69 @@
|
||||
{% extends 'up_squelette.html' %}
|
||||
|
||||
{% include '_nav_userlogin.html' %}
|
||||
|
||||
{% block main %}
|
||||
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h2> Fichiers privés (Seul les personnes connectées et l'administrateur de l'ordinateur peuvent les voirs) </h2>
|
||||
{% if listFilesPrivate %}
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Fichier(s) <span class="badge">{{ i }}</span></th>
|
||||
<th>Taille (en octets)</th>
|
||||
<th>Fichier(s) <span class="badge">{{ nb_pv }}</span></th>
|
||||
<th>Taille (en Megaoctect)</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if listeFichiers %}
|
||||
{% for fichier in listeFichiers %}
|
||||
|
||||
{% for file in listFilesPrivate %}
|
||||
<tr>
|
||||
<td>{{ fichier[0] }}</td>
|
||||
<td><a href="/myfiles/{{ fichier[1] }}">{{ fichier[1] }}</a></td>
|
||||
<td>{{ fichier[2] }}</td>
|
||||
<td><a href="{{ url_for('filesupload.remove', nom=fichier[1]) }}"><button type="button" class="btn btn-sm btn-danger">Supprimer</button></a></td>
|
||||
</tr>
|
||||
<td>{{ file[0] }}</td>
|
||||
<td><a href="/myfiles/{{ username }}/{{ file[1] }}">{{ file[1] }}</a></td>
|
||||
<td>{{ file[2] }}</td>
|
||||
<td><a href="{{ url_for('filesupload.remove_privateFile', filename=file[1]) }}"><button type="button" class="btn btn-sm btn-danger">Supprimer</button></a></td>
|
||||
<td><a href="{{ url_for('filesupload.move_public', filename=file[1]) }}"><button type="button" class="btn btn-sm btn-success"> Rendre Publique </button></a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
{% else %}
|
||||
<p> Vous n'avez aucun fichiers privés </p>
|
||||
{% endif %}
|
||||
<br />
|
||||
<hr />
|
||||
<br />
|
||||
<h2> Fichiers publics (Tout le monde peut les voirs) </h2>
|
||||
{% if listFilesPublic %}
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Fichier(s) <span class="badge">{{ nb_pu }}</span></th>
|
||||
<th>Taille (en Megaoctets)</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{% for file in listFilesPublic %}
|
||||
<tr>
|
||||
<td>{{ file[0] }}</td>
|
||||
<td><a href="/public/{{ username }}/{{ file[1] }}">{{ file[1] }}</a></td>
|
||||
<td>{{ file[2] }}</td>
|
||||
<td><a href="{{ url_for('filesupload.remove_publicFile', filename=file[1]) }}"><button type="button" class="btn btn-sm btn-danger">Supprimer</button></a></td>
|
||||
<td><a href="{{ url_for('filesupload.move_private', filename=file[1]) }}"><button type="button" class="btn btn-sm btn-success"> Rendre Privée </button></a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% else %}
|
||||
<p> Vous n'avez aucun fichiers publics </p>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="no-js" lang="fr">
|
||||
<html lang="fr">
|
||||
|
||||
{% include '_head.html' %}
|
||||
|
||||
|
||||
<body role="document">
|
||||
|
||||
|
||||
{% include '_nav_userlogin.html'%}
|
||||
|
||||
|
||||
@@ -11,7 +15,10 @@
|
||||
{% block main %}{% endblock %}
|
||||
</div>
|
||||
|
||||
{% include '_flash_msgs.html' %}
|
||||
{% include '_footer.html' %}
|
||||
{% include '_js.html' %}
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{% extends 'up_squelette.html' %}
|
||||
|
||||
|
||||
{% include '_nav_userlogin.html' %}
|
||||
|
||||
{% extends 'up_squelette.html' %}
|
||||
{% block main %}
|
||||
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-3"></div>
|
||||
<div class="col-sm-6">
|
||||
@@ -46,7 +46,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user