@@ -64,6 +64,7 @@ <h1 class="text-4xl font-bold text-blue-700 mb-8">
64
64
Frequently Asked Questions< span class ="text-black "> (FAQs)</ span >
65
65
</ h1 >
66
66
< div class ="space-y-4 ">
67
+ <!-- FAQ 1 -->
67
68
< div
68
69
class ="bg-blue-500 text-white rounded-lg shadow-md p-4 flex justify-between items-center cursor-pointer "
69
70
onclick ="toggleFaqContent('faq1', this) "
@@ -82,6 +83,7 @@ <h3 class="text-black">
82
83
</ h3 >
83
84
</ div >
84
85
86
+ <!-- FAQ 2 -->
85
87
< div
86
88
class ="bg-blue-500 text-white rounded-lg shadow-md p-4 flex justify-between items-center cursor-pointer "
87
89
onclick ="toggleFaqContent('faq2', this) "
@@ -100,6 +102,7 @@ <h3 class="text-black">
100
102
</ h3 >
101
103
</ div >
102
104
105
+ <!-- FAQ 3 -->
103
106
< div
104
107
class ="bg-blue-500 text-white rounded-lg shadow-md p-4 flex justify-between items-center cursor-pointer "
105
108
onclick ="toggleFaqContent('faq3', this) "
@@ -118,6 +121,7 @@ <h3 class="text-black">
118
121
</ h3 >
119
122
</ div >
120
123
124
+ <!-- FAQ 4 -->
121
125
< div
122
126
class ="bg-blue-500 text-white rounded-lg shadow-md p-4 flex justify-between items-center cursor-pointer "
123
127
onclick ="toggleFaqContent('faq4', this) "
@@ -136,6 +140,7 @@ <h3 class="text-black">
136
140
</ h3 >
137
141
</ div >
138
142
143
+ <!-- FAQ 5 -->
139
144
< div
140
145
class ="bg-blue-500 text-white rounded-lg shadow-md p-4 flex justify-between items-center cursor-pointer "
141
146
onclick ="toggleFaqContent('faq5', this) "
@@ -153,6 +158,7 @@ <h3 class="text-black">
153
158
</ h3 >
154
159
</ div >
155
160
161
+ <!-- FAQ 6 -->
156
162
< div
157
163
class ="bg-blue-500 text-white rounded-lg shadow-md p-4 flex justify-between items-center cursor-pointer "
158
164
onclick ="toggleFaqContent('faq6', this) "
@@ -171,6 +177,7 @@ <h3 class="text-black">
171
177
</ h3 >
172
178
</ div >
173
179
180
+ <!-- FAQ 7 -->
174
181
< div
175
182
class ="bg-blue-500 text-white rounded-lg shadow-md p-4 flex justify-between items-center cursor-pointer "
176
183
onclick ="toggleFaqContent('faq7', this) "
@@ -189,6 +196,7 @@ <h3 class="text-black">
189
196
</ h3 >
190
197
</ div >
191
198
199
+ <!-- FAQ 8 -->
192
200
< div
193
201
class ="bg-blue-500 text-white rounded-lg shadow-md p-4 flex justify-between items-center cursor-pointer "
194
202
onclick ="toggleFaqContent('faq8', this) "
@@ -207,6 +215,7 @@ <h3 class="text-black">
207
215
</ h3 >
208
216
</ div >
209
217
218
+ <!-- FAQ 9 -->
210
219
< div
211
220
class ="bg-blue-500 text-white rounded-lg shadow-md p-4 flex justify-between items-center cursor-pointer "
212
221
onclick ="toggleFaqContent('faq9', this) "
@@ -219,48 +228,49 @@ <h3 class="text-black">
219
228
</ div >
220
229
< div id ="faq9 " class ="faq-content bg-white rounded-lg shadow-md ">
221
230
< h3 class ="text-black ">
222
- Yes, we offer community support through forums and documentation.
223
- Users can also reach out for direct assistance via our contact
224
- page.
231
+ Yes, we have an active community on forums, as well as email and
232
+ chat-based support for users.
225
233
</ h3 >
226
234
</ div >
227
235
236
+ <!-- FAQ 10 -->
228
237
< div
229
238
class ="bg-blue-500 text-white rounded-lg shadow-md p-4 flex justify-between items-center cursor-pointer "
230
239
onclick ="toggleFaqContent('faq10', this) "
231
240
>
232
241
< div class ="flex items-center ">
233
242
< i class ="fas fa-question-circle mr-2 "> </ i >
234
- < span > How can I contribute to the project?</ span >
243
+ < span > Can I contribute to your project?</ span >
235
244
</ div >
236
245
< i class ="fas fa-chevron-down rotate "> </ i >
237
246
</ div >
238
247
< div id ="faq10 " class ="faq-content bg-white rounded-lg shadow-md ">
239
248
< h3 class ="text-black ">
240
- We welcome contributions! You can participate by submitting code
241
- improvements, reporting issues, or suggesting features through our
242
- GitHub repository.
249
+ Absolutely! We welcome contributions from developers and
250
+ researchers. You can find our contribution guidelines on the GitHub
251
+ repository.
243
252
</ h3 >
244
253
</ div >
245
254
</ div >
246
255
</ div >
247
256
</ main >
248
-
249
257
< script >
250
- function toggleFaqContent ( id , element ) {
251
- const content = document . getElementById ( id ) ;
252
- const icon = element . querySelector ( ".rotate" ) ;
253
-
254
- content . classList . toggle ( "p-4" ) ;
258
+ function toggleFaqContent ( faqId , iconElement ) {
259
+ const faqContent = document . getElementById ( faqId ) ;
260
+ const icon = iconElement . querySelector ( "i" ) ;
255
261
256
- if ( content . classList . contains ( "active" ) ) {
257
- content . style . height = 0 ;
258
- } else {
259
- content . style . height = content . scrollHeight + "px" ;
260
- }
262
+ faqContent . classList . toggle ( "active" ) ;
263
+ icon . classList . toggle ( "rotate" ) ;
261
264
262
- content . classList . toggle ( "active" ) ;
263
- icon . classList . toggle ( "active" ) ;
265
+ // Close other FAQs when one is clicked
266
+ const allFaqContents = document . querySelectorAll ( ".faq-content" ) ;
267
+ const allIcons = document . querySelectorAll ( ".rotate" ) ;
268
+ allFaqContents . forEach ( ( content ) => {
269
+ if ( content !== faqContent ) content . classList . remove ( "active" ) ;
270
+ } ) ;
271
+ allIcons . forEach ( ( rotateIcon ) => {
272
+ if ( rotateIcon !== icon ) rotateIcon . classList . remove ( "rotate" ) ;
273
+ } ) ;
264
274
}
265
275
</ script >
266
276
</ body >
0 commit comments