From 9a29e5da68531044b6890a6f53fa61556f7f9ab4 Mon Sep 17 00:00:00 2001
From: Modo
Register
+======= +Register
+>>>>>>> 22cbef5 (Add all other pages)diff --git a/frontend/html/index.html b/frontend/html/index.html index 2214cae..1a689cb 100644 --- a/frontend/html/index.html +++ b/frontend/html/index.html @@ -3,7 +3,11 @@
+<<<<<<< HEAD +======= + +>>>>>>> 22cbef5 (Add all other pages)
@@ -25,6 +29,12 @@
diff --git a/frontend/index.js b/frontend/index.js index 5f4a83e..b8eddc1 100644 --- a/frontend/index.js +++ b/frontend/index.js @@ -52,15 +52,19 @@ console.log(formData) ======= const response = await fetch('/login', { method: "post", +<<<<<<< HEAD /*headers: { >>>>>>> b1b896f (Add api request changes) +======= + /* headers: { +>>>>>>> 22cbef5 (Add all other pages) 'Content-Type': 'application/json' }*/ body: formData }); if(response.ok) { - //next page + window.location.href = "dashboard.html"; } else if(!response.ok) { if (response.status === 403) { const error = new Error('Access denied: You do not have permission to access this resource.'); @@ -68,17 +72,18 @@ console.log(formData) setTimeout(()=> { document.getElementById("errlabel").innerHTML = ""; },3000) + console.log(response) throw error; } } //error - /*const errorData = await response.json(); + const errorData = await response.json(); if (response.status === 401) { throw new Error('Invalid username or password') } else { throw new Error(errorData.error) - }*/ + } // const data = await response.json(); // const token = data.token; @@ -99,9 +104,10 @@ console.log(formData) } >>>>>>> b1b896f (Add api request changes) } - + } +<<<<<<< HEAD <<<<<<< HEAD function handleAuthRes(data) { if(data.token){ @@ -112,6 +118,32 @@ function handleAuthRes(data) { } } ======= +======= +const register = document.getElementById("register"); + +register.addEventListener("click", function(event) { + event.preventDefault(); + window.location.href = "register.html"; +}); + + + + + + + + + + + + + + + + + + +>>>>>>> 22cbef5 (Add all other pages) // function handleAuthRes(data) { // if(data.token){ // localStorage.setItem('token', data.token); diff --git a/frontend/register.css b/frontend/register.css index aed3c06..6d94d75 100644 --- a/frontend/register.css +++ b/frontend/register.css @@ -1,4 +1,5 @@ * { +<<<<<<< HEAD box-sizing: border-box; } @@ -186,4 +187,107 @@ footer p{ background-size: cover; box-shadow: rgb(0, 0, 0) 0px 0px 10px; -} \ No newline at end of file +} +======= + box-sizing: border-box; + } + + body { + background-color: dimgrey; + display: flex; + margin-top: 25px; + align-items: center; + justify-content: center; + background-image: url("bg.jpg"); + background-size: cover; + background-position: center; + background-repeat: no-repeat; + } + + .wrapper { + display: flex; + width: 90vw; + height: 90vh; + align-items: center; + justify-content: center; + } + + + .container { + display: flex; + background-color: transparent; + backdrop-filter: blur(20px); + justify-content: center; + align-items: center; + width: 450px; + height: 400px; + flex-direction: column; + padding: 70px; + padding-bottom: 90px; + box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.6); + row-gap: 8px; + border-radius: 50px; + } + + .input { + width: 300px; + height: 30px; + background-color: transparent; + color: rgb(255, 255, 255, 0.8); + box-shadow: 2px 2px 3px rgb(0, 0, 0, 0.5); + border: none; + border-top: rgba(255, 255, 255, 0.2) 2px solid; + border-left: rgb(255, 255, 255, 0.2) 2px solid; + border-radius: 10px; + padding-left: 5px; + } + + .idiv p { + color: white; + font-family: 'Pixelify Sans', cursive; + margin-left: 5px; + } + + #username::placeholder { + color: rgb(255, 255, 255, 0.5); + padding-left: 5px; + } + + #password::placeholder { + color: rgb(255, 255, 255, 0.5); + padding-left: 5px; + } + + .idiv { + display: flex; + flex-direction: column; + row-gap: 10px; + justify-content: center; + padding: 7px; + } + + .idiv p{ + padding: none; + margin: none; + display: absolute; + translate: 0px 12px; + } + + #loginb { + background-color: transparent; + color: rgb(255, 255, 255, 0.8); + padding: 7px; + margin-top: 20px; + margin-bottom: 20px; + width: 150px; + box-shadow: 2px 2px 5px rgb(0, 0, 0, 0.5); + translate: 0px -5px; + font-family: 'Pixelify Sans', cursive; + font-size: 20px; + border-radius: 10px; + } + + #loginb:active { + background-color: rgb(155, 155, 155, 0.3); + } +>>>>>>> 22cbef5 (Add all other pages) diff --git a/frontend/register.html b/frontend/register.html index 9beca2f..b123e7d 100644 --- a/frontend/register.html +++ b/frontend/register.html @@ -4,28 +4,43 @@
+<<<<<<< HEAD +======= +>>>>>>> 22cbef5 (Add all other pages)