Initial docker conversion commit

This commit is contained in:
2026-02-13 16:07:02 -03:00
parent 622fe6e6fe
commit 36ff5d0c1a
17 changed files with 686 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
document.querySelectorAll('.accordion-trigger').forEach((btn) => {
btn.addEventListener('click', function() {
const section = btn.closest('.accordion-section');
const expanded = btn.getAttribute('aria-expanded') === "true";
document.querySelectorAll('.accordion-section').forEach(s => {
if (s === section) {
s.classList.toggle('open', !expanded);
btn.setAttribute('aria-expanded', String(!expanded));
const content = btn.nextElementSibling;
content.style.maxHeight = !expanded ? (content.scrollHeight+40) + "px" : "0px";
} else {
s.classList.remove('open');
s.querySelector('.accordion-trigger').setAttribute('aria-expanded', "false");
s.querySelector('.accordion-content').style.maxHeight = "0px";
}
});
});
btn.addEventListener('keydown', function(e) {
if (e.key === "ArrowDown" || e.key === "ArrowUp") {
const triggers = Array.from(document.querySelectorAll('.accordion-trigger'));
let idx = triggers.indexOf(e.target);
if (e.key === "ArrowDown") idx = (idx + 1) % triggers.length;
else idx = (idx - 1 + triggers.length) % triggers.length;
triggers[idx].focus();
}
});
});