2020-11-29 02:05:19 +01:00
{% extends 'up_squelette.html' %}
{% block navbar %}
<!-- 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 >
< span class = "icon-bar" > < / span >
< 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" >
2022-07-10 15:09:03 +02:00
< li class = "active" > < a href = "/post-it/" > < span class = "glyphicon glyphicon-globe" aria-hidden = "true" > < / span > Blog< / a > < / li >
2022-07-05 01:18:52 +02:00
< li > < a href = "/filesupload/" > < span class = "glyphicon glyphicon-cloud-upload" aria-hidden = "true" > < / span > Upload< / a > < / li >
2020-11-29 02:05:19 +01:00
< li > < a href = "/view/" > < span class = "glyphicon glyphicon-cloud-download" aria-hidden = "true" > < / span > Fichiers< / a > < / li >
< li > < a href = "/gallery/" > < span class = "glyphicon glyphicon-eye-open" aria-hidden = "true" > < / span > Gallerie< / a > < / li >
< li > < a href = "/logs/" > < span class = "glyphicon glyphicon-floppy-disk" aria-hidden = "true" > < / span > Logs< / a > < / li >
< li class = "dropdown" >
< 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" >
2022-07-10 15:09:03 +02:00
< li > < a href = "/profil/" > < span class = "glyphicon glyphicon-user" aria-hidden = "true" > < / span > Profil< / a > < / li >
2020-11-29 02:05:19 +01:00
< li > < a href = "/parametres/" > < span class = "glyphicon glyphicon-cog" aria-hidden = "true" > < / span > Paramètres< / a > < / li >
< li class = "divider" > < / li >
<!-- <li class="dropdown - header">Nav header</li> -->
< li > < a href = "/logout/" > < span class = "glyphicon glyphicon-off" aria-hidden = "true" > < / span > Déconnexion< / a > < / li >
< / ul >
< / li >
< / ul >
< ul class = "nav navbar-nav navbar-right" >
2022-07-10 15:09:03 +02:00
< li > < a href = "/logout/" > < span class = "glyphicon glyphicon-off" aria-hidden = "true" > < / span > Se déconnecter< / a > < / li >
2020-11-29 02:05:19 +01:00
< / ul >
< / div > <!-- /.nav - collapse -->
< / div >
< / div >
{% endblock %}
{% 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 >