Update templates/index.html
Browse files- templates/index.html +9 -6
templates/index.html
CHANGED
@@ -1,17 +1,20 @@
|
|
1 |
{% extends "base.html" %}
|
2 |
{% block title %}Accueil - Forum Anonyme{% endblock %}
|
3 |
{% block content %}
|
4 |
-
<h2>Fils de discussion</h2>
|
5 |
{% if threads %}
|
6 |
-
<ul class="thread-list">
|
7 |
{% for thread in threads %}
|
8 |
<li>
|
9 |
-
<a href="{{ url_for('thread', thread_id=thread.id) }}"
|
10 |
-
|
|
|
|
|
|
|
11 |
</li>
|
12 |
{% endfor %}
|
13 |
</ul>
|
14 |
{% else %}
|
15 |
-
<p>Aucun fil de discussion pour le moment.</p>
|
16 |
{% endif %}
|
17 |
-
{% endblock %}
|
|
|
1 |
{% extends "base.html" %}
|
2 |
{% block title %}Accueil - Forum Anonyme{% endblock %}
|
3 |
{% block content %}
|
4 |
+
<h2 class="text-2xl font-semibold mb-4">Fils de discussion</h2> <!-- Titre plus grand et en gras -->
|
5 |
{% if threads %}
|
6 |
+
<ul class="thread-list space-y-4"> <!-- Liste avec espacement vertical -->
|
7 |
{% for thread in threads %}
|
8 |
<li>
|
9 |
+
<a href="{{ url_for('thread', thread_id=thread.id) }}"
|
10 |
+
class="block p-4 bg-white rounded-md shadow-sm hover:shadow-md hover:scale-105 transition-all duration-200"> <!-- Bloc cliquable, ombres, effet hover -->
|
11 |
+
<span class="text-lg text-blue-700">{{ thread.title }}</span> <!-- Titre du fil -->
|
12 |
+
<small class="text-gray-500 block mt-1">Créé le {{ thread.timestamp.strftime('%d/%m/%Y %H:%M:%S') }}</small> <!-- Date de création -->
|
13 |
+
</a>
|
14 |
</li>
|
15 |
{% endfor %}
|
16 |
</ul>
|
17 |
{% else %}
|
18 |
+
<p class="text-gray-600">Aucun fil de discussion pour le moment.</p> <!-- Message si aucun fil -->
|
19 |
{% endif %}
|
20 |
+
{% endblock %}
|