docs: compact help topics with accordions

This commit is contained in:
Timo
2026-07-31 10:46:19 +02:00
parent 5b75bde9bb
commit 9ade6b67ea
4 changed files with 177 additions and 99 deletions
+14
View File
@@ -1760,6 +1760,20 @@ document.addEventListener('DOMContentLoaded', () => {
updateDynamicVersion();
localizeHomeLinks();
initLanguageSelectorValue();
const openSupportAccordion = hash => {
if (!hash || hash === '#') return;
const target = document.getElementById(decodeURIComponent(hash.slice(1)));
if (target?.matches('details.support-accordion')) {
target.open = true;
window.requestAnimationFrame(() => target.scrollIntoView({ block: 'start' }));
}
};
openSupportAccordion(window.location.hash);
window.addEventListener('hashchange', () => openSupportAccordion(window.location.hash));
document.addEventListener('click', event => {
const link = event.target.closest('a[href^="#"]');
if (link) openSupportAccordion(link.hash);
});
if (document.fonts?.ready) {
document.fonts.ready.then(adjustDropdownWidth);
}