Docfile commited on
Commit
1d1a1ec
·
verified ·
1 Parent(s): 38ffa3a

Update api/templates/base.html

Browse files
Files changed (1) hide show
  1. api/templates/base.html +65 -18
api/templates/base.html CHANGED
@@ -4,19 +4,19 @@
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
  <title>{% block title %}Plateforme Éducative{% endblock %}</title>
7
-
8
  <!-- Bootstrap CSS from CDN -->
9
  <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
10
-
11
  <!-- Font Awesome for icons -->
12
  <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
13
-
14
  <!-- Google Fonts -->
15
  <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap" rel="stylesheet">
16
-
17
  <!-- Custom CSS -->
18
  <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
19
-
20
  <!-- Additional CSS specific to templates -->
21
  {% block styles %}{% endblock %}
22
  </head>
@@ -24,16 +24,21 @@
24
  <!-- Header -->
25
  <header class="main-header">
26
  <div class="container header-container">
 
 
 
 
 
27
  <h1 class="site-title">
28
  <a href="{{ url_for('main_bp.index') }}">Méthodologies</a>
29
  </h1>
30
-
31
  <div class="header-actions">
32
  <!-- Theme toggle button -->
33
  <button id="theme-toggle" class="theme-toggle" title="Changer de thème">
34
  <i class="fas fa-moon"></i>
35
  </button>
36
-
37
  <!-- Admin link if admin is logged in -->
38
  {% if session.get('admin_logged_in') %}
39
  <a href="{{ url_for('admin_bp.dashboard') }}" class="btn btn-primary btn-sm ms-2">
@@ -43,9 +48,50 @@
43
  </div>
44
  </div>
45
  </header>
46
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  <!-- Flash messages -->
48
- <div class="container mt-3">
49
  {% with messages = get_flashed_messages(with_categories=true) %}
50
  {% if messages %}
51
  {% for category, message in messages %}
@@ -57,46 +103,47 @@
57
  {% endif %}
58
  {% endwith %}
59
  </div>
60
-
61
  <!-- Main content -->
62
  <main class="main-content">
63
  <div class="container">
64
  {% block content %}{% endblock %}
65
  </div>
66
  </main>
67
-
68
  <!-- Footer -->
69
  <footer class="main-footer">
70
  <div class="container footer-content">
71
  <div>
72
- <p>&copy; {{ year|default(2023) }} Méthodologies - Tous droits réservés</p>
 
73
  <ul class="footer-links">
74
  <li><a href="#">À propos</a></li>
75
  <li><a href="#">Contact</a></li>
76
  <li><a href="#">Mentions légales</a></li>
77
  </ul>
78
  </div>
79
-
80
  <!-- Feedback form -->
81
  <div class="feedback-form">
82
  <h4 class="feedback-title">Votre avis nous intéresse</h4>
83
  <form id="feedback-form" action="{{ url_for('main_bp.submit_feedback') }}" method="POST">
84
  <div class="form-group mb-2">
85
- <textarea id="feedback-message" name="message" class="form-control" rows="2" placeholder="Laissez-nous un message..."></textarea>
86
  </div>
87
  <button type="submit" class="btn btn-primary">Envoyer</button>
88
  </form>
89
  </div>
90
  </div>
91
  </footer>
92
-
93
  <!-- Bootstrap JS Bundle with Popper -->
94
  <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
95
-
96
  <!-- Main JavaScript -->
97
  <script src="{{ url_for('static', filename='js/main.js') }}"></script>
98
-
99
  <!-- Additional JavaScript -->
100
  {% block scripts %}{% endblock %}
101
  </body>
102
- </html>
 
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
  <title>{% block title %}Plateforme Éducative{% endblock %}</title>
7
+
8
  <!-- Bootstrap CSS from CDN -->
9
  <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
10
+
11
  <!-- Font Awesome for icons -->
12
  <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
13
+
14
  <!-- Google Fonts -->
15
  <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap" rel="stylesheet">
16
+
17
  <!-- Custom CSS -->
18
  <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
19
+
20
  <!-- Additional CSS specific to templates -->
21
  {% block styles %}{% endblock %}
22
  </head>
 
24
  <!-- Header -->
25
  <header class="main-header">
26
  <div class="container header-container">
27
+ <!-- Burger Menu Button -->
28
+ <button id="burger-menu" class="burger-menu-button" title="Ouvrir le menu">
29
+ <i class="fas fa-bars"></i>
30
+ </button>
31
+
32
  <h1 class="site-title">
33
  <a href="{{ url_for('main_bp.index') }}">Méthodologies</a>
34
  </h1>
35
+
36
  <div class="header-actions">
37
  <!-- Theme toggle button -->
38
  <button id="theme-toggle" class="theme-toggle" title="Changer de thème">
39
  <i class="fas fa-moon"></i>
40
  </button>
41
+
42
  <!-- Admin link if admin is logged in -->
43
  {% if session.get('admin_logged_in') %}
44
  <a href="{{ url_for('admin_bp.dashboard') }}" class="btn btn-primary btn-sm ms-2">
 
48
  </div>
49
  </div>
50
  </header>
51
+
52
+ <!-- Sidebar Overlay -->
53
+ <div id="sidebar-overlay" class="sidebar-overlay"></div>
54
+
55
+ <!-- Sidebar 1: Matières -->
56
+ <nav id="sidebar-matieres" class="sidebar">
57
+ <div class="sidebar-header">
58
+ <h4>Matières</h4>
59
+ <button class="close-sidebar-btn" data-sidebar-id="sidebar-matieres" title="Fermer le menu">×</button>
60
+ </div>
61
+ <ul id="matieres-list-sidebar" class="sidebar-list">
62
+ {# Assure-toi de passer la variable 'matieres' depuis ta route Flask #}
63
+ {# Example: return render_template('index.html', matieres=get_all_matieres()) #}
64
+ {% if matieres %}
65
+ {% for matiere in matieres %}
66
+ {# Utilise |e pour échapper les caractères spéciaux dans le nom pour l'attribut data #}
67
+ <li data-matiere-id="{{ matiere.id }}" data-matiere-nom="{{ matiere.nom | e }}">
68
+ {{ matiere.nom }}
69
+ <i class="fas fa-chevron-right float-end"></i>
70
+ </li>
71
+ {% endfor %}
72
+ {% else %}
73
+ <li>Aucune matière disponible.</li>
74
+ {% endif %}
75
+ </ul>
76
+ </nav>
77
+
78
+ <!-- Sidebar 2: Sous-catégories -->
79
+ <nav id="sidebar-sous-categories" class="sidebar">
80
+ <div class="sidebar-header">
81
+ <button id="sidebar-back-button" class="sidebar-back-button" title="Retour aux matières">
82
+ <i class="fas fa-arrow-left"></i>
83
+ </button>
84
+ <h4 id="sidebar-sous-categories-title">Sous-catégories</h4>
85
+ <button class="close-sidebar-btn" data-sidebar-id="sidebar-sous-categories" title="Fermer le menu">×</button>
86
+ </div>
87
+ <ul id="sous-categories-list-sidebar" class="sidebar-list">
88
+ <!-- Les sous-catégories seront chargées ici par JavaScript -->
89
+ <li>Chargement...</li>
90
+ </ul>
91
+ </nav>
92
+
93
  <!-- Flash messages -->
94
+ <div class="container mt-3 flash-container">
95
  {% with messages = get_flashed_messages(with_categories=true) %}
96
  {% if messages %}
97
  {% for category, message in messages %}
 
103
  {% endif %}
104
  {% endwith %}
105
  </div>
106
+
107
  <!-- Main content -->
108
  <main class="main-content">
109
  <div class="container">
110
  {% block content %}{% endblock %}
111
  </div>
112
  </main>
113
+
114
  <!-- Footer -->
115
  <footer class="main-footer">
116
  <div class="container footer-content">
117
  <div>
118
+ {# Tu peux injecter l'année actuelle depuis Flask #}
119
+ <p>© {{ year if year else '2024' }} Méthodologies - Tous droits réservés</p>
120
  <ul class="footer-links">
121
  <li><a href="#">À propos</a></li>
122
  <li><a href="#">Contact</a></li>
123
  <li><a href="#">Mentions légales</a></li>
124
  </ul>
125
  </div>
126
+
127
  <!-- Feedback form -->
128
  <div class="feedback-form">
129
  <h4 class="feedback-title">Votre avis nous intéresse</h4>
130
  <form id="feedback-form" action="{{ url_for('main_bp.submit_feedback') }}" method="POST">
131
  <div class="form-group mb-2">
132
+ <textarea id="feedback-message" name="message" class="form-control" rows="2" placeholder="Laissez-nous un message..." required></textarea>
133
  </div>
134
  <button type="submit" class="btn btn-primary">Envoyer</button>
135
  </form>
136
  </div>
137
  </div>
138
  </footer>
139
+
140
  <!-- Bootstrap JS Bundle with Popper -->
141
  <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
142
+
143
  <!-- Main JavaScript -->
144
  <script src="{{ url_for('static', filename='js/main.js') }}"></script>
145
+
146
  <!-- Additional JavaScript -->
147
  {% block scripts %}{% endblock %}
148
  </body>
149
+ </html>