Skip to content
Snippets Groups Projects
Commit fb895de7 authored by AlphaThrone's avatar AlphaThrone
Browse files

feat: login-page (coba2)

parent 368bafd4
Branches
Tags
No related merge requests found
login-page/bg.webp

167 KiB

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial scale=1.0">
<title>Sign In and Sign Up Form</title>
<link rel="stylesheet" href="style.css">
<script src="https://kit.fontawesome.com/8505941c5b.js" crossorigin="anonymous"></script>
</head>
<body>
<div class="container">
<div class="form-box">
<h1 id="title">Sign Up</h1>
<form>
<div class="input-group">
<div class="input-field" id="nameField">
<i class="fa-solid fa-user"></i>
<input type="text" placeholder="Name">
</div>
<div class="input-field">
<i class="fa-solid fa-envelope"></i>
<input type="email" placeholder="Email">
</div>
<div class="input-field">
<i class="fa-solid fa-lock"></i>
<input type="password" placeholder="Password">
</div>
<p>Lost password <a href="#">Click here!</a></p>
</div>
<div class="btn-field">
<button type="button" id="signupBtn">Sign up</button>
<button type="button" id="signinBtn" class="disable">Sign in</button>
</div>
</form>
</div>
</div>
<script>
let signupBtn = document.getElementById("signupBtn");
let signinBtn = document.getElementById("signinBtn");
let nameField = document.getElementById("nameField");
let title = document.getElementById("title");
signinBtn.onclick = function(){
signinBtn.style.background = "#3c00a0";
signupBtn.style.background = "#eaeaea";
signupBtn.style.color = "#555";
signinBtn.style.color = "#fff";
nameField.style.maxHeight = "0";
title.innerHTML = "Sign In";
signupBtn.classList.add("disable");
signupBtn.classList.remove("disable");
}
signupBtn.onclick = function(){
signupBtn.style.background = "#3c00a0";
signinBtn.style.background = "#eaeaea";
signupBtn.style.color = "#fff";
signinBtn.style.color = "#555";
nameField.style.maxHeight = "60px";
title.innerHTML = "Sign Up";
signupBtn.classList.remove("disable");
signinBtn.classList.add("disable");
}
</script>
</body>
</html>
\ No newline at end of file
*{
margin: 0;
padding: 0;
font-family: Montserrat, "Open Sans", Arial, Helvetica, sans-serif;
box-sizing: border-box;
}
.container{
width: 100%;
height: 100vh;
background-image: linear-gradient(rgba(0,0,50,0.8), rgba(0,0,50,0.8)), url(bg.webp);
background-position: center;
background-size: cover;
position: relative;
}
.form-box{
width: 90%;
max-width: 30%;
position: relative;
top: 0%;
left: 50%;
transform: translate(-50%, 50%);
background: #fff;
padding: 50px 60px 70px;
text-align: center;
border-radius: 25px;
}
.form-box h1{
font-size: 30px;
margin-bottom: 60px;
color: #3c00a0;
position: relative;
}
.input-field{
background: #eaeaea;
margin: 15px 0;
border-radius: 3px;
display: flex;
align-items: center;
max-height: 65px;
transition: max-height 0.5s;
overflow: hidden;
}
input{
width: 100%;
background: transparent;
border: 0;
outline: 0;
padding: 18px;
}
.input-field i{
margin-left: 15px;
color: #999;
}
form p{
text-align: center;
font-size: 13px;
margin-bottom: 10px;
}
form p a{
text-decoration: none;
color: #3c00a0;
}
.btn-field{
width: 100%;
display: flex;
justify-content: space-between;
}
.btn-field button{
flex-basis: 48%;
background: #3c00a0;
color: #fff;
height: 40px;
border-radius: 20px;
border: 0;
outline: 0;
cursor: pointer;
transition: background 1s;
}
.btn-field button.disable{
background: #eaeaea;
color: #555;
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment