Basic interface
This commit is contained in:
BIN
static/SBB-Logo.png
Normal file
BIN
static/SBB-Logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.1 KiB |
9
static/custom-bootstrap-override.css
Normal file
9
static/custom-bootstrap-override.css
Normal file
@@ -0,0 +1,9 @@
|
||||
.bg-primary .btn-primary .btn-primary:hover{
|
||||
border-color: red;
|
||||
background-color: red !important;
|
||||
|
||||
}
|
||||
|
||||
* {
|
||||
border-radius: 0 !important;
|
||||
}
|
BIN
static/fallback.jpg
Normal file
BIN
static/fallback.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 195 KiB |
33
static/index.js
Normal file
33
static/index.js
Normal file
@@ -0,0 +1,33 @@
|
||||
var currentscrollHeight = 0;
|
||||
var count = 0;
|
||||
jQuery(document).ready(function ($) {
|
||||
for (var i = 0; i < 8; i++) {
|
||||
callData(count);//Call 8 times on page load
|
||||
count++;
|
||||
}
|
||||
});
|
||||
$(window).on("scroll", function () {
|
||||
const scrollHeight = $(document).height();
|
||||
const scrollPos = Math.floor($(window).height() + $(window).scrollTop());
|
||||
const isBottom = scrollHeight - 100 < scrollPos;
|
||||
if (isBottom && currentscrollHeight < scrollHeight) {
|
||||
//alert('calling...');
|
||||
for (var i = 0; i < 6; i++) {
|
||||
callData(count);//Once at bottom of page -> call 6 times
|
||||
count++;
|
||||
}
|
||||
currentscrollHeight = scrollHeight;
|
||||
}
|
||||
});
|
||||
function callData(counter) {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://localhost:8000/get_event?id=" + counter,
|
||||
dataType: "html",
|
||||
success: function (result) {
|
||||
//alert(result[0]);
|
||||
$(result).appendTo('.list');
|
||||
},
|
||||
error: function (result) {}
|
||||
});
|
||||
}
|
Reference in New Issue
Block a user