// button show more images

let oldestPost = document.querySelector('.section-oldest-posts');
const seeMorePosts = document.getElementById('see-more-posts');
const hiddenPost = [...oldestPost.querySelectorAll('.hidden')];

hiddenPost.splice(0, 3).forEach(
    elem => elem.classList.remove('hidden')
);

seeMorePosts.addEventListener('click', function(e) {
    e.preventDefault();
    
    hiddenPost.splice(0, 3).forEach(
        elem => elem.classList.remove('hidden')
    )
    
    if (hiddenPost.length == 0) {
        seeMorePosts.classList.add('hidden');
    }
});