Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Login Page in Dark Mode. #3311

Merged
merged 2 commits into from
Oct 13, 2024
Merged
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
233 changes: 233 additions & 0 deletions darkmode1.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,233 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title></title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
<style>
/* Reset */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

/* Body and Background Styling */
body {
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: radial-gradient(circle at center, #8C5B2A 0%, #5B3A29 100%); /* Dark background */
font-family: 'Poppins', sans-serif;
color: #ffffff;
overflow: hidden;
}

/* Login Container */
.login-container {
background: #3E2A23; /* Darker base color */
border-radius: 12px;
padding: 40px;
max-width: 400px;
width: 100%;
box-shadow: 0 15px 30px rgba(0, 0, 0, 0.7);
position: relative;
text-align: center;
transform: translateZ(0); /* Enables 3D rendering */
overflow: hidden; /* To contain the pseudo-element */
}

/* 3D Effect with Shadow */
.login-container::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.1));
border-radius: 12px;
z-index: -1;
filter: blur(15px);
transform: translateZ(-1px);
}

h2 {
font-size: 28px;
margin-bottom: 30px;
letter-spacing: 2px;
}

/* Input Fields */
.input-field {
width: 100%;
padding: 15px;
margin: 12px 0;
border: none;
border-radius: 8px;
background-color: #BF8B58; /* Light brown shade for input */
color: #7d0404;
font-size: 16px;
transition: background-color 0.3s ease;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.input-field:focus {
background-color: #D1A679; /* Lighter brown on focus */
outline: none;
}

/* Show Password Container */
.show-password {
display: flex;
align-items: center;
justify-content: flex-start;
margin: 10px 0;
}

.show-password input {
margin-right: 8px;
cursor: pointer;
}

/* Buttons with Hover Effects */
.login-btn {
width: 100%;
padding: 14px;
background: linear-gradient(135deg, #f72585, #4361ee);
border: none;
border-radius: 8px;
color: #ffffff;
font-size: 18px;
margin-top: 20px;
cursor: pointer;
transition: all 0.4s ease;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.login-btn:hover {
background: linear-gradient(135deg, #4361ee, #4cc9f0);
transform: scale(1.05);
}

.forgot-password {
margin-top: 15px;
font-size: 14px;
color: #bbbbbb;
transition: color 0.3s ease;
}

.forgot-password:hover {
color: #ffffff;
}

/* Social Buttons */
.social-btns {
display: flex;
justify-content: space-between;
margin-top: 25px;
}

.social-btn {
width: 48%;
padding: 12px;
border-radius: 8px;
color: white;
text-align: center;
font-size: 10px;
cursor: pointer;
text-decoration: none;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
display: flex; /* Flex for icon alignment */
align-items: center; /* Centering icon vertically */
justify-content: center; /* Centering content */
}

.google-btn {
background: #db4437; /* Google color */
}

.facebook-btn {
background: #3b5998; /* Facebook color */
}

.social-btn:hover {
opacity: 0.85;
transform: scale(1.05);
transition: all 0.3s ease;
}

/* Create Account Link */
.create-account {
display: block;
margin-top: 25px;
font-size: 16px;
color: #f72585;
text-decoration: none;
}

.create-account:hover {
color: #ffffff;
}

/* Responsive */
@media (max-width: 768px) {
.login-container {
padding: 30px;
}

.social-btns {
flex-direction: column;
gap: 10px;
}

.social-btn {
width: 100%;
}
}
</style>
</head>
<body>

<div class="login-container">
<h2>Login</h2>
<input type="email" class="input-field" placeholder="Email">
<div class="password-field">
<input type="password" class="input-field" id="password" placeholder="Password">
<div class="show-password">
<input type="checkbox" id="togglePassword">
<label for="togglePassword">Show Password</label>
</div>
</div>
<a href="#" class="forgot-password">Forgot Password?</a>
<button class="login-btn">Login</button>

<div class="social-btns">
<a href="#" class="social-btn google-btn">
<i class="fab fa-google" style="margin-right: 5px;"></i>Sign in with Google
</a>
<a href="#" class="social-btn facebook-btn">
<i class="fab fa-facebook-f" style="margin-right: 5px;"></i>Sign in with Facebook
</a>
</div>

<a href="#" class="create-account">Create Account</a>
</div>

<script>
// Toggle Password Visibility
const togglePassword = document.getElementById('togglePassword');
const passwordInput = document.getElementById('password');

togglePassword.addEventListener('change', () => {
if (togglePassword.checked) {
passwordInput.type = 'text';
} else {
passwordInput.type = 'password';
}
});
</script>
</body>
</html>
Loading