Compare commits
No commits in common. "3c807a5c70a3e60947d50701ba81b7f404f755b4" and "e78c16f7215446adbfde8ae94f21de5e7093cad5" have entirely different histories.
3c807a5c70
...
e78c16f721
@ -1,6 +1,5 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
@ -45,15 +44,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@keyframes float {
|
@keyframes float {
|
||||||
|
0%, 100% { transform: translateY(0px); }
|
||||||
0%,
|
50% { transform: translateY(20px); }
|
||||||
100% {
|
|
||||||
transform: translateY(0px);
|
|
||||||
}
|
|
||||||
|
|
||||||
50% {
|
|
||||||
transform: translateY(20px);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
@ -190,15 +182,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@keyframes pulse {
|
@keyframes pulse {
|
||||||
|
0%, 100% { transform: scale(1); }
|
||||||
0%,
|
50% { transform: scale(1.1); }
|
||||||
100% {
|
|
||||||
transform: scale(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
50% {
|
|
||||||
transform: scale(1.1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.success-message {
|
.success-message {
|
||||||
@ -226,7 +211,6 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="logo">
|
<div class="logo">
|
||||||
@ -250,8 +234,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="button-group">
|
<div class="button-group">
|
||||||
<button type="button" class="btn btn-signin" onclick="handleLogin()">Login</button>
|
<button type="button" class="btn btn-signin" onclick="goToSignUp()">Sign Up</button>
|
||||||
<button type="button" class="btn btn-signup" onclick="goToSignUp()">Sign Up</button>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="success-message" id="mainMessage"></div>
|
<div class="success-message" id="mainMessage"></div>
|
||||||
@ -298,38 +281,6 @@
|
|||||||
document.getElementById('signupForm').style.display = 'block';
|
document.getElementById('signupForm').style.display = 'block';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Login handler: validate input and show messages
|
|
||||||
function handleLogin() {
|
|
||||||
const username = document.getElementById('mainUsername').value.trim();
|
|
||||||
const password = document.getElementById('mainPassword').value.trim();
|
|
||||||
const successEl = document.getElementById('mainMessage');
|
|
||||||
const errorEl = document.getElementById('mainError');
|
|
||||||
|
|
||||||
// Reset messages
|
|
||||||
successEl.classList.remove('show');
|
|
||||||
errorEl.classList.remove('show');
|
|
||||||
|
|
||||||
if (!username || !password) {
|
|
||||||
errorEl.textContent = 'Please enter both username and password.';
|
|
||||||
errorEl.classList.add('show');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Simulate login (replace with real auth as needed)
|
|
||||||
if (username.toLowerCase() === 'admin' && password === 'admin') {
|
|
||||||
successEl.textContent = `Welcome back, ${username}! Redirecting...`;
|
|
||||||
successEl.classList.add('show');
|
|
||||||
setTimeout(() => {
|
|
||||||
alert('Logged in as ' + username + '. (Simulated)');
|
|
||||||
// Example: redirect to game/dashboard page
|
|
||||||
// window.location.href = 'dashboard.html';
|
|
||||||
}, 800);
|
|
||||||
} else {
|
|
||||||
errorEl.textContent = 'Invalid username or password.';
|
|
||||||
errorEl.classList.add('show');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Signup Form Handler
|
// Signup Form Handler
|
||||||
document.getElementById('signupForm').addEventListener('submit', function(e) {
|
document.getElementById('signupForm').addEventListener('submit', function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
@ -351,5 +302,4 @@
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
Loading…
x
Reference in New Issue
Block a user