54 lines
1.6 KiB
HTML
54 lines
1.6 KiB
HTML
{% extends 'up_squelette.html' %}
|
|
|
|
{% block main %}
|
|
|
|
<div class="jumbotron">
|
|
<div class="row">
|
|
<div class="col-sm-4">
|
|
<p id="majuscule" class="text-center"><h3>Blog de <span id="majuscule">{{ username }}</span></h3></p>
|
|
</div>
|
|
<div class="col-sm-6">
|
|
</div>
|
|
<div class="col-sm-2">
|
|
<img src="/static/usersprofil/{{ usersinfos[0] }}" class="img-rounded" alt=""/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<br>
|
|
|
|
{% for post in posts %}
|
|
<div class="row">
|
|
<div class="col-sm-2">
|
|
</div>
|
|
<div class="col-sm-8">
|
|
<div class="well">
|
|
<div class="row">
|
|
<div class="col-sm-10">
|
|
<h6>{{ post.time }}</h6>
|
|
<h2>{{ post.title }}</h2>
|
|
{{ post.content|safe }}
|
|
|
|
<br><h6>Auteur : {{ post.author }}</h6>
|
|
</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('blog.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('blog.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>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
|
|
{% endblock %}
|
|
|
|
</div>
|