diff --git a/index.js b/index.js index 909863c..cd4dc7d 100644 --- a/index.js +++ b/index.js @@ -88,6 +88,10 @@ app.use(express.static(path.join(__dirname, 'public'))); io.engine.use(sessionMiddleware); +app.get('/privacy', (req, res) => { + res.render("privacy"); +}); + app.get('/', async (req, res) => { let login = loginState(req); @@ -355,11 +359,11 @@ io.on('connection', async (socket) => { const req = socket.request; const session = req.session; socket.session = session; - if (session.loginState != 2) { - socket.on('email login', (email, callback) => { - callback(session.nickname); - }); - } + // if (session.loginState != 2) { + // socket.on('email login', (email, callback) => { + // callback(session.nickname); + // }); + // } if (!await GInfo.isPlayerInGame(socket)) { if (session.nickname == null) { diff --git a/lang/en.json b/lang/en.json index 1a4959d..796891e 100644 --- a/lang/en.json +++ b/lang/en.json @@ -9,6 +9,13 @@ "Connection error": "Connection error" }, + "landing": { + "The #1 online multiplayer battleships game": "The #1 online multiplayer battleships game", + "SCROLL DOWN": "SCROLL DOWN", + + "Privacy policy": "Privacy policy" + }, + "menu": { "navbar": { "Main menu": "Main menu", diff --git a/lang/pl.json b/lang/pl.json index e09c755..c6e1017 100644 --- a/lang/pl.json +++ b/lang/pl.json @@ -9,6 +9,13 @@ "Connection error": "Błąd połączenia" }, + "landing": { + "The #1 online multiplayer battleships game": "Najlepsza wielosobowa gra w statki", + "SCROLL DOWN": "SCROLLUJ W DÓŁ", + + "Privacy policy": "Polityka prywatności" + }, + "menu": { "navbar": { "Main menu": "Menu główne", diff --git a/public/assets/css/landing.css b/public/assets/css/landing.css index f79fd57..e2764db 100644 --- a/public/assets/css/landing.css +++ b/public/assets/css/landing.css @@ -38,10 +38,14 @@ position: absolute; display: flex; gap: 0.4rem; + + z-index: 1; + + transition: translate 1.5s ease-in-out; } .bgShip#bgs1 { - left: 15vw; + left: 25vw; rotate: -15deg; top: 15vh; } @@ -53,7 +57,7 @@ } .bgShip#bgs3 { - left: 20vw; + left: 30vw; rotate: 65deg; bottom: 25vh; } @@ -64,8 +68,19 @@ bottom: 25vh; } +.bgShip#bgs5 { + right: -15vw; + rotate: 20deg; + top: 25vh; +} + +.bgShip#bgs6 { + right: -15vw; + rotate: 70deg; + bottom: 25vh; +} + .bgShip .field { - /* background-color: var(--field); */ width: 2rem; aspect-ratio: 1; border-radius: 20%; @@ -112,9 +127,9 @@ } .container { - display: flex; height: 100%; - opacity: 1; + z-index: 10; + /* opacity: 1; */ } .container div.outer { @@ -123,5 +138,128 @@ align-items: center; justify-content: center; + z-index: 10; + transform: translateY(-3rem); +} + +@keyframes OutAnim { + from {transform: translateX(0)} + to {transform: translateX(-5%);} +} + +@keyframes InAnim { + from {transform: translateX(5%)} + to {transform: translateX(0%);} +} + +#loginView .modes { + display: flex; + flex-wrap: wrap; + justify-content: center; + gap: 2rem; +} + +#loginView .modes div { + height: 7rem; + width: 15rem; + background-color: black; + border: solid 1px white; + border-radius: 15px; + user-select: none; + padding: 2rem 3rem; +} + +#loginView form { + display: flex; + flex-direction: column; + gap: 2rem; +} + +#loginView form input { + background-color: black; + color: white; + border-radius: 15px; + border: 1px solid white; + font-size: 1.5rem; + text-align: center; + padding: 0.5rem 2rem; + outline: none; +} + +#loginView form input[type=submit] { + cursor: pointer; + font-size: 1rem; + transition: all 0.3s; +} + +#loginView form input[type=submit]:hover { + background-color: white; + color: black; +} + +#authView .modes { + display: flex; + flex-wrap: wrap; + justify-content: center; + gap: 2rem; +} + +#authView .modes div { + height: 13rem; + width: 15rem; + background-color: black; + border: solid 1px white; + border-radius: 15px; + user-select: none; + padding: 2rem 3rem; +} + +#authView form { + display: flex; + flex-direction: column; + gap: 2rem; +} + +#authView form input { + background-color: black; + color: white; + border-radius: 15px; + border: 1px solid white; + font-size: 1.5rem; + text-align: center; + padding: 0.5rem 2rem; + outline: none; +} + +#authView form input[type=submit] { + cursor: pointer; + font-size: 1rem; + transition: all 0.3s; +} + +#authView form input[type=submit]:hover { + background-color: white; + color: black; +} + +.footer { + position: absolute; + bottom: 0px; + /* margin: 0; */ + left: 50vw; + transform: translateX(-50%); + z-index: 50; + font-size: 16px; + font-family: 'Roboto Mono', monospace; +} + +.footer a { + color: white; + margin: 0 1rem; + text-decoration: none; +} + +.footer a:hover { + text-decoration: underline; } \ No newline at end of file diff --git a/public/assets/js/landing.js b/public/assets/js/landing.js index aea5385..50bc155 100644 --- a/public/assets/js/landing.js +++ b/public/assets/js/landing.js @@ -37,7 +37,32 @@ document.addEventListener("wheel", (event) => { }, 100 * (i - 1)); } }, 400); + const fields = document.querySelectorAll(".field"); + fields.forEach(field => { + if (!field.id) { + $(field).css("scale", "1"); + } + }); } else if (event.deltaY < 0) { $(".loginContainer").removeClass("active"); } -}); \ No newline at end of file +}); + +switchView("loginView"); + +const form = document.getElementById('loginForm'); +form.addEventListener('submit', (e) => { + e.preventDefault(); + + console.log("a"); + switchView("authView"); + progressParalax(); +}); + +var parallaxTranslateX = 0; + +function progressParalax() { + parallaxTranslateX -= 30; + $(".bgShip.big").css("translate", `${parallaxTranslateX}vw`); + $(".bgShip.small").css("translate", `${parallaxTranslateX * 0.625}vw`); +} \ No newline at end of file diff --git a/public/assets/js/spa_lib.js b/public/assets/js/spa_lib.js index 4fb0731..614cf00 100644 --- a/public/assets/js/spa_lib.js +++ b/public/assets/js/spa_lib.js @@ -39,11 +39,9 @@ window.addEventListener("load", () => { // if (elem != null) { // switchView(elem.id, true); - // activeView = elem.id; // } // } else { - switchView("mainMenuView"); - activeView = "mainMenuView"; + // switchView("mainMenuView"); //} }); diff --git a/views/index.handlebars b/views/index.handlebars index 482e9ba..79701c6 100644 --- a/views/index.handlebars +++ b/views/index.handlebars @@ -51,7 +51,7 @@
The #1 online multiplayer battleships game
- SCROLL DOWN +{{ t 'landing.The #1 online multiplayer battleships game' }}
+ {{ t 'landing.SCROLL DOWN' }}+ When referencing to "us" we mean the developer(s) of Statki - An online multiplayer browser game at statki.maciejka.xyz. We do not work commercially and are not related to any company. +
+ ++ All of the data we collect is used for functionality features. Some is provided by you and some is collected automatically. +
+ +
+ - Account information: E-mail address, nickname.
+ - Settings, this includes: Preffered language.
+ - Information from actions taken by you: Matches you have played (which includes: your opponent, duration of the match, date of the match, your match statistics)
+ - Optional information: Badges you own - they are shown on your profile and strictly associated with it, you can obtain them optionally from various events. This includes the badge type and the achievement date.
+
+ - Information about your device (IP address, browser version, device operating system, device language)
+ - Information on how you use our service. How often you visit the website, on which page.
+
We use your data only to provide you with services. We do not share it with third parties, nor use it for advertising.
\ No newline at end of file