some test required

This commit is contained in:
Blboun3
2024-01-16 13:37:59 +01:00
parent 978f65dcd6
commit fb23c62d16
20 changed files with 299450 additions and 98 deletions

43
public/login/login.html Normal file
View File

@@ -0,0 +1,43 @@
<!DOCTYPE html>
<html lang="cs">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="style.css">
<title>Přihlášení | Infinitum</title>
</head>
<body>
<form action="http://10.69.13.199:8000/" method="post">
<div class="most_outer_form_border">
<div class="outer_form_border">
<div class="form_border">
<h1>Přihlášení</h1>
<br>
<label for="username">Uživatelské jméno</label>
<br>
<input type="text" name="username" id="username" autofocus required minlength="3" maxlength="25"/>
<br>
<label for="password">Heslo</label>
<br>
<input type="password" name="password" id="password" required minlength="8" maxlength="40" pattern="^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#\$%\^&\*]).{8,}$"/>
<br>
<button type="submit">Přihlásit se</button>
</div>
</div>
</div>
</form>
<script>
const form = document.querySelector("form");
form.addEventListener("submit", function (e) {
e.preventDefault();
const passwordInput = this.querySelector("input[type=password]");
crypto.subtle.digest("SHA-512", new TextEncoder().encode(passwordInput.value)).then(function (hashBuffer) {
const hashArray = Array.from(new Uint8Array(hashBuffer));
const hashHex = hashArray.map((b) => b.toString(16).padStart(2, '0')).join('');
passwordInput.value = hashHex;
form.submit();
});
});
</script>
</body>
</html>

66
public/login/style.css Normal file
View File

@@ -0,0 +1,66 @@
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,200&family=Source+Code+Pro:wght@300&display=swap');
body {
background-image: linear-gradient(120deg, #fccb90 0%, #d57eeb 100%);
}
.form_border {
border: 1px solid rgb(92, 92, 92);
border-radius: 7px;
background-color: rgb(160, 161, 182);
width: 350px;
text-align: center;
height: 400px;
justify-content: space-around;
line-height: 200%;
font-family: 'DM Sans', sans-serif;
font-size: larger;
position: relative;
}
.form_border > input {
width: 95%;
font-family: 'Source Code Pro', monospace;
outline: none;
font-size: larger;
border-radius: 5px;
}
.form_border > input:focus {
background-color: rgb(235, 235, 235);
outline: none;
}
.form_border > label {
width: 97%;
display: inline-block;
line-height: 200%;
text-align: left;
}
.form_border > button {
font-family: 'DM Sans', sans-serif;
font-size: larger;
position: absolute;
bottom: 10px;
/*left: 117px;*/
left: 0;
background-color: rgba(255, 190, 78, 0.7);
height: 12%;
font-weight: bold;
border: none;
width: 100%;
}
.most_outer_form_border {
position: fixed;
left: 0;
top: 0;
width: 100vw;
height: 100vh;
display: flex;
}
.outer_form_border {
margin: auto;
}