Skip to content

Commit

Permalink
Merge pull request #3518 from Sudhanshu248/main
Browse files Browse the repository at this point in the history
Add FAQ Section on Book Page
  • Loading branch information
sailaja-adapa authored Oct 16, 2024
2 parents 849cd4e + f4289fc commit d314884
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 5 deletions.
6 changes: 5 additions & 1 deletion assets/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ body {

::-webkit-scrollbar-thumb:hover {
background: hsl(357, 37%, 62%);
}
}
.center-content {
display: flex;
flex-direction: column;
Expand Down Expand Up @@ -3119,6 +3119,10 @@ footer {
font-family: var(--ff-philosopher);
}

#faqq{
font-size: 31px;
}

.faq-container {
background-color: hsl(0deg 100% 80.49%);
margin-bottom: 2rem;
Expand Down
40 changes: 39 additions & 1 deletion books.html
Original file line number Diff line number Diff line change
Expand Up @@ -962,6 +962,44 @@ <h4>How do I ensure the safety and security of my personal information on SwapRe
</div>
</div>
<br /><br />
<script>
document.addEventListener('DOMContentLoaded', () => {
const faqContainers = document.querySelectorAll('.faq-container');

faqContainers.forEach(faq => {
const question = faq.querySelector('.question');

question.addEventListener('click', () => {
const answers = faq.querySelector('.answers');

answers.classList.toggle('visible');

const icon = faq.querySelector('.icon');
icon.classList.toggle('fa-rotate-180');
});


const observerOptions = {
root: null,
rootMargin: '0px',
threshold: 0.1
};

const observer = new IntersectionObserver((entries, observer) => {
entries.forEach((entry) => {
if (entry.isIntersecting) {
entry.target.classList.add('visible');
observer.unobserve(entry.target);
}
});
}, observerOptions);

observer.observe(faq);
});
});


</script>

<!--
- #FOOTER
Expand All @@ -979,7 +1017,7 @@ <h4>How do I ensure the safety and security of my personal information on SwapRe
possibilities!
</p>
</div>
</div>
</div>
<div class="foot-middle">
<h2>Quick Links</h2>
<ul>
Expand Down
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5465,7 +5465,7 @@ <h4>How do I ensure the safety and security of my personal information on SwapRe

observer.observe(faq);
});
});
});


</script>
Expand Down Expand Up @@ -5658,8 +5658,7 @@ <h2 style="margin-left: 0rem; margin-top: 2.75rem;">Quick Links</h2>
outline: none;
}

.newsletter:hover {
// background: linear-gradient(hwb(357 68% 7%), #d26d6d);




Expand All @@ -5675,6 +5674,7 @@ <h2 style="margin-left: 0rem; margin-top: 2.75rem;">Quick Links</h2>
.newsletter {
padding: 20px;
}
}
</style>

<!--<script>
Expand Down

0 comments on commit d314884

Please sign in to comment.