diff --git a/.gitignore b/.gitignore index 4bfa70f..a589ee0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ __pycache__/ .vscode/ -.venv \ No newline at end of file +.venv +.DS_Store \ No newline at end of file diff --git a/static/.DS_Store b/static/.DS_Store deleted file mode 100644 index 2a043aa..0000000 Binary files a/static/.DS_Store and /dev/null differ diff --git a/static/js/infinite-scroll.js b/static/js/infinite-scroll.js deleted file mode 100644 index 6b6daab..0000000 --- a/static/js/infinite-scroll.js +++ /dev/null @@ -1,32 +0,0 @@ -var isLoading = false; -var page = 1; - -function fetchCinemaSessions() { - if (isLoading) return; - - isLoading = true; - var loadingContainer = document.getElementById('loading-container'); - loadingContainer.innerHTML = 'Loading...'; - - fetch('/?page=' + page) - .then(function(response) { - return response.text(); - }) - .then(function(html) { - var cinemaContainer = document.getElementById('cinema-container'); - cinemaContainer.insertAdjacentHTML('beforeend', html); - isLoading = false; - page += 1; - }) - .catch(function() { - isLoading = false; - }); -} - -window.addEventListener('scroll', function() { - if (window.innerHeight + window.scrollY >= document.body.offsetHeight - 100 && !isLoading) { - fetchCinemaSessions(); - } -}); - -fetchCinemaSessions();