Remove list articles if not articles

This commit is contained in:
kitoy 2026-01-09 19:36:22 +01:00
parent 81aabb21ab
commit b1a1a521c2

View File

@ -41,29 +41,31 @@
<p class="center"><a href="{{ url_for('loginlogout.lost_password') }}"> Mouarf j'ai perdu mon mot de passe </a> </p> <p class="center"><a href="{{ url_for('loginlogout.lost_password') }}"> Mouarf j'ai perdu mon mot de passe </a> </p>
<button class="btn btn-default btn-primary" type="submit"> Login </button> <button class="btn btn-default btn-primary" type="submit"> Login </button>
</form> </form>
<h2> Les derniers articles de blog sur le serveur </h2> {% if list_post %}
<h2> Les derniers articles de blog sur le serveur </h2>
<div class="list-articles" > <div class="list-articles" >
{% for article in list_posts %} {% for article in list_posts %}
<article> <article>
<header> <header>
<h3> {{ article.title }} </h3> <h3> {{ article.title }} </h3>
<h5> par <a href="/blog/{{ article.author }}/">/{{ article.author }}</a> </h5> <h5> par <a href="/blog/{{ article.author }}/">/{{ article.author }}</a> </h5>
<br/> <br/>
<small> Créé le : {{ article.creation_date }} </small> <br/> <small> Créé le : {{ article.creation_date }} </small> <br/>
{% if article.last_updated %} {% if article.last_updated %}
<small> Modifié le : {{ article.last_updated }}</small><br/> <small> Modifié le : {{ article.last_updated }}</small><br/>
{% endif %} {% endif %}
</header> </header>
<div class="subtitle"> <div class="subtitle">
<p> {{ article.subtitle }} </p> <p> {{ article.subtitle }} </p>
</div> </div>
<footer><a href="/blog//public_unified/{{ article.author }}/{{ article.title }}"> <button> Lire la suite </button> </a></footer>
<footer><a href="/blog//public_unified/{{ article.author }}/{{ article.title }}"> <button> Lire la suite </button> </a></footer>
</article> </article>
{% endfor %} {% endfor %}
{% endif %}
{% endblock %} {% endblock %}
</main> </main>