diff --git a/.gitignore b/.gitignore index a2d6b61..87c9ad3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -Server/sound/ +server/sound/ *.db start.bat .env diff --git a/Client/ext/popper.js b/Client/ext/popper.js new file mode 100644 index 0000000..19a42b9 --- /dev/null +++ b/Client/ext/popper.js @@ -0,0 +1,134 @@ +function Pop() { + // var cssRuleFile = "/src/css/style.css"; // will be the link once this css file became available online + var cssRuleFile = "https://cookieconsent.popupsmart.com/src/css/style.css"; // will be the link once this css file became available online + + let lnk = document.createElement("link"); + lnk.setAttribute("rel", "stylesheet"); + lnk.setAttribute("type", "text/css"); + lnk.setAttribute("href", cssRuleFile); + document.getElementsByTagName("head")[0].appendChild(lnk); + + let styl = "undefined"; + var conDivObj; + + var fadeInTime = 10; // If needed could be served as an customizable option to the user + var fadeOutTime = 10; + + let cookie = { + name: "cookieconsent_status", + path: "/", + expiryDays: 365 * 24 * 60 * 60 * 5000, + }; + + let content = { + /// Add a field for link color + message: + "This website uses cookies to ensure you get the best experience on our website.", + btnText: "Got it!", + mode: " banner bottom", + theme: " theme-classic", + palette: " palette1", + link: "Learn more", + href: "https://www.cookiesandyou.com", + target: "_blank", + }; + + let createPopUp = function () { + console.log(content); + if (typeof conDivObj === "undefined") { + conDivObj = document.createElement("DIV"); + conDivObj.style.opacity = 0; + conDivObj.setAttribute("id", "spopupCont"); + } + conDivObj.innerHTML = + '
'; + + document.body.appendChild(conDivObj); + fadeIn(conDivObj); + + document + .getElementById("cookie-btn") + .addEventListener("click", function () { + saveCookie(); + fadeOut(conDivObj); + }); + }; + + let fadeOut = function (element) { + var op = 1; + var timer = setInterval(function () { + if (op <= 0.1) { + clearInterval(timer); + conDivObj.parentElement.removeChild(conDivObj); + } + element.style.opacity = op; + element.style.filter = "alpha(opacity=" + op * 100 + ")"; + op -= op * 0.1; + }, fadeOutTime); + }; + let fadeIn = function (element) { + var op = 0.1; + var timer = setInterval(function () { + if (op >= 1) { + clearInterval(timer); + } + element.style.opacity = op; + element.style.filter = "alpha(opacity=" + op * 100 + ")"; + op += op * 0.1; + }, fadeInTime); + }; + + let checkCookie = function (key) { + var keyValue = document.cookie.match("(^|;) ?" + key + "=([^;]*)(;|$)"); + return keyValue ? true : false; + }; + + let saveCookie = function () { + var expires = new Date(); + expires.setTime(expires.getTime() + cookie.expiryDays); + document.cookie = + cookie.name + + "=" + + "ok" + + ";expires=" + + expires.toUTCString() + + "path=" + + cookie.path; + }; + + this.init = function (param) { + if (checkCookie(cookie.name)) return; + + if (typeof param === "object") { + if ("ButtonText" in param) content.btnText = param.ButtonText; + if ("Mode" in param) content.mode = " " + param.Mode; + if ("Theme" in param) content.theme = " " + param.Theme; + if ("Palette" in param) content.palette = " " + param.Palette; + if ("Message" in param) content.message = param.Message; + if ("LinkText" in param) content.link = param.LinkText; + if ("Location" in param) content.href = param.Location; + if ("Target" in param) content.target = param.Target; + if ("Time" in param) + setTimeout(function () { + createPopUp(); + }, param.Time * 1000); + else createPopUp(); + } + }; +} +window.start = new Pop(); diff --git a/Server/static/ext/qrcode.min.js b/Client/ext/qrcode.min.js similarity index 100% rename from Server/static/ext/qrcode.min.js rename to Client/ext/qrcode.min.js diff --git a/Server/static/favicon.ico b/Client/favicon.ico similarity index 100% rename from Server/static/favicon.ico rename to Client/favicon.ico diff --git a/Server/static/images/Icon-144.png b/Client/images/Icon-144.png similarity index 100% rename from Server/static/images/Icon-144.png rename to Client/images/Icon-144.png diff --git a/Server/static/images/Screenshot-Main-Desktop.png b/Client/images/Screenshot-Main-Desktop.png similarity index 100% rename from Server/static/images/Screenshot-Main-Desktop.png rename to Client/images/Screenshot-Main-Desktop.png diff --git a/Server/static/images/Screenshot-Main-Mobile.png b/Client/images/Screenshot-Main-Mobile.png similarity index 100% rename from Server/static/images/Screenshot-Main-Mobile.png rename to Client/images/Screenshot-Main-Mobile.png diff --git a/Server/static/images/placeholder.png b/Client/images/placeholder.png similarity index 100% rename from Server/static/images/placeholder.png rename to Client/images/placeholder.png diff --git a/Server/static/images/play-pause-old.png b/Client/images/play-pause-old.png similarity index 100% rename from Server/static/images/play-pause-old.png rename to Client/images/play-pause-old.png diff --git a/Server/static/images/play-pause.png b/Client/images/play-pause.png similarity index 100% rename from Server/static/images/play-pause.png rename to Client/images/play-pause.png diff --git a/Server/static/images/playlist.png b/Client/images/playlist.png similarity index 100% rename from Server/static/images/playlist.png rename to Client/images/playlist.png diff --git a/Server/static/images/search.png b/Client/images/search.png similarity index 100% rename from Server/static/images/search.png rename to Client/images/search.png diff --git a/Server/static/images/settings.png b/Client/images/settings.png similarity index 100% rename from Server/static/images/settings.png rename to Client/images/settings.png diff --git a/Server/static/images/skip.png b/Client/images/skip.png similarity index 100% rename from Server/static/images/skip.png rename to Client/images/skip.png diff --git a/Server/templates/index.html b/Client/index.html similarity index 80% rename from Server/templates/index.html rename to Client/index.html index 1cbc5cf..3a86b52 100644 --- a/Server/templates/index.html +++ b/Client/index.html @@ -3,15 +3,17 @@Add songs to the shared playlist below!
@@ -61,11 +63,11 @@ changes visibility with JS-->Opposite of light mode
How long alerts stay on screen for (seconds)
@@ -112,21 +114,20 @@ changes visibility with JS-->Wipe the playlist, except the currently playing song. With PartyMode enabled, a second song will be added back randomly
PartyJukebox is under an AGPLV3 liscense. You can access the source code here.
-Release {{ REL_VER_NUM }}
+PartyJukebox is under an AGPLV3 liscense. You can access the source code here.
-
-
-
+
+
+
+