mirror of
https://github.com/MathiasDPX/grainParisArt.git
synced 2025-01-09 08:26:40 +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
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
||||||
__pycache__/
|
__pycache__/
|
||||||
.vscode/
|
.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