mirror of
https://github.com/MathiasDPX/grainParisArt.git
synced 2025-01-08 00:06:38 +00:00
Add DS_STORE to gitignore
This commit is contained in:
parent
0e8b3523b8
commit
01c34c6729
3 changed files with 2 additions and 33 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
|||
__pycache__/
|
||||
.vscode/
|
||||
.venv
|
||||
.venv
|
||||
.DS_Store
|
BIN
static/.DS_Store
vendored
BIN
static/.DS_Store
vendored
Binary file not shown.
|
@ -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 = '<img src="{{ url_for("static", filename="loading.gif") }}" alt="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();
|
Loading…
Reference in a new issue