-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
181 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const codes = document.querySelectorAll(".code"); | ||
|
||
codes[0].focus(); | ||
|
||
codes.forEach((code, idx) => { | ||
code.addEventListener("keydown", (e) => { | ||
if (e.key >= 0 && e.key <= 9) { | ||
codes[idx].value = ""; | ||
setTimeout(() => codes[idx + 1].focus(), 10); | ||
} else if (e.key === "Backspace") { | ||
setTimeout(() => codes[idx - 1].focus(), 10); | ||
} | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<link | ||
href="https://fonts.googleapis.com/css2?family=Mulish:wght@300;700&display=swap" | ||
rel="stylesheet" | ||
/> | ||
<link rel="stylesheet" href="./style.css" /> | ||
<title>Verify Account UI</title> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<h2>Varify your account</h2> | ||
<p> | ||
We emailed you the six digit code to [email protected] <br /> | ||
Enter the code below to confirm your email address. | ||
</p> | ||
|
||
<div class="code-container"> | ||
<input | ||
type="number" | ||
class="code" | ||
placeholder="0" | ||
min="0" | ||
max="9" | ||
required | ||
/> | ||
|
||
<input | ||
type="number" | ||
class="code" | ||
placeholder="0" | ||
min="0" | ||
max="9" | ||
required | ||
/> | ||
|
||
<input | ||
type="number" | ||
class="code" | ||
placeholder="0" | ||
min="0" | ||
max="9" | ||
required | ||
/> | ||
|
||
<input | ||
type="number" | ||
class="code" | ||
placeholder="0" | ||
min="0" | ||
max="9" | ||
required | ||
/> | ||
|
||
<input | ||
type="number" | ||
class="code" | ||
placeholder="0" | ||
min="0" | ||
max="9" | ||
required | ||
/> | ||
|
||
<input | ||
type="number" | ||
class="code" | ||
placeholder="0" | ||
min="0" | ||
max="9" | ||
required | ||
/> | ||
</div> | ||
|
||
<small class="info"> | ||
Thois is design only.We didn't actually send you an email as we don't | ||
have your email right now? | ||
</small> | ||
</div> | ||
|
||
<script src="./app.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
*::after, | ||
*::before { | ||
box-sizing: border-box; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
body { | ||
font-family: "Mulish", sans-serif; | ||
background-color: #fbfcfe; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
height: 100vh; | ||
overflow: hidden; | ||
} | ||
|
||
.container { | ||
background-color: #fff; | ||
border: 3px solid #000; | ||
border-radius: 10px; | ||
padding: 30px; | ||
max-width: 1000px; | ||
text-align: center; | ||
} | ||
|
||
.code-container { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
margin: 40px 0; | ||
} | ||
|
||
.code { | ||
border-radius: 5px; | ||
font-size: 75px; | ||
height: 100px; | ||
width: 80px; | ||
border: 1px solid #eee; | ||
margin: 1%; | ||
text-align: center; | ||
font-weight: 300; | ||
-moz-appearance: textfield; | ||
} | ||
|
||
.code::-webkit-outer-spin-button, | ||
.code::-webkit-inner-spin-button { | ||
-webkit-appearance: none; | ||
margin: 0; | ||
} | ||
|
||
.code:valid { | ||
border-color: #3498db; | ||
box-shadow: 0 10px 10px -5px rgba(0, 0, 0, 0.25); | ||
} | ||
|
||
.code:focus { | ||
outline: none; | ||
} | ||
|
||
.info { | ||
background-color: #eaeaea; | ||
display: inline-block; | ||
padding: 10px; | ||
line-height: 20px; | ||
min-width: 400px; | ||
color: #777; | ||
border-radius: 5px; | ||
} | ||
|
||
@media (max-width: 600px) { | ||
.code-container { | ||
flex-wrap: wrap; | ||
} | ||
|
||
.code { | ||
font-size: 60px; | ||
height: 60px; | ||
max-width: 50px; | ||
} | ||
} |