theather modus

This commit is contained in:
Lanta 2025-06-17 19:46:03 +02:00
parent ff327d1886
commit f72fb0bb7d

View file

@ -81,8 +81,18 @@ usort($videoData, function($a, $b) {
document.querySelectorAll('.theatre-btn').forEach(function(btn) { document.querySelectorAll('.theatre-btn').forEach(function(btn) {
btn.addEventListener('click', function() { btn.addEventListener('click', function() {
var videoItem = btn.closest('.video-item'); var clickedVideoItem = btn.closest('.video-item');
var isActive = videoItem.classList.toggle('theatre-mode');
// Remove theatre mode from all other videos
document.querySelectorAll('.video-item.theatre-mode').forEach(function(item) {
if (item !== clickedVideoItem) {
item.classList.remove('theatre-mode');
item.querySelector('.theatre-btn').innerText = 'Theatermodus';
}
});
// Toggle theatre mode for the clicked video
var isActive = clickedVideoItem.classList.toggle('theatre-mode');
btn.innerText = isActive ? 'Sluit theatermodus' : 'Theatermodus'; btn.innerText = isActive ? 'Sluit theatermodus' : 'Theatermodus';
}); });
}); });