Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
138 changes: 138 additions & 0 deletions index1.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Responsive Login Page</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: "Poppins", sans-serif;
}

body {
background: linear-gradient(135deg, #89f7fe, #66a6ff);
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}

.container {
width: 100%;
max-width: 400px;
}

.login-box {
background: #fff;
padding: 40px;
border-radius: 16px;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.login-box h2 {
text-align: center;
margin-bottom: 30px;
color: #333;
}

.input-group {
position: relative;
margin-bottom: 25px;
}

.input-group input {
width: 100%;
padding: 10px;
border: 1px solid #ccc;
border-radius: 8px;
outline: none;
font-size: 16px;
}

.input-group label {
position: absolute;
top: 50%;
left: 12px;
color: #777;
transform: translateY(-50%);
pointer-events: none;
transition: 0.3s;
}

.input-group input:focus + label,
.input-group input:valid + label {
top: -10px;
font-size: 12px;
color: #66a6ff;
background: #fff;
padding: 0 5px;
}

button {
width: 100%;
padding: 10px;
background: #66a6ff;
border: none;
border-radius: 8px;
color: white;
font-size: 16px;
cursor: pointer;
transition: 0.3s;
}

button:hover {
background: #4e8eff;
}

.message {
text-align: center;
margin-top: 10px;
}

.message a {
color: #66a6ff;
text-decoration: none;
}

.message a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<div class="container">
<div class="login-box">
<h2>Login</h2>
<form id="loginForm">
<div class="input-group">
<input type="text" id="username" required />
<label for="username">Username</label>
</div>
<div class="input-group">
<input type="password" id="password" required />
<label for="password">Password</label>
</div>
<button type="submit">Sign In</button>
<p class="message">Forgot your password? <a href="#">Reset</a></p>
</form>
</div>
</div>

<script>
document.getElementById("loginForm").addEventListener("submit", function(e) {
e.preventDefault();
const username = document.getElementById("username").value.trim();
const password = document.getElementById("password").value.trim();

if (username === "" || password === "") {
alert("Please fill in both fields.");
} else {
alert(\`Welcome, \${username}!\`);
}
});
</script>
</body>
</html>