let currentSlide = 0;
const images = [
    'kawah.jpg',
    'pantai.jpg',
    'Candi.jpg',
    'gunung.jpg'
];

function showSlide(index) {
    const slide = document.getElementById('slide');
    slide.src = images[index];
}

function nextSlide() {
    currentSlide = (currentSlide + 1) % images.length;
    showSlide(currentSlide);
}

function prevSlide() {
    currentSlide = (currentSlide - 1 + images.length) % images.length;
    showSlide(currentSlide);
}

function toggleSidebar() {
    const sidebar = document.getElementById('sidebar');
    if (sidebar.style.width === '200px') {
        sidebar.style.width = '0';
    } else {
        sidebar.style.width = '200px';
    }
}
