2020-11-29 02:05:19 +01:00
{% extends 'up_squelette.html' %}
2022-07-11 00:36:31 +02:00
{% include '_nav_userlogin.html' %}
2020-11-29 02:05:19 +01:00
{% 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.
Une page < a href = "/postit/publicblog" > < 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 pourrait 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" >
< img src = "/static/usersprofil/{{ post.avatar }}" class = "img-rounded" alt = "" / > < br > < br >
2022-07-10 15:09:03 +02:00
< p > {{ post.nom }}< br > {{ post.prenom }}< br > {{ post.age }} ans< 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 %}
< / div >