Loading page and landing page initial styling.
All checks were successful
Home Cluster Builds/wedding-page/pipeline/head This commit looks good

This commit is contained in:
2023-01-08 00:27:59 +02:00
parent e8e3432855
commit 3649d0c30c
15 changed files with 402 additions and 24 deletions

View File

@@ -1,4 +1,31 @@
function incrementCounter() {
let elem = document.querySelector("#counter");
elem.innerHTML = Number(elem.innerHTML) + 1;
function setPageContent(elemID) {
let elem = document.querySelector(elemID);
let target = document.querySelector("#page-content");
target.style.opacity=0;
setTimeout(function () {
target.innerHTML = elem.innerHTML;
target.style.opacity = 1;
}, 500);
}
function nextPage() {
page = Math.min(page+1, pages.length-1);
setPageContent(pages[page]);
}
function prevPage() {
page = Math.max(page-1, 0);
setPageContent(pages[page]);
}
function showLoader(opacity) {
let elem = document.querySelector("#loading-page");
elem.style.opacity = opacity ? 1 : 0;
if (opacity) {
elem.style.display = "flex";
} else {
setTimeout(function () {
elem.style.display = "none";
}, 500)
}
}