Skip to content

Commit 7c3af2b

Browse files
Astraxx04farhaanbukhsh
authored andcommitted
FAQ's Section
1 parent ceffb0f commit 7c3af2b

File tree

4 files changed

+401
-0
lines changed

4 files changed

+401
-0
lines changed

src/_includes/components/dropdown.njk

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{% macro renderDropdown(question) %}
2+
<div class="space-y-4">
3+
<div class="bg-white shadow-lg rounded-md overflow-hidden">
4+
<button
5+
class="w-full text-left p-4 font-semibold text-lg flex justify-between items-center relative overflow-hidden group hover:bg-[#8385F2] hover:text-white focus:outline-none transition-colors duration-300"
6+
onclick="
7+
const answer = this.nextElementSibling;
8+
const icon = this.querySelector('svg');
9+
answer.classList.toggle('hidden');
10+
icon.classList.toggle('rotate-180');
11+
12+
if (!answer.classList.contains('hidden')) {
13+
this.classList.add('bg-[#8385F2]', 'text-white');
14+
} else {
15+
this.classList.remove('bg-[#8385F2]', 'text-white');
16+
}
17+
"
18+
>
19+
<span class="relative z-10">{{ question }}</span>
20+
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 transition-transform duration-300 relative z-10 text-gray-800" fill="none" viewBox="0 0 24 24" stroke="currentColor">
21+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7" />
22+
</svg>
23+
</button>
24+
<div class="hidden p-2 text-black border-t text-justify border-gray-200">
25+
{{ caller() }}
26+
</div>
27+
</div>
28+
</div>
29+
{% endmacro %}

src/_includes/navbar.njk

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@
77
</a>
88
<ul class="flex items-center justify-center w-full gap-8 relative mb-0">
99
{% set menuItems = [
10+
{
11+
"name": "About",
12+
"hasSubmenu": true,
13+
"submenu": [
14+
{"name": "FAQ's", "link": "about/faqs"}
15+
]
16+
},
1017
{
1118
"name": "CFP",
1219
"link": "cfp",

0 commit comments

Comments
 (0)