Spaces:
Running
Running
create cool login page
Browse files
README.md
CHANGED
|
@@ -1,10 +1,13 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: AuthFlow Groove 🎵
|
| 3 |
+
colorFrom: purple
|
| 4 |
+
colorTo: purple
|
| 5 |
+
emoji: 🐳
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite-v3
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# Welcome to your new DeepSite project!
|
| 13 |
+
This project was created with [DeepSite](https://huggingface.co/deepsite).
|
index.html
CHANGED
|
@@ -1,19 +1,112 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en" class="h-full">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>AuthFlow Groove | Login</title>
|
| 7 |
+
<link rel="stylesheet" href="style.css">
|
| 8 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
+
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
| 10 |
+
<script src="https://unpkg.com/feather-icons"></script>
|
| 11 |
+
<script>
|
| 12 |
+
tailwind.config = {
|
| 13 |
+
theme: {
|
| 14 |
+
extend: {
|
| 15 |
+
colors: {
|
| 16 |
+
primary: {
|
| 17 |
+
50: '#f0f9ff',
|
| 18 |
+
100: '#e0f2fe',
|
| 19 |
+
500: '#3b82f6',
|
| 20 |
+
700: '#1d4ed8',
|
| 21 |
+
},
|
| 22 |
+
secondary: {
|
| 23 |
+
50: '#f0fdf4',
|
| 24 |
+
100: '#dcfce7',
|
| 25 |
+
500: '#22c55e',
|
| 26 |
+
700: '#15803d',
|
| 27 |
+
}
|
| 28 |
+
}
|
| 29 |
+
}
|
| 30 |
+
}
|
| 31 |
+
}
|
| 32 |
+
</script>
|
| 33 |
+
</head>
|
| 34 |
+
<body class="min-h-full bg-gradient-to-br from-primary-50 to-secondary-50 flex items-center justify-center p-4">
|
| 35 |
+
<main class="w-full max-w-md">
|
| 36 |
+
<div class="bg-white rounded-2xl shadow-xl overflow-hidden">
|
| 37 |
+
<!-- Auth Header -->
|
| 38 |
+
<div class="bg-gradient-to-r from-primary-500 to-secondary-500 p-8 text-center">
|
| 39 |
+
<i data-feather="lock" class="w-12 h-12 mx-auto text-white"></i>
|
| 40 |
+
<h1 class="text-2xl font-bold text-white mt-4">Welcome Back</h1>
|
| 41 |
+
<p class="text-primary-100 mt-2">Sign in to your account</p>
|
| 42 |
+
</div>
|
| 43 |
+
|
| 44 |
+
<!-- Auth Form -->
|
| 45 |
+
<form class="p-8 space-y-6">
|
| 46 |
+
<div class="space-y-4">
|
| 47 |
+
<div class="relative">
|
| 48 |
+
<i data-feather="mail" class="absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400"></i>
|
| 49 |
+
<input
|
| 50 |
+
type="email"
|
| 51 |
+
placeholder="Email Address"
|
| 52 |
+
class="w-full pl-10 pr-4 py-3 rounded-lg border border-gray-200 focus:border-primary-500 focus:ring-2 focus:ring-primary-100 outline-none transition"
|
| 53 |
+
required
|
| 54 |
+
>
|
| 55 |
+
</div>
|
| 56 |
+
<div class="relative">
|
| 57 |
+
<i data-feather="key" class="absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400"></i>
|
| 58 |
+
<input
|
| 59 |
+
type="password"
|
| 60 |
+
placeholder="Password"
|
| 61 |
+
class="w-full pl-10 pr-4 py-3 rounded-lg border border-gray-200 focus:border-primary-500 focus:ring-2 focus:ring-primary-100 outline-none transition"
|
| 62 |
+
required
|
| 63 |
+
>
|
| 64 |
+
</div>
|
| 65 |
+
</div>
|
| 66 |
+
|
| 67 |
+
<div class="flex items-center justify-between">
|
| 68 |
+
<label class="flex items-center">
|
| 69 |
+
<input type="checkbox" class="rounded text-primary-500 focus:ring-primary-500">
|
| 70 |
+
<span class="ml-2 text-sm text-gray-600">Remember me</span>
|
| 71 |
+
</label>
|
| 72 |
+
<a href="#" class="text-sm text-primary-500 hover:text-primary-700">Forgot password?</a>
|
| 73 |
+
</div>
|
| 74 |
+
|
| 75 |
+
<button
|
| 76 |
+
type="submit"
|
| 77 |
+
class="w-full bg-gradient-to-r from-primary-500 to-secondary-500 text-white py-3 px-4 rounded-lg font-medium hover:from-primary-600 hover:to-secondary-600 transition-all shadow-md hover:shadow-lg"
|
| 78 |
+
>
|
| 79 |
+
Sign In
|
| 80 |
+
</button>
|
| 81 |
+
</form>
|
| 82 |
+
|
| 83 |
+
<!-- Auth Footer -->
|
| 84 |
+
<div class="px-8 py-6 bg-gray-50 text-center border-t border-gray-100">
|
| 85 |
+
<p class="text-gray-600">Don't have an account?
|
| 86 |
+
<a href="#" class="text-primary-500 font-medium hover:text-primary-700">Sign up</a>
|
| 87 |
+
</p>
|
| 88 |
+
</div>
|
| 89 |
+
</div>
|
| 90 |
+
|
| 91 |
+
<!-- Social Login -->
|
| 92 |
+
<div class="mt-6 text-center">
|
| 93 |
+
<p class="text-gray-500 mb-4">Or continue with</p>
|
| 94 |
+
<div class="flex justify-center space-x-4">
|
| 95 |
+
<button class="w-12 h-12 rounded-full bg-white shadow-md flex items-center justify-center hover:shadow-lg transition">
|
| 96 |
+
<i data-feather="github" class="text-gray-700"></i>
|
| 97 |
+
</button>
|
| 98 |
+
<button class="w-12 h-12 rounded-full bg-white shadow-md flex items-center justify-center hover:shadow-lg transition">
|
| 99 |
+
<i data-feather="twitter" class="text-blue-400"></i>
|
| 100 |
+
</button>
|
| 101 |
+
<button class="w-12 h-12 rounded-full bg-white shadow-md flex items-center justify-center hover:shadow-lg transition">
|
| 102 |
+
<i data-feather="facebook" class="text-blue-600"></i>
|
| 103 |
+
</button>
|
| 104 |
+
</div>
|
| 105 |
+
</div>
|
| 106 |
+
</main>
|
| 107 |
+
|
| 108 |
+
<script>feather.replace();</script>
|
| 109 |
+
<script src="script.js"></script>
|
| 110 |
+
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
|
| 111 |
+
</body>
|
| 112 |
+
</html>
|
script.js
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 2 |
+
// Form submission handler
|
| 3 |
+
const loginForm = document.querySelector('form');
|
| 4 |
+
if (loginForm) {
|
| 5 |
+
loginForm.addEventListener('submit', function(e) {
|
| 6 |
+
e.preventDefault();
|
| 7 |
+
|
| 8 |
+
// Get form values
|
| 9 |
+
const email = this.querySelector('input[type="email"]').value;
|
| 10 |
+
const password = this.querySelector('input[type="password"]').value;
|
| 11 |
+
|
| 12 |
+
// Simple validation
|
| 13 |
+
if (!email || !password) {
|
| 14 |
+
alert('Please fill in all fields');
|
| 15 |
+
return;
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
// In a real app, you would send this to your backend
|
| 19 |
+
console.log('Login attempt with:', { email, password });
|
| 20 |
+
|
| 21 |
+
// Show loading state
|
| 22 |
+
const submitBtn = this.querySelector('button[type="submit"]');
|
| 23 |
+
const originalBtnText = submitBtn.innerHTML;
|
| 24 |
+
submitBtn.innerHTML = `
|
| 25 |
+
<svg class="animate-spin -ml-1 mr-3 h-5 w-5 text-white inline-block" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
|
| 26 |
+
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
|
| 27 |
+
<path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
|
| 28 |
+
</svg>
|
| 29 |
+
Signing in...
|
| 30 |
+
`;
|
| 31 |
+
submitBtn.disabled = true;
|
| 32 |
+
|
| 33 |
+
// Simulate API call
|
| 34 |
+
setTimeout(() => {
|
| 35 |
+
submitBtn.innerHTML = originalBtnText;
|
| 36 |
+
submitBtn.disabled = false;
|
| 37 |
+
|
| 38 |
+
// For demo purposes, just show a success message
|
| 39 |
+
alert('Login successful! (This is a demo)');
|
| 40 |
+
}, 2000);
|
| 41 |
+
});
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
// Social login button handlers
|
| 45 |
+
document.querySelectorAll('.social-login button').forEach(btn => {
|
| 46 |
+
btn.addEventListener('click', function() {
|
| 47 |
+
const platform = this.querySelector('i').getAttribute('data-feather');
|
| 48 |
+
alert(`Sign in with ${platform.charAt(0).toUpperCase() + platform.slice(1)} clicked`);
|
| 49 |
+
});
|
| 50 |
+
});
|
| 51 |
+
});
|
style.css
CHANGED
|
@@ -1,28 +1,34 @@
|
|
|
|
|
|
|
|
| 1 |
body {
|
| 2 |
-
|
| 3 |
-
font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
|
| 4 |
}
|
| 5 |
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
|
|
|
| 9 |
}
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
margin-bottom: 10px;
|
| 15 |
-
margin-top: 5px;
|
| 16 |
}
|
| 17 |
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
border-radius: 16px;
|
| 24 |
}
|
| 25 |
|
| 26 |
-
|
| 27 |
-
|
| 28 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
|
| 2 |
+
|
| 3 |
body {
|
| 4 |
+
font-family: 'Inter', system-ui, -apple-system, sans-serif;
|
|
|
|
| 5 |
}
|
| 6 |
|
| 7 |
+
/* Custom focus styles */
|
| 8 |
+
input:focus, button:focus {
|
| 9 |
+
outline: 2px solid transparent;
|
| 10 |
+
outline-offset: 2px;
|
| 11 |
}
|
| 12 |
|
| 13 |
+
/* Animation for form inputs */
|
| 14 |
+
input {
|
| 15 |
+
transition: all 0.2s ease;
|
|
|
|
|
|
|
| 16 |
}
|
| 17 |
|
| 18 |
+
/* Pulse animation for the submit button */
|
| 19 |
+
@keyframes pulse {
|
| 20 |
+
0% { transform: scale(1); }
|
| 21 |
+
50% { transform: scale(1.02); }
|
| 22 |
+
100% { transform: scale(1); }
|
|
|
|
| 23 |
}
|
| 24 |
|
| 25 |
+
button[type="submit"]:hover {
|
| 26 |
+
animation: pulse 1.5s infinite;
|
| 27 |
}
|
| 28 |
+
|
| 29 |
+
/* Responsive adjustments */
|
| 30 |
+
@media (max-width: 640px) {
|
| 31 |
+
.auth-container {
|
| 32 |
+
border-radius: 0;
|
| 33 |
+
}
|
| 34 |
+
}
|