-
Notifications
You must be signed in to change notification settings - Fork 0
/
FAQs.html
123 lines (112 loc) · 5.93 KB
/
FAQs.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<!DOCTYPE html>
<html lang="ar" dir="ltr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="2G9">
<link href="./output.css" rel="stylesheet">
<title>FAQs</title>
<link rel="icon" type="image/png" href="./images/logo.png">
<!-- Icons -->
<script type="module" src="https://unpkg.com/[email protected]/dist/ionicons/ionicons.esm.js"></script>
<script nomodule src="https://unpkg.com/[email protected]/dist/ionicons/ionicons.js"></script>
<!-- Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Noto+Kufi+Arabic:[email protected]&display=swap" rel="stylesheet">
<script src="https://cdn.tailwindcss.com"></script>
<script src="./js/script.js"></script>
</head>
<style>
body {
font-family: "Noto Kufi Arabic", sans-serif;
}
</style>
<body >
<!-- Start Navbar -->
<div id="navbar"></div>
<!-- End Navbar -->
<!-- Start Content -->
<div class="container mx-auto p-5">
<div class="flex flex-col items-center">
<h2 class="font-medium text-2xl">FAQs</h2>
<!-- <p>2G9</p> -->
</div>
<div class="border-b border-slate-200">
<button onclick="toggleAccordion(1)" class="w-full flex justify-between items-center py-5 text-slate-800">
<span>2G9</span>
<span id="icon-1" class="text-slate-800 transition-transform duration-300">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" class="w-4 h-4">
<path fill-rule="evenodd" d="M11.78 9.78a.75.75 0 0 1-1.06 0L8 7.06 5.28 9.78a.75.75 0 0 1-1.06-1.06l3.25-3.25a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1 0 1.06Z" clip-rule="evenodd" />
</svg>
</span>
</button>
<div id="content-1" class="max-h-0 overflow-hidden transition-all duration-300 ease-in-out">
<div class="pb-5 text-sm text-slate-500">
2G9
</div>
</div>
</div>
<div class="border-b border-slate-200">
<button onclick="toggleAccordion(2)" class="w-full flex justify-between items-center py-5 text-slate-800">
<span>2G9</span>
<span id="icon-2" class="text-slate-800 transition-transform duration-300">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" class="w-4 h-4">
<path fill-rule="evenodd" d="M11.78 9.78a.75.75 0 0 1-1.06 0L8 7.06 5.28 9.78a.75.75 0 0 1-1.06-1.06l3.25-3.25a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1 0 1.06Z" clip-rule="evenodd" />
</svg>
</span>
</button>
<div id="content-2" class="max-h-0 overflow-hidden transition-all duration-300 ease-in-out">
<div class="pb-5 text-sm text-slate-500">
2G9
</div>
</div>
</div>
<div class="border-b border-slate-200">
<button onclick="toggleAccordion(3)" class="w-full flex justify-between items-center py-5 text-slate-800">
<span>2G9</span>
<span id="icon-3" class="text-slate-800 transition-transform duration-300">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" class="w-4 h-4">
<path fill-rule="evenodd" d="M11.78 9.78a.75.75 0 0 1-1.06 0L8 7.06 5.28 9.78a.75.75 0 0 1-1.06-1.06l3.25-3.25a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1 0 1.06Z" clip-rule="evenodd" />
</svg>
</span>
</button>
<div id="content-3" class="max-h-0 overflow-hidden transition-all duration-300 ease-in-out">
<div class="pb-5 text-sm text-slate-500">
2G9
</div>
</div>
</div>
</div>
<!-- End Content -->
<!-- Start Icons -->
<div id="icons"></div>
<!-- End Icons -->
<!-- Start Footer -->
<div id="footer" class="md:block hidden"></div>
<!-- End Footer -->
<script>
function toggleAccordion(index) {
const content = document.getElementById(`content-${index}`);
const icon = document.getElementById(`icon-${index}`);
const downSVG = `
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" class="w-4 h-4">
<path fill-rule="evenodd" d="M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd" />
</svg>
`;
const upSVG = `
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" class="w-4 h-4">
<path fill-rule="evenodd" d="M11.78 9.78a.75.75 0 0 1-1.06 0L8 7.06 5.28 9.78a.75.75 0 0 1-1.06-1.06l3.25-3.25a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1 0 1.06Z" clip-rule="evenodd" />
</svg>
`;
if (content.style.maxHeight && content.style.maxHeight !== '0px') {
content.style.maxHeight = '0';
icon.innerHTML = upSVG;
} else {
content.style.maxHeight = content.scrollHeight + 'px';
icon.innerHTML = downSVG;
}
}
</script>
</body>
</html>