add blocks

This commit is contained in:
2025-12-17 10:14:13 +02:00
parent 18a31be0b1
commit d78a6bedd5
54 changed files with 2755 additions and 10 deletions

View File

@@ -0,0 +1,9 @@
# Регистрация
user:<br>
<input id="reg_user" placeholder="Username"><br>
password:<br>
<input id="reg_pass" placeholder="password" type="password"><button class="toggle-pass" type="button">👁</button><br><br>
<button id="btn_reg">Register</button>
<div class="blockTest">ТестТестТест</div>

View File

@@ -0,0 +1,16 @@
async function UserReg() {
const u = reg_user.value,
p = reg_pass.value;
const r = await fetch("/api/users/register", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ username: u, password: p })
});
if (!r.ok) return alert("Ошибка");
alert("ok");
reg_user.value = "",
reg_pass.value = "";
};
btn_reg.onclick = UserReg;

View File

@@ -0,0 +1 @@
.blockTest { color: red; }