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

Login Page Updated #329

Merged
merged 4 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
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
92 changes: 92 additions & 0 deletions Login/index1.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" href="assets/images/favicon/favicon.ico" type="image/x-icon" />
<script src="https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css"
integrity="sha512-DTOQO9RWCH3ppGqcWaEA1BIZOC6xxalwEsw9c2QQeAIftl+Vegovlnee1c9QX4TctnWMn13TZye+giMm8e2LwA=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css">
<link rel="stylesheet" href="./styles1.css">
<title>Login/SignUp Page</title>
</head>

<body style="background-color: black;">
<div class="loader">
<div>
<lottie-player src="https://lottie.host/451aadfb-9af8-4298-98be-e9c583f8a72c/jPRsrfR2jf.json"
background="##FFFFFF" speed="1" style="width: 500px; height: 150px" loop autoplay mode="normal">
</lottie-player>
</div>
</div>
<div class="snowflakes" style="display: block;">
<div id="particles-js"></div>
</div>

<div class="container" id="container">
<div class="form-container sign-up">
<form action="https://sk66641.github.io/Random-Disco-Light-Simulator/">
<h1 style="color: #f09819;">Activate Your Access</h1>
<div class="social-icons">
<a href="http://www.gmail.com" class="icon"><i class="fa-brands fa-google-plus-g"></i></a>
<a href="http://www.facebook.com" class="icon"><i class="fa-brands fa-facebook-f"></i></a>
<a href="http://www.github.com" class="icon"><i class="fa-brands fa-github"></i></a>
<a href="http://www.linkedin.com" class="icon"><i class="fa-brands fa-linkedin-in"></i></a>
</div>
<span style="color: #f09819;">Secure Access with Your Email Password</span>
<input type="text" placeholder="Name">
<input type="email" placeholder="Email">
<div class="password-container">
<input type="password" id="password" placeholder="Password">
<a href="#" class="icon password-toggle"><i class="fas fa-eye"></i></a>
</div>
<button>Sign Up</button>
</form>
</div>
<div class="form-container sign-in">
<form action="https://sk66641.github.io/Random-Disco-Light-Simulator/">
<h1 style="color: #f09819;">Open Sesame</h1>
<div class="social-icons">
<a href="http://www.gmail.com" class="icon"><i class="fa-brands fa-google-plus-g"></i></a>
<a href="http://www.facebook.com" class="icon"><i class="fa-brands fa-facebook-f"></i></a>
<a href="http://www.github.com" class="icon"><i class="fa-brands fa-github"></i></a>
<a href="http://www.linkedin.com" class="icon"><i class="fa-brands fa-linkedin-in"></i></a>
</div>
<span style="color: #f09819;">Secure Access with Your Email Password</span>
<input type="email" placeholder="Email">
<div class="password-container">
<input type="password" id="password" placeholder="Password">
<a href="#" class="icon password-toggle"><i class="fas fa-eye"></i></a>
</div>


<a href="https://sk66641.github.io/Random-Disco-Light-Simulator/">Forget Your Password?</a>
<button>Sign In</button>
</form>
</div>
<div class="toggle-container">
<div class="toggle">
<div class="toggle-panel toggle-left">
<h1 style="color: yellow;">Welcome back, Explorer!</h1>
<p>Unleash all site features by entering your personal details</p>
<button class="hidden" id="login">Sign In</button>
</div>
<div class="toggle-panel toggle-right">
<h1 style="color: yellow;">Hey there, Friend!</h1>
<p>Sign up with your personal details to unlock all site features</p>
<button class="hidden" id="register">Sign Up</button>
</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/particles.js/2.0.0/particles.min.js"></script>
<script src="../js/background.js"></script>
<script src="./script1.js"></script>

</body>

</html>
61 changes: 61 additions & 0 deletions Login/script1.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
document.addEventListener('DOMContentLoaded', function() {
const container = document.getElementById('container');
const registerBtn = document.getElementById('register');
const loginBtn = document.getElementById('login');

const createPasswordInput = document.querySelector('.sign-up input[type="password"]');
const createPasswordToggle = document.querySelector('.sign-up .password-toggle');

const signInPasswordInput = document.querySelector('.sign-in input[type="password"]');
const signInPasswordToggle = document.querySelector('.sign-in .password-toggle');

registerBtn.addEventListener('click', () => {
container.classList.add("active");
});

loginBtn.addEventListener('click', () => {
container.classList.remove("active");
});

// Function to toggle password visibility for Create Account
function toggleCreatePasswordVisibility() {
const type = createPasswordInput.getAttribute('type') === 'password' ? 'text' : 'password';
createPasswordInput.setAttribute('type', type);

// Toggle eye icon class
if (type === 'password') {
createPasswordToggle.querySelector('i').classList.remove('fa-eye-slash');
createPasswordToggle.querySelector('i').classList.add('fa-eye');
} else {
createPasswordToggle.querySelector('i').classList.remove('fa-eye');
createPasswordToggle.querySelector('i').classList.add('fa-eye-slash');
}
}

// Event listener for Create Account password toggle button
createPasswordToggle.addEventListener('click', function(event) {
event.preventDefault();
toggleCreatePasswordVisibility();
});

// Function to toggle password visibility for Sign In
function toggleSignInPasswordVisibility() {
const type = signInPasswordInput.getAttribute('type') === 'password' ? 'text' : 'password';
signInPasswordInput.setAttribute('type', type);

// Toggle eye icon class
if (type === 'password') {
signInPasswordToggle.querySelector('i').classList.remove('fa-eye-slash');
signInPasswordToggle.querySelector('i').classList.add('fa-eye');
} else {
signInPasswordToggle.querySelector('i').classList.remove('fa-eye');
signInPasswordToggle.querySelector('i').classList.add('fa-eye-slash');
}
}

// Event listener for Sign In password toggle button
signInPasswordToggle.addEventListener('click', function(event) {
event.preventDefault();
toggleSignInPasswordVisibility();
});
});
Loading
Loading