2020-11-29 02:05:19 +01:00
{% extends 'up_squelette.html' %}
{% block main %}
<!-- Main jumbotron for a primary marketing message or call to action
< div class = "jumbotron" >
< h1 > Blog< / h1 >
< p > < span id = "majuscule" > Hello {{ session['username'] }} ! < / span > Bienvenue sur ce blog communautaire. Les articles de tous les auteurs du site sont actuellement disponibles sur cette page. Une page personnelle vous est fournie à l'adresse : < a href = "/blog/{{ session['username'] }}" > Page perso< / a > < / p >
< p > < a href = "http://flask.pocoo.org/" class = "btn btn-primary btn-lg" role = "button" > En savoir plus » < / a > < / p >
< / div > -->
< div class = "row" >
< div class = "col-sm-1" > < / div >
< div class = "col-sm-10" >
< br / >
2022-07-10 15:09:03 +02:00
< 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.
2022-08-06 18:22:24 +02:00
Une page < a href = "/postit/board" > < span class = "glyphicon glyphicon-star" aria-hidden = "true" > < / span >
2022-07-10 15:09:03 +02:00
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 >
2022-08-07 08:32:21 +02:00
Vous pouvez aussi écrire des post-its privé que vous seul pourrez consulter.< / div >
2020-11-29 02:05:19 +01:00
< / div >
2022-07-05 01:18:52 +02:00
< / div >
2020-11-29 02:05:19 +01:00
< br / >
2022-07-05 05:41:20 +02:00
2022-07-10 15:09:03 +02:00
< form method = "POST" action = "{{ url_for('post-it.racine_blog') }}" id = "postform" >
2020-11-29 02:05:19 +01:00
<!-- <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 / >
2022-07-05 05:41:20 +02:00
< textarea class = "form-control" form = "postform" name = "content" id = "content" placeholder = "Contenu" style = "height:30vw;" > < / textarea > < br / >
2020-11-29 02:05:19 +01:00
< 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 >
2022-07-05 05:41:20 +02:00
< br >
2020-11-29 02:05:19 +01:00
{% for post in posts %}
< div class = "well" >
< div class = "row" >
< div class = "col-sm-2" >
2022-08-07 08:32:21 +02:00
< img src = "/profil/{{ post.author }}/{{ post.avatar }}" height = "100" width = "100" class = "img-rounded" alt = "" / > < br > < br >
2022-08-06 18:22:24 +02:00
< p > {% if post.author != None %}{{ post.author }} {%endif%} < br / > {% if post.prenom != None %}{{ post.prenom }}{%endif%} < br / > {% if post.age != None %}{{ post.age }} ans {%endif%}< br / > < / p >
2020-11-29 02:05:19 +01:00
< / div >
2022-07-05 01:18:52 +02:00
2020-11-29 02:05:19 +01:00
< div class = "col-sm-9" >
< div class = "well" >
< h6 > {{ post.time }}< / h6 >
< h2 > {{ post.title }}< / h2 >
2022-07-05 05:41:20 +02:00
{{ post.content|safe }}
2020-11-29 02:05:19 +01:00
< / div >
< / 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 >
2022-07-10 15:09:03 +02:00
< a href = "{{ url_for('post-it.edit', post=post.title) }}" > < 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', post=post.title) }}" > < button type = "button" class = "btn btn-sm btn-danger" > < span class = "glyphicon glyphicon-trash" aria-hidden = "true" > < / span > < / button > < / a > < br / > < br >
2020-11-29 02:05:19 +01:00
{% endif %}
< / div >
< / div >
< / div >
{% endfor %}
{% endblock %}