mirror of
https://github.com/alam00000/bentopdf.git
synced 2026-11-05 20:02:47 +01:00
feat: Add licensing page and FAQ script, update site content and navigation, and refine PDF tool logic for multi tool
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
// Simple FAQ accordion handler for standalone pages
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const faqAccordion = document.getElementById('faq-accordion');
|
||||
if (faqAccordion) {
|
||||
faqAccordion.addEventListener('click', (e) => {
|
||||
const questionButton = (e.target as HTMLElement).closest('.faq-question');
|
||||
if (!questionButton) return;
|
||||
|
||||
const faqItem = questionButton.parentElement;
|
||||
const answer = faqItem?.querySelector('.faq-answer') as HTMLElement;
|
||||
|
||||
if (!faqItem || !answer) return;
|
||||
|
||||
faqItem.classList.toggle('open');
|
||||
|
||||
if (faqItem.classList.contains('open')) {
|
||||
answer.style.maxHeight = answer.scrollHeight + 'px';
|
||||
} else {
|
||||
answer.style.maxHeight = '0px';
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user