Academic Paper
Community Paper
Policymakers Paper
@@ -204,7 +204,7 @@ class TractatusNavbar {
-
+
System Architecture
For Implementers
Village Case Study
@@ -227,7 +227,7 @@ class TractatusNavbar {
-
+
About Tractatus
Values
Counter-Arguments
@@ -242,7 +242,7 @@ class TractatusNavbar {
-
+
@@ -420,14 +420,12 @@ class TractatusNavbar {
if (!btn || !content) return;
btn.addEventListener('click', () => {
- const isCollapsed = content.classList.contains('max-h-0');
+ const isCollapsed = content.style.maxHeight === '0px' || content.style.maxHeight === '';
if (isCollapsed) {
- content.classList.remove('max-h-0');
- content.classList.add('max-h-96');
+ content.style.maxHeight = content.scrollHeight + 'px';
if (chevron) chevron.style.transform = 'rotate(180deg)';
} else {
- content.classList.remove('max-h-96');
- content.classList.add('max-h-0');
+ content.style.maxHeight = '0px';
if (chevron) chevron.style.transform = '';
}
});
@@ -503,8 +501,7 @@ class TractatusNavbar {
});
if (hasActive) {
- content.classList.remove('max-h-0');
- content.classList.add('max-h-96');
+ content.style.maxHeight = content.scrollHeight + 'px';
if (chevron) chevron.style.transform = 'rotate(180deg)';
}
});