Move html files to their own folders

This commit is contained in:
Reimar 2025-03-20 12:05:43 +01:00
parent dc82267cbc
commit 166a6aa8c8
Signed by: Reimar
GPG Key ID: 93549FA07F0AE268
8 changed files with 78 additions and 79 deletions

View File

@ -1 +1 @@
<meta http-equiv="refresh" content="0; url=/pages/login.html" />
<meta http-equiv="refresh" content="0; url=/login" />

36
frontend/login/index.html Normal file
View File

@ -0,0 +1,36 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Login - Temperature alarm</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/styles/login.css">
<script defer type="module" src="/scripts/login.js"></script>
</head>
<body>
<div class="container">
<form id="loginForm">
<div class="form-container">
<h1>Login</h1>
<label for="emailorusn"><b>Email or Username</b></label>
<input type="text" placeholder="Enter email or username" id="emailorusn" required>
<label for="psw"><b>Password</b></label>
<input type="password" placeholder="Enter password" id="psw" required>
<button type="submit">Login</button>
<div class="registerText">
<label>
<input type="checkbox" name="remember"> Remember me
</label>
<p>
Dont have an account? <a href="/register">Register</a>
</p>
</div>
</div>
</form>
</div>
</body>
</html>

View File

@ -1,36 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<div class="container">
<form id="loginForm">
<div class="form-container">
<h1>Login</h1>
<label for="emailorusn"><b>Email or Username</b></label>
<input type="text" placeholder="Enter email or username" id="emailorusn" required>
<label for="psw"><b>Password</b></label>
<input type="password" placeholder="Enter password" id="psw" required>
<button type="submit">Login</button>
<div class="registerText">
<label>
<input type="checkbox" name="remember"> Remember me
</label>
<label>
Dont have an account? <a href="./login.html">Register</a>
</label>
</div>
</div>
</form>
</div>
</body>
<link rel="stylesheet" href="/styles/login.css">
<script type="module" src="/scripts/login.js"></script>
</html>

View File

@ -1,39 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<div class="container">
<form id="registerForm">
<div class="form-container">
<h1>Create Account</h1>
<label for="email"><b>Email</b></label>
<input type="email" placeholder="Enter email "id="email" required>
<label for="uname"><b>Username</b></label>
<input type="text" placeholder="Enter username" id="uname" required>
<label for="psw"><b>Password</b></label>
<input type="password" placeholder="Enter password" id="psw" required>
<label for="rpsw"><b>Repeat Password</b></label>
<input type="password" placeholder="Enter password again" id="rpsw" required>
<button type="submit">Register</button>
<div class="loginText">
<label>
Already have an account? <a href="./home.html">Login</a>
</label>
</div>
</div>
</form>
</div>
</body>
<link rel="stylesheet" href="/styles/register.css">
<script type="module" src="/scripts/register.js"></script>
</html>

View File

@ -0,0 +1,39 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Register - Temperature Alarm</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/styles/register.css">
<script type="module" src="/scripts/register.js"></script>
</head>
<body>
<div class="container">
<form id="registerForm">
<div class="form-container">
<h1>Create Account</h1>
<label for="email"><b>Email</b></label>
<input type="email" placeholder="Enter email "id="email" required>
<label for="uname"><b>Username</b></label>
<input type="text" placeholder="Enter username" id="uname" required>
<label for="psw"><b>Password</b></label>
<input type="password" placeholder="Enter password" id="psw" required>
<label for="rpsw"><b>Repeat Password</b></label>
<input type="password" placeholder="Enter password again" id="rpsw" required>
<button type="submit">Register</button>
<div class="loginText">
<label>
Already have an account? <a href="./home.html">Login</a>
</label>
</div>
</div>
</form>
</div>
</body>
</html>

View File

@ -1,5 +1,4 @@
import { address } from "../../shared/constants";
import { address } from "../../shared/constants.js";
export function login(usernameOrEmail, password) {
console.log(usernameOrEmail);
@ -41,4 +40,4 @@ export function create(email, username, password, repeatPassword){
.then(response => response.json())
.then(data => console.log("Success:", data))
.catch(error => console.error("Error:", error));
}
}