Spaces:
Running
Running
Commit
·
9bed813
1
Parent(s):
eff4b4f
Update templates/index.html
Browse files- templates/index.html +13 -6
templates/index.html
CHANGED
@@ -433,19 +433,26 @@
|
|
433 |
const infoText = document.getElementById('info-text');
|
434 |
const additionalInfo = document.getElementById('additional-info');
|
435 |
const showMore = document.getElementById('show-more');
|
436 |
-
|
|
|
|
|
|
|
|
|
|
|
437 |
infoText.addEventListener('click', function() {
|
438 |
-
if (additionalInfo.
|
439 |
-
additionalInfo.
|
440 |
-
|
441 |
-
} else {
|
442 |
-
additionalInfo.classList.add('expanded');
|
443 |
showMore.style.display = 'none';
|
|
|
|
|
|
|
444 |
}
|
445 |
});
|
446 |
});
|
447 |
|
448 |
|
|
|
449 |
|
450 |
</script>
|
451 |
</body>
|
|
|
433 |
const infoText = document.getElementById('info-text');
|
434 |
const additionalInfo = document.getElementById('additional-info');
|
435 |
const showMore = document.getElementById('show-more');
|
436 |
+
|
437 |
+
// Initial setup
|
438 |
+
additionalInfo.style.height = '0';
|
439 |
+
additionalInfo.style.overflow = 'hidden';
|
440 |
+
additionalInfo.style.transition = 'height 0.3s ease-in-out';
|
441 |
+
|
442 |
infoText.addEventListener('click', function() {
|
443 |
+
if (additionalInfo.style.height === '0px') {
|
444 |
+
const scrollHeight = additionalInfo.scrollHeight;
|
445 |
+
additionalInfo.style.height = `${scrollHeight}px`;
|
|
|
|
|
446 |
showMore.style.display = 'none';
|
447 |
+
} else {
|
448 |
+
additionalInfo.style.height = '0';
|
449 |
+
showMore.style.display = 'inline';
|
450 |
}
|
451 |
});
|
452 |
});
|
453 |
|
454 |
|
455 |
+
|
456 |
|
457 |
</script>
|
458 |
</body>
|