Skip to content

Commit

Permalink
FAQs
Browse files Browse the repository at this point in the history
  • Loading branch information
asmaamostafa74 committed Oct 15, 2024
1 parent cff7355 commit 42610f5
Showing 1 changed file with 122 additions and 0 deletions.
122 changes: 122 additions & 0 deletions FAQs.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
<!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="../path/to/flowbite/dist/flowbite.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/flowbite.min.css" rel="stylesheet" />


<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="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>

0 comments on commit 42610f5

Please sign in to comment.