Archived
DEV_1
This commit is contained in:
1 parent
6c861a6d78
commit
4f022a0d97
33 files changed
+5415
-173
No files matched your search
Binary file not shown.
|
After Width: | Height: | Size: 8.7 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 28 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 39 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 44 KiB |
@@ -0,0 +1,32 @@
|
||||
const logoutBtn = document.getElementById("logout")
|
||||
|
||||
logoutBtn.addEventListener("click", () => {
|
||||
|
||||
fetch('/signout', {
|
||||
method: 'GET',
|
||||
redirect: 'follow',
|
||||
headers: {
|
||||
'Accept': 'application/json',
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(response => redirect(response))
|
||||
|
||||
|
||||
function redirect(response) {
|
||||
|
||||
if(response.success == true) {
|
||||
window.location.href = "/login"
|
||||
|
||||
} else if(response.token == "auth_success") {
|
||||
|
||||
window.location.href = "/"
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
@@ -0,0 +1,57 @@
|
||||
const userField = document.getElementById("username");
|
||||
const passwordField = document.getElementById("password");
|
||||
const remindus = document.getElementById("remindus");
|
||||
const loginButton = document.getElementById("loginButton");
|
||||
const info = document.getElementById("info");
|
||||
|
||||
loginButton.addEventListener("click", () => {
|
||||
|
||||
info.innerHTML = ""
|
||||
const userValue = userField.value;
|
||||
const passwordValue = passwordField.value;
|
||||
|
||||
if(userValue == "" | passwordValue == "") {
|
||||
info.innerHTML = "Tous les champs doivent être remplis."
|
||||
|
||||
} else if(userValue.includes(" ")) {
|
||||
|
||||
info.innerHTML = "Le nom d'utilisateur ne peut pas contenir un espace"
|
||||
} else {
|
||||
|
||||
|
||||
|
||||
const loginData = {
|
||||
"username":userValue,
|
||||
"password": passwordValue,
|
||||
"remindus": remindus.checked
|
||||
}
|
||||
|
||||
|
||||
fetch('/login', {
|
||||
method: 'POST',
|
||||
redirect: 'follow',
|
||||
headers: {
|
||||
'Accept': 'application/json',
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(loginData)
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(response => redirect(response))
|
||||
|
||||
function redirect(response) {
|
||||
|
||||
if(response.token == "auth_failed") {
|
||||
|
||||
info.innerHTML = "Le nom d'utilisateur ou le mot de passe est éronné"
|
||||
} else if(response.token == "auth_success") {
|
||||
|
||||
window.location.href = "/"
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,2 @@
|
||||
/*! For license information please see neutron.bundle.js.LICENSE.txt */
|
||||
(()=>{var e={466:(e,n,t)=>{"use strict";t.d(n,{Z:()=>H});var o=t(81),r=t.n(o),a=t(645),i=t.n(a),f=t(667),s=t.n(f),c=new URL(t(770),t.b),l=new URL(t(199),t.b),d=new URL(t(204),t.b),b=new URL(t(931),t.b),p=new URL(t(486),t.b),m=new URL(t(609),t.b),g=new URL(t(469),t.b),u=new URL(t(122),t.b),h=new URL(t(144),t.b),v=new URL(t(217),t.b),x=new URL(t(956),t.b),w=new URL(t(460),t.b),y=new URL(t(740),t.b),k=new URL(t(254),t.b),_=new URL(t(647),t.b),T=new URL(t(692),t.b),A=i()(r()),C=s()(c),E=s()(l),z=s()(d),j=s()(b),S=s()(p),q=s()(m),L=s()(g),D=s()(u),O=s()(h),N=s()(v),F=s()(x),I=s()(w),M=s()(y),P=s()(k),$=s()(_),U=s()(T);A.push([e.id,'/*!\n * Bootstrap v5.2.3 (https://getbootstrap.com/)\n * Copyright 2011-2022 The Bootstrap Authors\n * Copyright 2011-2022 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */:root{--bs-blue: #0d6efd;--bs-indigo: #6610f2;--bs-purple: #6f42c1;--bs-pink: #d63384;--bs-red: #dc3545;--bs-orange: #fd7e14;--bs-yellow: #ffc107;--bs-green: #198754;--bs-teal: #20c997;--bs-cyan: #0dcaf0;--bs-black: #000;--bs-white: #fff;--bs-gray: #6c757d;--bs-gray-dark: #343a40;--bs-gray-100: #f8f9fa;--bs-gray-200: #e9ecef;--bs-gray-300: #dee2e6;--bs-gray-400: #ced4da;--bs-gray-500: #adb5bd;--bs-gray-600: #6c757d;--bs-gray-700: #495057;--bs-gray-800: #343a40;--bs-gray-900: #212529;--bs-primary: #0d6efd;--bs-secondary: #6c757d;--bs-success: #198754;--bs-info: #0dcaf0;--bs-warning: #ffc107;--bs-danger: #dc3545;--bs-light: #f8f9fa;--bs-dark: #212529;--bs-primary-rgb: 13, 110, 253;--bs-secondary-rgb: 108, 117, 125;--bs-success-rgb: 25, 135, 84;--bs-info-rgb: 13, 202, 240;--bs-warning-rgb: 255, 193, 7;--bs-danger-rgb: 220, 53, 69;--bs-light-rgb: 248, 249, 250;--bs-dark-rgb: 33, 37, 41;--bs-white-rgb: 255, 255, 255;--bs-black-rgb: 0, 0, 0;--bs-body-color-rgb: 33, 37, 41;--bs-body-bg-rgb: 255, 255, 255;--bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));--bs-body-font-family: var(--bs-font-sans-serif);--bs-body-font-size:1rem;--bs-body-font-weight: 400;--bs-body-line-height: 1.5;--bs-body-color: #212529;--bs-body-bg: #fff;--bs-border-width: 1px;--bs-border-style: solid;--bs-border-color: #dee2e6;--bs-border-color-translucent: rgba(0, 0, 0, 0.175);--bs-border-radius: 0.375rem;--bs-border-radius-sm: 0.25rem;--bs-border-radius-lg: 0.5rem;--bs-border-radius-xl: 1rem;--bs-border-radius-2xl: 2rem;--bs-border-radius-pill: 50rem;--bs-link-color: #0d6efd;--bs-link-hover-color: #0a58ca;--bs-code-color: #d63384;--bs-highlight-bg: #fff3cd}*,*::before,*::after{box-sizing:border-box}@media(prefers-reduced-motion: no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:var(--bs-body-font-family);font-size:var(--bs-body-font-size);font-weight:var(--bs-body-font-weight);line-height:var(--bs-body-line-height);color:var(--bs-body-color);text-align:var(--bs-body-text-align);background-color:var(--bs-body-bg);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0)}hr{margin:1rem 0;color:inherit;border:0;border-top:1px solid;opacity:.25}h6,.h6,h5,.h5,h4,.h4,h3,.h3,h2,.h2,h1,.h1{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2}h1,.h1{font-size:calc(1.375rem + 1.5vw)}@media(min-width: 1200px){h1,.h1{font-size:2.5rem}}h2,.h2{font-size:calc(1.325rem + 0.9vw)}@media(min-width: 1200px){h2,.h2{font-size:2rem}}h3,.h3{font-size:calc(1.3rem + 0.6vw)}@media(min-width: 1200px){h3,.h3{font-size:1.75rem}}h4,.h4{font-size:calc(1.275rem + 0.3vw)}@media(min-width: 1200px){h4,.h4{font-size:1.5rem}}h5,.h5{font-size:1.25rem}h6,.h6{font-size:1rem}p{margin-top:0;margin-bottom:1rem}abbr[title]{text-decoration:underline dotted;cursor:help;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-left:2rem}ol,ul,dl{margin-top:0;margin-bottom:1rem}ol ol,ul ul,ol ul,ul ol{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small,.small{font-size:0.875em}mark,.mark{padding:.1875em;background-color:var(--bs-highlight-bg)}sub,sup{position:relative;font-size:0.75em;line-height:0;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}a{color:var(--bs-link-color);text-decoration:underline}a:hover{color:var(--bs-link-hover-color)}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}pre,code,kbd,samp{font-family:var(--bs-font-monospace);font-size:1em}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:0.875em}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:0.875em;color:var(--bs-code-color);word-wrap:break-word}a>codeLine truncated
|
||||
@@ -0,0 +1,30 @@
|
||||
/*!
|
||||
* Bootstrap v5.2.3 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Sizzle CSS Selector Engine v2.3.9
|
||||
* https://sizzlejs.com/
|
||||
*
|
||||
* Copyright JS Foundation and other contributors
|
||||
* Released under the MIT license
|
||||
* https://js.foundation/
|
||||
*
|
||||
* Date: 2022-12-19
|
||||
*/
|
||||
|
||||
/*!
|
||||
* jQuery JavaScript Library v3.6.3
|
||||
* https://jquery.com/
|
||||
*
|
||||
* Includes Sizzle.js
|
||||
* https://sizzlejs.com/
|
||||
*
|
||||
* Copyright OpenJS Foundation and other contributors
|
||||
* Released under the MIT license
|
||||
* https://jquery.org/license
|
||||
*
|
||||
* Date: 2022-12-20T21:28Z
|
||||
*/
|
||||
@@ -1,8 +1,123 @@
|
||||
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300&display=swap');
|
||||
|
||||
body {
|
||||
padding: 50px;
|
||||
font: 14px "Lucida Grande", Helvetica, Arial, sans-serif;
|
||||
|
||||
background: rgb(58, 56, 56);
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: 'Roboto', sans-serif;
|
||||
color: white;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #00B7FF;
|
||||
.content {
|
||||
|
||||
|
||||
padding: 3%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
|
||||
.box {
|
||||
text-align: center;
|
||||
padding: 5%;
|
||||
width: 100%;
|
||||
background-color: rgb(80, 80, 80);
|
||||
border-radius: 1vw;
|
||||
box-shadow: 5px 5px 5px rgba(80, 80, 80, 0.477) ;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
|
||||
.box {
|
||||
text-align: center;
|
||||
padding: 5%;
|
||||
width: 50%;
|
||||
background-color: rgb(80, 80, 80);
|
||||
border-radius: 1vw;
|
||||
box-shadow: 5px 5px 5px rgba(80, 80, 80, 0.477) ;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
.box form {
|
||||
|
||||
margin: 4%;
|
||||
|
||||
}
|
||||
|
||||
.box form input {
|
||||
|
||||
border-style: hidden;
|
||||
border-radius: 1vw;
|
||||
transition: all 0.2s ease 0s;
|
||||
|
||||
}
|
||||
|
||||
.box form input:hover {
|
||||
|
||||
box-shadow: 5px 5px 5px rgba(0, 174, 255, 0.477) ;
|
||||
|
||||
}
|
||||
|
||||
.box form .inp {
|
||||
|
||||
margin: 2%;
|
||||
}
|
||||
|
||||
.box button {
|
||||
|
||||
border-style:solid;
|
||||
border-radius: 1vw;
|
||||
padding: 1%;
|
||||
margin: 3%;
|
||||
transition: all 0.2s ease 0s;
|
||||
color: white;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.box button:hover {
|
||||
|
||||
background: white;
|
||||
color: black;
|
||||
border-color: transparent;
|
||||
box-shadow: 2px 2px 5px rgba(0, 174, 255, 0.477);
|
||||
|
||||
}
|
||||
|
||||
.box button:active {
|
||||
|
||||
border-style:solid;
|
||||
border-radius: 1vw;
|
||||
padding: 1%;
|
||||
margin: 3%;
|
||||
transition: all 0.2s ease 0s;
|
||||
color: white;
|
||||
background-color: transparent;
|
||||
border-color: black;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#remindus:hover {
|
||||
box-shadow: 1px 1px 5px rgba(0, 174, 255, 0.477);
|
||||
|
||||
}
|
||||
|
||||
|
||||
#info {
|
||||
|
||||
color: #ff0012;
|
||||
font-size: larger;
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user