Update templates/base.html
Browse files- templates/base.html +47 -15
templates/base.html
CHANGED
@@ -2,32 +2,64 @@
|
|
2 |
<html lang="fr">
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
|
|
5 |
<title>{% block title %}Forum Anonyme{% endblock %}</title>
|
6 |
-
<link
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
</head>
|
8 |
-
<body>
|
9 |
-
<div class="container">
|
10 |
-
<header>
|
11 |
-
<h1
|
12 |
-
|
13 |
-
|
14 |
-
|
|
|
|
|
15 |
</nav>
|
16 |
-
<form action="{{ url_for('search') }}" method="GET">
|
17 |
-
<
|
18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
</form>
|
20 |
</header>
|
|
|
21 |
{% with messages = get_flashed_messages(with_categories=true) %}
|
22 |
{% if messages %}
|
23 |
-
<
|
24 |
{% for category, message in messages %}
|
25 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
{% endfor %}
|
27 |
-
</
|
28 |
{% endif %}
|
29 |
{% endwith %}
|
|
|
30 |
{% block content %}{% endblock %}
|
31 |
</div>
|
32 |
</body>
|
33 |
-
</html>
|
|
|
2 |
<html lang="fr">
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- Important pour le responsive -->
|
6 |
<title>{% block title %}Forum Anonyme{% endblock %}</title>
|
7 |
+
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
|
8 |
+
<!-- <link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}"> --> <!-- Plus besoin de ce fichier -->
|
9 |
+
<style>
|
10 |
+
.quoted-text {
|
11 |
+
background-color: #f0f4f8; /* Couleur de fond légère pour le texte cité */
|
12 |
+
border-left: 4px solid #60a5fa; /* Barre verticale bleue */
|
13 |
+
padding: 0.5rem 1rem; /* Espacement intérieur */
|
14 |
+
margin-bottom: 0.5rem; /* Marge en dessous */
|
15 |
+
font-style: italic; /* Texte en italique */
|
16 |
+
}
|
17 |
+
.quoted-message-id{
|
18 |
+
font-size: 0.8em; /* Taille de police plus petite */
|
19 |
+
color: #4a5568; /* Couleur de texte discrète */
|
20 |
+
margin-bottom: 0.25rem; /* Petite marge en dessous */
|
21 |
+
}
|
22 |
+
</style>
|
23 |
</head>
|
24 |
+
<body class="bg-gray-100 font-sans"> <!-- Fond gris clair, police sans-serif -->
|
25 |
+
<div class="container mx-auto p-4 md:p-8"> <!-- Conteneur principal, marges auto, padding -->
|
26 |
+
<header class="mb-6">
|
27 |
+
<h1 class="text-3xl font-bold text-blue-800 mb-2">
|
28 |
+
<a href="{{ url_for('index') }}" class="hover:text-blue-600 transition-colors duration-200">Forum Anonyme</a> <!-- Lien principal, effet hover -->
|
29 |
+
</h1>
|
30 |
+
<nav class="flex flex-wrap items-center space-x-4 md:space-x-6 text-blue-700">
|
31 |
+
<a href="{{ url_for('new_thread') }}" class="hover:text-blue-500 transition-colors duration-200">Nouveau fil</a>
|
32 |
+
<a href="{{ url_for('moderate') }}" class="hover:text-blue-500 transition-colors duration-200">Modération</a>
|
33 |
</nav>
|
34 |
+
<form action="{{ url_for('search') }}" method="GET" class="mt-4"> <!-- Marge en haut -->
|
35 |
+
<div class="flex"> <!--Utilisation flexbox pour bien aligner la barre et le bouton-->
|
36 |
+
<input type="text" name="q" placeholder="Recherche..." required
|
37 |
+
class="flex-grow p-2 border border-gray-300 rounded-l-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"> <!-- Input de recherche -->
|
38 |
+
<button type="submit"
|
39 |
+
class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-r-md transition-colors duration-200">
|
40 |
+
Chercher
|
41 |
+
</button>
|
42 |
+
</div>
|
43 |
</form>
|
44 |
</header>
|
45 |
+
|
46 |
{% with messages = get_flashed_messages(with_categories=true) %}
|
47 |
{% if messages %}
|
48 |
+
<div class="mb-6"> <!-- Marge en bas -->
|
49 |
{% for category, message in messages %}
|
50 |
+
<div class="flash {{ category }} p-4 rounded-md mb-2
|
51 |
+
{% if category == 'error' %}bg-red-100 border border-red-400 text-red-700
|
52 |
+
{% elif category == 'success' %}bg-green-100 border border-green-400 text-green-700
|
53 |
+
{% else %}bg-blue-100 border border-blue-400 text-blue-700
|
54 |
+
{% endif %}"> <!-- Couleurs conditionnelles -->
|
55 |
+
{{ message }}
|
56 |
+
</div>
|
57 |
{% endfor %}
|
58 |
+
</div>
|
59 |
{% endif %}
|
60 |
{% endwith %}
|
61 |
+
|
62 |
{% block content %}{% endblock %}
|
63 |
</div>
|
64 |
</body>
|
65 |
+
</html>
|