Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit 569a190f authored by Pierre Jarriges's avatar Pierre Jarriges
Browse files

admin app js css files

parent 70af724d
No related branches found
No related tags found
No related merge requests found
<!DOCTYPE html>
<html lang="en">
<head>
......@@ -5,11 +7,12 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Krustacea | Admin dashboard</title>
<link rel="stylesheet" href="/admin_app/style.css">
</head>
<body>
ADMIN Dahsboard
</body>
<script src='/assets/default/admin.js'></script>
<script src="/admin_app/auth/index.js"></script>
</html>
\ No newline at end of file
console.log("Admin board")
\ No newline at end of file
<!DOCTYPE html>
<html lang='en' prefix='og: https://ogp.me/ns#'>
<head>
......@@ -5,22 +6,22 @@
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
<title>Krustacea - Admin Login</title>
<link rel='stylesheet' href='/assets/default/admin.css'>
<link rel="stylesheet" href="/admin_app/style.css">
</head>
<body>
<form id='admin-login-form'>
<div>
<div class="input-group">
<label for='username'>Admin Id</label>
<input type='text' name='username' />
</div>
<div>
<div class="input-group">
<label for='password'>Password</label>
<input type='password' name='password' />
</div>
<input type='submit' />
<input type='submit' value="Login" />
</form>
</body>
<script src='/assets/default/admin.js'></script>
<script src='/admin_app/login/index.js'></script>
</html>
\ No newline at end of file
document.getElementById('admin-login-form').onsubmit = function (e) {
document.getElementById("admin-login-form").onsubmit = function (e) {
e.preventDefault();
fetch('/admin/login', { method: 'POST', body: new URLSearchParams(new FormData(e.target)) }).then(res => {
fetch('/admin/login', { method: "POST", body: new URLSearchParams(new FormData(e.target)) }).then(res => {
if (res.status >= 200 && res.status < 400) {
console.log(res)
window.location = '/admin_app/auth/';
window.location = "/admin_app/auth/";
} else {
e.target.classList.add("error");
}
}).catch(err => console.log(err))
......
*+* {
box-sizing: border-box;
font-family: Lato, Arial, Helvetica, sans-serif
}
body {
margin: 0;
}
#admin-login-form {
display: grid;
width: 340px;
gap: 20px;
padding: 40px;
background-color: #c2ccd5;
position: relative;
margin: 0 auto;
top: 100px;
}
#admin-login-form.error {
box-shadow: 0 0 6px rgb(158, 42, 7);
}
#admin-login-form>.input-group {
display: flex;
align-items: center;
gap: 10px;
}
#admin-login-form>.input-group>input {
padding: 4px;
flex: 1;
}
#admin-login-form>.input-group>label {
padding: 4px;
font-weight: bold;
color: #444;
width: 100px;
}
#admin-login-form>input[type=submit] {
padding: 10px;
color: #ddd;
background-color: #657583;
border: none;
font-weight: bold;
cursor: pointer;
}
#admin-login-form>input[type=submit]:hover {
color: white;
background-color: #444c53;
}
\ No newline at end of file
*+* {
box-sizing: border-box;
font-family: Lato, Arial, Helvetica, sans-serif
}
body {
margin: 0;
}
#admin-login-form {
display: grid;
width: 300px;
gap: 20px;
}
#admin-login-form input {
padding: 4px;
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment