Compare commits
No commits in common. "3c807a5c70a3e60947d50701ba81b7f404f755b4" and "e78c16f7215446adbfde8ae94f21de5e7093cad5" have entirely different histories.
3c807a5c70
...
e78c16f721
@ -1,6 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
@ -45,15 +44,8 @@
|
||||
}
|
||||
|
||||
@keyframes float {
|
||||
|
||||
0%,
|
||||
100% {
|
||||
transform: translateY(0px);
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: translateY(20px);
|
||||
}
|
||||
0%, 100% { transform: translateY(0px); }
|
||||
50% { transform: translateY(20px); }
|
||||
}
|
||||
|
||||
.container {
|
||||
@ -190,15 +182,8 @@
|
||||
}
|
||||
|
||||
@keyframes pulse {
|
||||
|
||||
0%,
|
||||
100% {
|
||||
transform: scale(1);
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: scale(1.1);
|
||||
}
|
||||
0%, 100% { transform: scale(1); }
|
||||
50% { transform: scale(1.1); }
|
||||
}
|
||||
|
||||
.success-message {
|
||||
@ -226,7 +211,6 @@
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="logo">
|
||||
@ -250,8 +234,7 @@
|
||||
</div>
|
||||
|
||||
<div class="button-group">
|
||||
<button type="button" class="btn btn-signin" onclick="handleLogin()">Login</button>
|
||||
<button type="button" class="btn btn-signup" onclick="goToSignUp()">Sign Up</button>
|
||||
<button type="button" class="btn btn-signin" onclick="goToSignUp()">Sign Up</button>
|
||||
</div>
|
||||
|
||||
<div class="success-message" id="mainMessage"></div>
|
||||
@ -298,38 +281,6 @@
|
||||
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
|
||||
document.getElementById('signupForm').addEventListener('submit', function(e) {
|
||||
e.preventDefault();
|
||||
@ -351,5 +302,4 @@
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Loading…
x
Reference in New Issue
Block a user