Rework blog section
Wrok in bloc sectionn
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<head>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
@@ -11,7 +11,5 @@
|
||||
<link href="{{ url_for('static', filename='vendors/picocss/pico.colors.min.css') }}" rel="stylesheet">
|
||||
<link href="{{ url_for('static', filename='pywallter.css') }}" rel="stylesheet">
|
||||
<link href="{{ url_for('static', filename='icons.css') }}" rel="stylesheet">
|
||||
<link href="{{ url_for('static', filename='vendors/simplemde/simplemde.min.css') }}" rel="stylesheet">
|
||||
<link href="{{ url_for('static', filename='vendors/glightbox/glightbox.min.css') }}" rel="stylesheet">
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
@@ -21,13 +21,13 @@
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/myblog/personalize/" {% if request.path == "/myblog/personalize/" %} class="invert" {% endif %} ><span class="icons custom-blog"></span>
|
||||
<a href="/myblog/personnalize/" {% if request.path == "/myblog/personnalize/" %} class="invert" {% endif %} ><span class="icons custom-blog"></span>
|
||||
Configurer mon site web
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/myblog/view/" {% if request.path == "/myblog/view/" %} class="invert" {% endif %} ><span class="icons view-blog" aria-hidden="true"></span>
|
||||
Voir mon blog
|
||||
<a href="/private-blog/" {% if request.path == "/private-blog/" %} class="invert" {% endif %} ><span class="icons view-blog" aria-hidden="true"></span>
|
||||
Voir le blog
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -46,6 +46,7 @@
|
||||
<li>
|
||||
<a href="/filesupload/" {% if request.path == "/filesupload/" %} class="invert" {% endif %}> <span class="icons send-files"></span> Envoyer des fichiers </a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -66,7 +67,6 @@
|
||||
Gerer mes alias
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title> Blog de {{ user }} </title>
|
||||
<title> Article de {{ post_info.author }} </title>
|
||||
<link rel="stylesheet" href="/static/blog.css" type="text/css">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
@@ -12,9 +12,11 @@
|
||||
|
||||
<h2 class="titre"> {{ post_info.title }} </h2>
|
||||
|
||||
<h5 class="titre">Publié le {{ post_info.time }} </h5>
|
||||
|
||||
<h2 class="description titre"> {{ post_info.subtitle }} </h2>
|
||||
<h5 class="titre">Publié le : {{ post_info.creation_date }} </h5>
|
||||
{% if post_info.last_updated %}
|
||||
<h5 class="titre">Mis à jour le : {{ post_info.last_updated }} </h5>
|
||||
{% endif %}
|
||||
<h3 class="description titre"> {{ post_info.subtitle }} </h3>
|
||||
<hr/>
|
||||
{{ content|safe }}
|
||||
|
||||
|
||||
3
templates/css/simple_editor.html
Normal file
3
templates/css/simple_editor.html
Normal file
@@ -0,0 +1,3 @@
|
||||
|
||||
<link href="{{ url_for('static', filename='vendors/simplemde/simplemde.min.css') }}" rel="stylesheet">
|
||||
<link href="{{ url_for('static', filename='simplemde-custom.css') }}" rel="stylesheet">
|
||||
@@ -2,27 +2,40 @@
|
||||
|
||||
{% block main %}
|
||||
|
||||
<p>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.</p>
|
||||
<p>Vous pouvez modifier votre article. </p>
|
||||
|
||||
|
||||
<h2> {{ oldpost[0] }}</h2><br />
|
||||
<h2> {{ oldpost['title'] }}</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" style="height:20vw;">{{ content }}</textarea><br />
|
||||
<input type="text" name="subtitle" id="subtitle" placeholder="sous-titre" class="form-control" value="{{ oldpost['title'] }}"><br />
|
||||
<input type="text" name="subtitle" id="subtitle" placeholder="sous-titre" class="form-control" value="{{ oldpost['subtitle'] }}"><br />
|
||||
<input type="text" name="category" id="category" placeholder="Catégorie" class="form-control" value="{{ oldpost['category'] }}"><br />
|
||||
<textarea id="editeurMarkdown" class="form-control" form="postform" name="content" id="content" placeholder="Contenu" style="height:20vw;">{{ oldpost['content'] }}</textarea><br />
|
||||
<h3> Visibilité </h3>
|
||||
<div class="center">
|
||||
{% if oldpost[2] == 'public' %}
|
||||
<input type="radio" name="status" value="prive"> Privé
|
||||
<p> Les articles brouillons ne sont visibles que par vous même</p>
|
||||
<p> Les articles privés ne sont visibles que par les membres du serveur </p>
|
||||
<p> Les articles public sont visibles par tout le monde </p>
|
||||
|
||||
|
||||
{% if oldpost['status'] == 'public' %}
|
||||
<input type="radio" name="status" value="draft"> Brouillon
|
||||
<input type="radio" name="status" value="private"> Privé
|
||||
<input type="radio" name="status" value="public" checked> Publique
|
||||
|
||||
{% else %}
|
||||
<input type="radio" name="status" value="Privé" checked> Privé
|
||||
{% elif oldpost['status'] == 'private' %}
|
||||
<input type="radio" name="status" value="draft"> Brouillon
|
||||
<input type="radio" name="status" value="private" checked> Privé
|
||||
<input type="radio" name="status" value="public"> Publique
|
||||
|
||||
{% else %}
|
||||
<input type="radio" name="status" value="draft"> Brouillon
|
||||
<input type="radio" name="status" value="private" checked> Privé
|
||||
<input type="radio" name="status" value="public"> Publique
|
||||
|
||||
{% endif %}
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<button type="submit"> Mettre à jour </button>
|
||||
</form>
|
||||
<br />
|
||||
@@ -30,3 +43,7 @@
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block js %}
|
||||
{% include '_js_editor.html' %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title> Blog de {{ user }} </title>
|
||||
<title> Le Blog du serveur </title>
|
||||
<link rel="stylesheet" href="/static/blog.css" type="text/css">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
@@ -14,12 +14,19 @@
|
||||
<h2 class="index"><a href="/blog/{{user}}/{{post.title}}"> {{ post.title }}</a></h2>
|
||||
<small>
|
||||
<time datetime="{{ post.time }}">
|
||||
Publié le {{ post.time }}
|
||||
Publié le {{ post.creation_date }}
|
||||
</time>
|
||||
<br/>
|
||||
{% if post.last_updated %}
|
||||
<time datetime="{{ post.last_updated }}">
|
||||
Mis à jour le {{ post.last_updated }}
|
||||
</time>
|
||||
|
||||
{% endif %}
|
||||
</small>
|
||||
<div class="slug">
|
||||
<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>
|
||||
<p class="readmore"> <a style="margin-right:2rem;" href="/blog/{{ post.status }}/{{post.author}}/{{post.title}}"> Lire la suite... </a></p>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
@@ -15,20 +15,31 @@
|
||||
<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 />
|
||||
<input type="text" name="category" id="category" placeholder="Catégorie" class="form-control"><br />
|
||||
<hr>
|
||||
<textarea id="editeurMarkdown" class="form-control" form="postform" name="content" id="content" placeholder="Contenu" style="height:20vw;"></textarea><br />
|
||||
<textarea id="editeurMarkdown" class="form-control" form="postform" name="content" id="content" placeholder="Contenu" style="height:20vw; margin-right:2vw;"></textarea><br />
|
||||
|
||||
<h3> Visibilité </h3>
|
||||
<div class="center">
|
||||
<input type="radio" name="status" value="private" checked> Privé
|
||||
<p> Les articles brouillons ne sont visibles que par vous même</p>
|
||||
<p> Les articles privés ne sont visibles que par les membres du serveur </p>
|
||||
<p> Les articles public sont visibles par tout le monde </p>
|
||||
|
||||
<input type="radio" name="status" value="private" checked> Privé
|
||||
<input type="radio" name="status" value="public">Public<br>
|
||||
</div>
|
||||
<br/>
|
||||
<button id="tada" type="submit"> Créer l'article </button>
|
||||
<button type="submit"> Créer l'article </button>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
{% include '_js_editor.html' %}
|
||||
{% endblock %}
|
||||
|
||||
8
templates/personnalize_blog.html
Normal file
8
templates/personnalize_blog.html
Normal file
@@ -0,0 +1,8 @@
|
||||
{% extends 'up_squelette.html' %}
|
||||
|
||||
|
||||
{% block main %}
|
||||
|
||||
<h2> Ça va venir dans la prochaine version ! </h2>
|
||||
|
||||
{% endblock %}
|
||||
@@ -4,9 +4,7 @@
|
||||
{% block main %}
|
||||
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
<div>
|
||||
|
||||
<h3> Mon profil </h3>
|
||||
<p>
|
||||
@@ -15,8 +13,10 @@
|
||||
cela vous convient.
|
||||
</p>
|
||||
|
||||
<p> Pour votre mail de secours il sert à vous envoyer un mail pour changer de mot de passe en cas de perte de ce dernier. Il n'y a
|
||||
pas encore de validation de l'e-mail donc vérifiez bien ce que vous tapez. </p>
|
||||
<p>
|
||||
Pour votre mail de secours il sert à vous envoyer un mail pour changer de mot de passe en cas de perte de ce dernier. Il n'y a
|
||||
pas encore de validation de l'e-mail donc vérifiez bien ce que vous tapez.
|
||||
</p>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
@@ -30,40 +30,40 @@
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<label for="theme">Theme</label>
|
||||
<select id="theme" name="theme" required>
|
||||
<option value="" selected>Default</option>
|
||||
<option>amber</option>
|
||||
<option>blue</option>
|
||||
<option>cyan</option>
|
||||
<option>fuchsia</option>
|
||||
<option>green</option>
|
||||
<option>grey</option>
|
||||
<option>indigo</option>
|
||||
<option>jade</option>
|
||||
<option>orange</option>
|
||||
<option>rose</option>
|
||||
<option>pumpkin</option>
|
||||
<option>purple</option>
|
||||
<option>red</option>
|
||||
<option>sand</option>
|
||||
<option>slate</option>
|
||||
<option>violet</option>
|
||||
<option>yellow</option>
|
||||
<option>zinc</option>
|
||||
</select>
|
||||
<label for="theme">Theme</label>
|
||||
<select id="theme" name="theme" required>
|
||||
<option value="" selected>Default</option>
|
||||
<option>amber</option>
|
||||
<option>blue</option>
|
||||
<option>cyan</option>
|
||||
<option>fuchsia</option>
|
||||
<option>green</option>
|
||||
<option>grey</option>
|
||||
<option>indigo</option>
|
||||
<option>jade</option>
|
||||
<option>orange</option>
|
||||
<option>rose</option>
|
||||
<option>pumpkin</option>
|
||||
<option>purple</option>
|
||||
<option>red</option>
|
||||
<option>sand</option>
|
||||
<option>slate</option>
|
||||
<option>violet</option>
|
||||
<option>yellow</option>
|
||||
<option>zinc</option>
|
||||
</select>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<label>Nom </label>
|
||||
<input type="text" name="nom" id="nom" value="{% if profil['nom'] != None %}{{ profil['nom'] }}{%endif%}"><br />
|
||||
<label>Prenom </label>
|
||||
<input type="text" name="prenom" id="prenom" value="{% if profil['nom'] != None %}{{ profil['prenom'] }}{%endif%}"><br />
|
||||
<label> Age </label>
|
||||
<input type="text" name="age" value="{% if profil['age'] != None %}{{ profil['age'] }}{%endif%}"><br />
|
||||
<label> Mail de secours </label>
|
||||
<input type="text" name="mail_rescue" id="mail_rescue" value="{% if profil['mail_rescue'] != None %}{{ profil['mail_rescue'] }}{%endif%}"><br />
|
||||
<button id="tada" class="btn btn-default btn-primary" type="submit">Envoyer</button>
|
||||
<label>Nom </label>
|
||||
<input type="text" name="nom" id="nom" value="{% if profil['nom'] != None %}{{ profil['nom'] }}{%endif%}"><br />
|
||||
<label>Prenom </label>
|
||||
<input type="text" name="prenom" id="prenom" value="{% if profil['nom'] != None %}{{ profil['prenom'] }}{%endif%}"><br />
|
||||
<label> Age </label>
|
||||
<input type="text" name="age" value="{% if profil['age'] != None %}{{ profil['age'] }}{%endif%}"><br />
|
||||
<label> Mail de secours </label>
|
||||
<input type="text" name="mail_rescue" id="mail_rescue" value="{% if profil['mail_rescue'] != None %}{{ profil['mail_rescue'] }}{%endif%}"><br />
|
||||
<button id="tada" class="btn btn-default btn-primary" type="submit">Envoyer</button>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
{% include '_head.html' %}
|
||||
|
||||
<head>
|
||||
{% include '_head.html' %}
|
||||
{% include 'css/simple_editor.html' %}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
@@ -20,9 +21,13 @@
|
||||
|
||||
|
||||
{% include '_footer.html' %}
|
||||
{% include '_js-core.html' %}
|
||||
{% include '_js-gallery.html' %}
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
{% include '_js-core.html' %}
|
||||
|
||||
|
||||
{% block js %} {% endblock %}
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user