Create base login page
This commit is contained in:
parent
5f2cb0d8e0
commit
a177bec498
3
js_login/README.md
Normal file
3
js_login/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
# JsLogin
|
||||
|
||||
Taken from: https://github.com/mazipan/login-page-css/tree/master/src/18-instagram
|
52
js_login/src/index.html
Normal file
52
js_login/src/index.html
Normal file
@ -0,0 +1,52 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="pt-BR">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="./styles.css" />
|
||||
<title>Instagram clone</title>
|
||||
<link rel="stylesheet" href="../shared/normalize.css">
|
||||
<link rel="stylesheet" href="../shared/additional.css">
|
||||
</head>
|
||||
<body>
|
||||
<main class="flex align-items-center justify-content-center">
|
||||
<section id="auth" class="flex direction-column">
|
||||
<div class="panel login flex direction-column">
|
||||
<h1 title="Instagram" class="flex justify-content-center">
|
||||
JsLogin
|
||||
</h1>
|
||||
<form id="loginForm">
|
||||
<label for="email" class="sr-only">Phone number, username or email address</label>
|
||||
<input id="email" name="email" placeholder="Phone number, username or email address" required />
|
||||
|
||||
<label for="password" class="sr-only">Password</label>
|
||||
<input id="password" name="password" type="password" placeholder="Password" required />
|
||||
|
||||
<button type="submit" style="cursor:pointer;">Log In</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="panel register flex justify-content-center">
|
||||
<p>Don't have an account?</p>
|
||||
<a href="#">Sign up</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="foot" style="padding-top:50px">
|
||||
<ul class="flex flex-wrap" style="font-size: .6em">
|
||||
<li><a href="#">About</a></li>
|
||||
<li><a href="#">Blog</a></li>
|
||||
<li><a href="#">Jobs</a></li>
|
||||
<li><a href="#">Help</li>
|
||||
<li><a href="#">API</a></li>
|
||||
<li><a href="#">Privacy</a></li>
|
||||
<li><a href="#">Terms</a></li>
|
||||
<li><a href="#">Top accounts</a></li>
|
||||
<li><a href="#">Hashtags</a></li>
|
||||
<li><a href="#">Locations</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<script src="/script.js"></script>
|
||||
</body>
|
||||
</html>
|
12
js_login/src/script.js
Normal file
12
js_login/src/script.js
Normal file
@ -0,0 +1,12 @@
|
||||
const form = document.getElementById("loginForm");
|
||||
form.addEventListener("submit", (e) => {
|
||||
e.preventDefault();
|
||||
|
||||
const email = document.getElementById("email").value;
|
||||
const password = document.getElementById("password").value;
|
||||
|
||||
if (email === "sesame@ouvretoi.com" && password === "topsecret")
|
||||
location.href = "/flag.txt";
|
||||
else
|
||||
alert("Identifiants incorrects, veuillez réessayer !");
|
||||
})
|
243
js_login/src/styles.css
Normal file
243
js_login/src/styles.css
Normal file
@ -0,0 +1,243 @@
|
||||
* {
|
||||
border: none;
|
||||
box-sizing: border-box;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: #fafafa;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
main {
|
||||
height: 100vh;
|
||||
margin: auto;
|
||||
max-width: 935px;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Flex rules
|
||||
*/
|
||||
|
||||
.flex {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.direction-column {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.justify-content-center {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.align-items-center {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.flex-wrap {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.panel {
|
||||
background-color: white;
|
||||
border: 1px solid #dbdbdb;
|
||||
margin-bottom: 10px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
#auth {
|
||||
max-width: 350px;
|
||||
}
|
||||
|
||||
#mobile img {
|
||||
height: 618px;
|
||||
}
|
||||
|
||||
/**
|
||||
* Login section
|
||||
*/
|
||||
.login-with-fb,
|
||||
form {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.register,
|
||||
form {
|
||||
padding: 30px 20px;
|
||||
}
|
||||
|
||||
.login-with-fb {
|
||||
padding: 30px 20px 20px;
|
||||
}
|
||||
|
||||
form .sr-only {
|
||||
display: none;
|
||||
}
|
||||
|
||||
form input {
|
||||
background-color: #fafafa;
|
||||
border: 1px solid #dbdbdb;
|
||||
border-radius: 3px;
|
||||
color: #808080;
|
||||
margin-bottom: 8px;
|
||||
padding: 10px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
form input::placeholder {
|
||||
color: #808080;
|
||||
}
|
||||
|
||||
form input:focus {
|
||||
border: 1px solid #808080;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
form button {
|
||||
background-color: #0095f6;
|
||||
border-radius: 5px;
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
height: 35px;
|
||||
margin-top: 10px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/**
|
||||
* Separator login form from login with fb
|
||||
*/
|
||||
.separator span {
|
||||
background-color: #dbdbdb;
|
||||
height: 1px;
|
||||
width: calc(100% - 10px);
|
||||
}
|
||||
|
||||
.separator .or {
|
||||
color: #808080;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.separator {
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
.separator span:first-child {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.separator span:last-child {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
/**
|
||||
* Login with fb section
|
||||
*/
|
||||
.login-with-fb a {
|
||||
color: #385185;
|
||||
}
|
||||
|
||||
.login-with-fb>a {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.login-with-fb div a {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.login-with-fb div {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
/**
|
||||
* Register section
|
||||
*/
|
||||
.register * {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.register a {
|
||||
color: #0095f6;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.register p {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
/**
|
||||
* App download
|
||||
*/
|
||||
.app-download {
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.app-download p {
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
.app-download img {
|
||||
height: 40px;
|
||||
margin: 0 5px;
|
||||
}
|
||||
|
||||
/**
|
||||
* Footer
|
||||
*/
|
||||
.foot {
|
||||
margin: 0 auto 30px;
|
||||
max-width: 935px;
|
||||
}
|
||||
|
||||
.foot ul {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.foot ul li {
|
||||
margin: 0 10px 10px;
|
||||
}
|
||||
|
||||
.foot ul li a {
|
||||
color: #385185;
|
||||
}
|
||||
|
||||
.foot .copyright {
|
||||
color: #808080;
|
||||
}
|
||||
|
||||
.foot ul li a,
|
||||
.foot .copyright {
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Media queries
|
||||
*/
|
||||
|
||||
@media screen and (width <=767px) {
|
||||
main {
|
||||
margin: 30px auto 50px;
|
||||
}
|
||||
|
||||
.foot .copyright,
|
||||
.foot ul li a {
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user