Skip to content

Commit

Permalink
completed varify account ui
Browse files Browse the repository at this point in the history
  • Loading branch information
tsr-kairi committed Jul 12, 2021
1 parent ce8cdbf commit dbdfa3c
Show file tree
Hide file tree
Showing 3 changed files with 181 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Day 41 - Verify Account UI/app.js
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);
}
});
});
86 changes: 86 additions & 0 deletions Day 41 - Verify Account UI/index.html
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>
81 changes: 81 additions & 0 deletions Day 41 - Verify Account UI/style.css
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;
}
}

0 comments on commit dbdfa3c

Please sign in to comment.