Krydev32 commited on
Commit
d2e555d
·
verified ·
1 Parent(s): c1a5f4d

the header is not okay, it's not done or aesthetic.

Browse files

As for the log-in/register, make a clickable button for it to appear or re-direct. Don't add it on the landing page.

Also make the log-in/register work

Files changed (8) hide show
  1. README.md +7 -4
  2. components/footer.js +126 -0
  3. components/header.js +101 -0
  4. index.html +77 -19
  5. login.html +127 -0
  6. register.html +177 -0
  7. script.js +32 -0
  8. style.css +26 -19
README.md CHANGED
@@ -1,10 +1,13 @@
1
  ---
2
- title: Pixelpass Portal
3
- emoji: 📈
4
  colorFrom: green
5
- colorTo: indigo
 
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
1
  ---
2
+ title: PixelPass Portal 🚪
 
3
  colorFrom: green
4
+ colorTo: red
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).
components/footer.js ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class CustomFooter extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ :host {
7
+ display: block;
8
+ width: 100%;
9
+ background-color: #111827;
10
+ color: #f3f4f6;
11
+ }
12
+ .footer-container {
13
+ max-width: 1200px;
14
+ margin: 0 auto;
15
+ padding: 4rem 2rem 2rem;
16
+ display: grid;
17
+ grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
18
+ gap: 2rem;
19
+ }
20
+ .footer-logo {
21
+ font-size: 1.5rem;
22
+ font-weight: 700;
23
+ color: white;
24
+ margin-bottom: 1rem;
25
+ display: block;
26
+ }
27
+ .footer-description {
28
+ color: #9ca3af;
29
+ margin-bottom: 2rem;
30
+ max-width: 300px;
31
+ }
32
+ .footer-links h3 {
33
+ font-size: 1.125rem;
34
+ font-weight: 600;
35
+ margin-bottom: 1.5rem;
36
+ }
37
+ .footer-links ul {
38
+ list-style: none;
39
+ padding: 0;
40
+ margin: 0;
41
+ }
42
+ .footer-links li {
43
+ margin-bottom: 0.75rem;
44
+ }
45
+ .footer-links a {
46
+ color: #9ca3af;
47
+ text-decoration: none;
48
+ transition: color 0.2s;
49
+ }
50
+ .footer-links a:hover {
51
+ color: white;
52
+ }
53
+ .social-links {
54
+ display: flex;
55
+ gap: 1rem;
56
+ margin-top: 1rem;
57
+ }
58
+ .social-link {
59
+ width: 40px;
60
+ height: 40px;
61
+ border-radius: 50%;
62
+ background-color: #1f2937;
63
+ display: flex;
64
+ align-items: center;
65
+ justify-content: center;
66
+ transition: background-color 0.2s;
67
+ }
68
+ .social-link:hover {
69
+ background-color: #4b5563;
70
+ }
71
+ .copyright {
72
+ text-align: center;
73
+ padding: 2rem 0;
74
+ border-top: 1px solid #374151;
75
+ color: #9ca3af;
76
+ font-size: 0.875rem;
77
+ }
78
+ </style>
79
+ <div class="footer-container">
80
+ <div class="footer-about">
81
+ <a href="/" class="footer-logo">PixelPass</a>
82
+ <p class="footer-description">Secure authentication solutions for modern businesses and individuals.</p>
83
+ <div class="social-links">
84
+ <a href="#" class="social-link"><i data-feather="twitter"></i></a>
85
+ <a href="#" class="social-link"><i data-feather="facebook"></i></a>
86
+ <a href="#" class="social-link"><i data-feather="instagram"></i></a>
87
+ <a href="#" class="social-link"><i data-feather="linkedin"></i></a>
88
+ </div>
89
+ </div>
90
+ <div class="footer-links">
91
+ <h3>Product</h3>
92
+ <ul>
93
+ <li><a href="/features">Features</a></li>
94
+ <li><a href="/pricing">Pricing</a></li>
95
+ <li><a href="/api">API</a></li>
96
+ <li><a href="/integrations">Integrations</a></li>
97
+ </ul>
98
+ </div>
99
+ <div class="footer-links">
100
+ <h3>Company</h3>
101
+ <ul>
102
+ <li><a href="/about">About</a></li>
103
+ <li><a href="/careers">Careers</a></li>
104
+ <li><a href="/blog">Blog</a></li>
105
+ <li><a href="/press">Press</a></li>
106
+ </ul>
107
+ </div>
108
+ <div class="footer-links">
109
+ <h3>Resources</h3>
110
+ <ul>
111
+ <li><a href="/documentation">Documentation</a></li>
112
+ <li><a href="/support">Support</a></li>
113
+ <li><a href="/community">Community</a></li>
114
+ <li><a href="/status">Status</a></li>
115
+ </ul>
116
+ </div>
117
+ </div>
118
+ <div class="copyright">
119
+ &copy; ${new Date().getFullYear()} PixelPass Portal. All rights reserved.
120
+ </div>
121
+ <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
122
+ `;
123
+ }
124
+ }
125
+
126
+ customElements.define('custom-footer', CustomFooter);
components/header.js ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class CustomHeader extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ :host {
7
+ display: block;
8
+ width: 100%;
9
+ }
10
+ nav {
11
+ background-color: white;
12
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
13
+ }
14
+ .nav-container {
15
+ max-width: 1200px;
16
+ margin: 0 auto;
17
+ padding: 1rem 2rem;
18
+ display: flex;
19
+ justify-content: space-between;
20
+ align-items: center;
21
+ }
22
+ .logo {
23
+ font-size: 1.5rem;
24
+ font-weight: 700;
25
+ color: #6366f1;
26
+ text-decoration: none;
27
+ }
28
+ .nav-links {
29
+ display: flex;
30
+ gap: 2rem;
31
+ align-items: center;
32
+ }
33
+ .nav-link {
34
+ color: #4b5563;
35
+ text-decoration: none;
36
+ font-weight: 500;
37
+ transition: color 0.2s;
38
+ }
39
+ .nav-link:hover {
40
+ color: #6366f1;
41
+ }
42
+ .auth-buttons {
43
+ display: flex;
44
+ gap: 1rem;
45
+ }
46
+ .login-btn {
47
+ padding: 0.5rem 1.5rem;
48
+ border-radius: 0.375rem;
49
+ font-weight: 500;
50
+ transition: all 0.2s;
51
+ }
52
+ .signup-btn {
53
+ padding: 0.5rem 1.5rem;
54
+ border-radius: 0.375rem;
55
+ font-weight: 500;
56
+ transition: all 0.2s;
57
+ background-color: #6366f1;
58
+ color: white;
59
+ }
60
+ .signup-btn:hover {
61
+ background-color: #4f46e5;
62
+ }
63
+ .mobile-menu-btn {
64
+ display: none;
65
+ background: none;
66
+ border: none;
67
+ cursor: pointer;
68
+ }
69
+ @media (max-width: 768px) {
70
+ .nav-links, .auth-buttons {
71
+ display: none;
72
+ }
73
+ .mobile-menu-btn {
74
+ display: block;
75
+ }
76
+ }
77
+ </style>
78
+ <nav>
79
+ <div class="nav-container">
80
+ <a href="/" class="logo">PixelPass</a>
81
+ <div class="nav-links">
82
+ <a href="/features" class="nav-link">Features</a>
83
+ <a href="/pricing" class="nav-link">Pricing</a>
84
+ <a href="/about" class="nav-link">About</a>
85
+ <a href="/contact" class="nav-link">Contact</a>
86
+ </div>
87
+ <div class="auth-buttons">
88
+ <a href="/login" class="login-btn">Log In</a>
89
+ <a href="/register" class="signup-btn">Sign Up</a>
90
+ </div>
91
+ <button class="mobile-menu-btn">
92
+ <i data-feather="menu"></i>
93
+ </button>
94
+ </div>
95
+ </nav>
96
+ <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
97
+ `;
98
+ }
99
+ }
100
+
101
+ customElements.define('custom-header', CustomHeader);
index.html CHANGED
@@ -1,19 +1,77 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>PixelPass Portal</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: '#6366f1',
17
+ secondary: '#a855f7',
18
+ }
19
+ }
20
+ }
21
+ }
22
+ </script>
23
+ </head>
24
+ <body class="bg-gray-50 min-h-screen">
25
+ <custom-header></custom-header>
26
+
27
+ <main class="container mx-auto px-4 py-12">
28
+ <section class="hero-section bg-gradient-to-r from-primary-500 to-secondary-500 rounded-2xl p-8 text-white">
29
+ <div class="max-w-3xl mx-auto text-center">
30
+ <h1 class="text-4xl md:text-5xl font-bold mb-6">Welcome to PixelPass Portal</h1>
31
+ <p class="text-xl mb-8">Your gateway to seamless digital experiences</p>
32
+ <div class="flex flex-wrap justify-center gap-4">
33
+ <a href="/login" class="bg-white text-primary-600 px-8 py-3 rounded-full font-semibold hover:bg-gray-100 transition-all">Log In</a>
34
+ <a href="/register" class="border-2 border-white text-white px-8 py-3 rounded-full font-semibold hover:bg-white hover:bg-opacity-10 transition-all">Register</a>
35
+ </div>
36
+ </div>
37
+ </section>
38
+
39
+ <section class="features-section mt-16">
40
+ <h2 class="text-3xl font-bold text-center mb-12">Why Choose PixelPass?</h2>
41
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
42
+ <div class="feature-card bg-white p-6 rounded-xl shadow-md hover:shadow-lg transition-all">
43
+ <div class="w-14 h-14 bg-primary-100 rounded-full flex items-center justify-center mb-4">
44
+ <i data-feather="lock" class="text-primary-600"></i>
45
+ </div>
46
+ <h3 class="text-xl font-semibold mb-2">Secure Authentication</h3>
47
+ <p class="text-gray-600">Military-grade encryption protects your data at all times</p>
48
+ </div>
49
+ <div class="feature-card bg-white p-6 rounded-xl shadow-md hover:shadow-lg transition-all">
50
+ <div class="w-14 h-14 bg-primary-100 rounded-full flex items-center justify-center mb-4">
51
+ <i data-feather="zap" class="text-primary-600"></i>
52
+ </div>
53
+ <h3 class="text-xl font-semibold mb-2">Lightning Fast</h3>
54
+ <p class="text-gray-600">Experience blazing fast login and registration processes</p>
55
+ </div>
56
+ <div class="feature-card bg-white p-6 rounded-xl shadow-md hover:shadow-lg transition-all">
57
+ <div class="w-14 h-14 bg-primary-100 rounded-full flex items-center justify-center mb-4">
58
+ <i data-feather="smartphone" class="text-primary-600"></i>
59
+ </div>
60
+ <h3 class="text-xl font-semibold mb-2">Mobile Friendly</h3>
61
+ <p class="text-gray-600">Optimized for all devices from desktop to mobile</p>
62
+ </div>
63
+ </div>
64
+ </section>
65
+ </main>
66
+
67
+ <custom-footer></custom-footer>
68
+
69
+ <script src="components/header.js"></script>
70
+ <script src="components/footer.js"></script>
71
+ <script src="script.js"></script>
72
+ <script>
73
+ feather.replace();
74
+ </script>
75
+ <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
76
+ </body>
77
+ </html>
login.html ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Login | PixelPass Portal</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: '#6366f1',
17
+ secondary: '#a855f7',
18
+ }
19
+ }
20
+ }
21
+ }
22
+ </script>
23
+ </head>
24
+ <body class="bg-gray-50 min-h-screen">
25
+ <custom-header></custom-header>
26
+
27
+ <main class="container mx-auto px-4 py-12 flex items-center justify-center">
28
+ <div class="w-full max-w-md bg-white rounded-xl shadow-md overflow-hidden p-8">
29
+ <div class="text-center mb-8">
30
+ <h1 class="text-3xl font-bold text-gray-900">Welcome back</h1>
31
+ <p class="text-gray-600 mt-2">Log in to your PixelPass account</p>
32
+ </div>
33
+
34
+ <form id="loginForm" class="space-y-6">
35
+ <div>
36
+ <label for="email" class="block text-sm font-medium text-gray-700 mb-1">Email</label>
37
+ <input type="email" id="email" name="email" required
38
+ class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-primary-500 transition-all">
39
+ </div>
40
+
41
+ <div>
42
+ <div class="flex justify-between items-center mb-1">
43
+ <label for="password" class="block text-sm font-medium text-gray-700">Password</label>
44
+ <a href="/forgot-password" class="text-sm text-primary-600 hover:text-primary-500">Forgot password?</a>
45
+ </div>
46
+ <input type="password" id="password" name="password" required
47
+ class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-primary-500 transition-all">
48
+ </div>
49
+
50
+ <div class="flex items-center">
51
+ <input id="remember-me" name="remember-me" type="checkbox"
52
+ class="h-4 w-4 text-primary-600 focus:ring-primary-500 border-gray-300 rounded">
53
+ <label for="remember-me" class="ml-2 block text-sm text-gray-700">Remember me</label>
54
+ </div>
55
+
56
+ <button type="submit"
57
+ class="w-full bg-primary-600 hover:bg-primary-700 text-white font-medium py-3 px-4 rounded-lg transition-all flex items-center justify-center">
58
+ <span id="loginBtnText">Log In</span>
59
+ <div id="loginSpinner" class="ml-2 hidden">
60
+ <div class="animate-spin rounded-full h-5 w-5 border-b-2 border-white"></div>
61
+ </div>
62
+ </button>
63
+ </form>
64
+
65
+ <div class="mt-6 text-center">
66
+ <p class="text-gray-600">Don't have an account? <a href="/register" class="text-primary-600 hover:text-primary-500 font-medium">Sign up</a></p>
67
+ </div>
68
+
69
+ <div class="relative mt-8">
70
+ <div class="absolute inset-0 flex items-center">
71
+ <div class="w-full border-t border-gray-300"></div>
72
+ </div>
73
+ <div class="relative flex justify-center text-sm">
74
+ <span class="px-2 bg-white text-gray-500">Or continue with</span>
75
+ </div>
76
+ </div>
77
+
78
+ <div class="mt-6 grid grid-cols-2 gap-3">
79
+ <a href="#" class="w-full inline-flex justify-center py-2 px-4 border border-gray-300 rounded-lg bg-white text-sm font-medium text-gray-700 hover:bg-gray-50">
80
+ <i data-feather="github" class="h-5 w-5"></i>
81
+ </a>
82
+ <a href="#" class="w-full inline-flex justify-center py-2 px-4 border border-gray-300 rounded-lg bg-white text-sm font-medium text-gray-700 hover:bg-gray-50">
83
+ <i data-feather="google" class="h-5 w-5"></i>
84
+ </a>
85
+ </div>
86
+ </div>
87
+ </main>
88
+
89
+ <custom-footer></custom-footer>
90
+
91
+ <script src="components/header.js"></script>
92
+ <script src="components/footer.js"></script>
93
+ <script src="script.js"></script>
94
+ <script>
95
+ feather.replace();
96
+
97
+ document.getElementById('loginForm').addEventListener('submit', async function(e) {
98
+ e.preventDefault();
99
+
100
+ const email = document.getElementById('email').value;
101
+ const password = document.getElementById('password').value;
102
+
103
+ // Show loading state
104
+ document.getElementById('loginBtnText').textContent = 'Logging in...';
105
+ document.getElementById('loginSpinner').classList.remove('hidden');
106
+
107
+ // Simulate API call
108
+ try {
109
+ const result = await simulateLogin(email, password);
110
+
111
+ if (result.success) {
112
+ // Redirect to dashboard on success
113
+ window.location.href = '/dashboard';
114
+ } else {
115
+ alert('Invalid email or password');
116
+ }
117
+ } catch (error) {
118
+ alert('Login failed. Please try again.');
119
+ } finally {
120
+ // Reset button state
121
+ document.getElementById('loginBtnText').textContent = 'Log In';
122
+ document.getElementById('loginSpinner').classList.add('hidden');
123
+ }
124
+ });
125
+ </script>
126
+ </body>
127
+ </html>
register.html ADDED
@@ -0,0 +1,177 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Register | PixelPass Portal</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: '#6366f1',
17
+ secondary: '#a855f7',
18
+ }
19
+ }
20
+ }
21
+ }
22
+ </script>
23
+ </head>
24
+ <body class="bg-gray-50 min-h-screen">
25
+ <custom-header></custom-header>
26
+
27
+ <main class="container mx-auto px-4 py-12 flex items-center justify-center">
28
+ <div class="w-full max-w-md bg-white rounded-xl shadow-md overflow-hidden p-8">
29
+ <div class="text-center mb-8">
30
+ <h1 class="text-3xl font-bold text-gray-900">Create your account</h1>
31
+ <p class="text-gray-600 mt-2">Join the PixelPass community</p>
32
+ </div>
33
+
34
+ <form id="registerForm" class="space-y-6">
35
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
36
+ <div>
37
+ <label for="firstName" class="block text-sm font-medium text-gray-700 mb-1">First Name</label>
38
+ <input type="text" id="firstName" name="firstName" required
39
+ class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-primary-500 transition-all">
40
+ </div>
41
+ <div>
42
+ <label for="lastName" class="block text-sm font-medium text-gray-700 mb-1">Last Name</label>
43
+ <input type="text" id="lastName" name="lastName" required
44
+ class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-primary-500 transition-all">
45
+ </div>
46
+ </div>
47
+
48
+ <div>
49
+ <label for="email" class="block text-sm font-medium text-gray-700 mb-1">Email</label>
50
+ <input type="email" id="email" name="email" required
51
+ class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-primary-500 transition-all">
52
+ </div>
53
+
54
+ <div>
55
+ <label for="password" class="block text-sm font-medium text-gray-700 mb-1">Password</label>
56
+ <input type="password" id="password" name="password" required
57
+ class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-primary-500 transition-all">
58
+ <p class="mt-1 text-xs text-gray-500">Must be at least 8 characters</p>
59
+ </div>
60
+
61
+ <div>
62
+ <label for="confirmPassword" class="block text-sm font-medium text-gray-700 mb-1">Confirm Password</label>
63
+ <input type="password" id="confirmPassword" name="confirmPassword" required
64
+ class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-primary-500 transition-all">
65
+ </div>
66
+
67
+ <div class="flex items-start">
68
+ <div class="flex items-center h-5">
69
+ <input id="terms" name="terms" type="checkbox" required
70
+ class="h-4 w-4 text-primary-600 focus:ring-primary-500 border-gray-300 rounded">
71
+ </div>
72
+ <div class="ml-3 text-sm">
73
+ <label for="terms" class="text-gray-700">I agree to the <a href="/terms" class="text-primary-600 hover:text-primary-500">Terms of Service</a> and <a href="/privacy" class="text-primary-600 hover:text-primary-500">Privacy Policy</a></label>
74
+ </div>
75
+ </div>
76
+
77
+ <button type="submit"
78
+ class="w-full bg-primary-600 hover:bg-primary-700 text-white font-medium py-3 px-4 rounded-lg transition-all flex items-center justify-center">
79
+ <span id="registerBtnText">Create Account</span>
80
+ <div id="registerSpinner" class="ml-2 hidden">
81
+ <div class="animate-spin rounded-full h-5 w-5 border-b-2 border-white"></div>
82
+ </div>
83
+ </button>
84
+ </form>
85
+
86
+ <div class="mt-6 text-center">
87
+ <p class="text-gray-600">Already have an account? <a href="/login" class="text-primary-600 hover:text-primary-500 font-medium">Log in</a></p>
88
+ </div>
89
+
90
+ <div class="relative mt-8">
91
+ <div class="absolute inset-0 flex items-center">
92
+ <div class="w-full border-t border-gray-300"></div>
93
+ </div>
94
+ <div class="relative flex justify-center text-sm">
95
+ <span class="px-2 bg-white text-gray-500">Or sign up with</span>
96
+ </div>
97
+ </div>
98
+
99
+ <div class="mt-6 grid grid-cols-2 gap-3">
100
+ <a href="#" class="w-full inline-flex justify-center py-2 px-4 border border-gray-300 rounded-lg bg-white text-sm font-medium text-gray-700 hover:bg-gray-50">
101
+ <i data-feather="github" class="h-5 w-5"></i>
102
+ </a>
103
+ <a href="#" class="w-full inline-flex justify-center py-2 px-4 border border-gray-300 rounded-lg bg-white text-sm font-medium text-gray-700 hover:bg-gray-50">
104
+ <i data-feather="google" class="h-5 w-5"></i>
105
+ </a>
106
+ </div>
107
+ </div>
108
+ </main>
109
+
110
+ <custom-footer></custom-footer>
111
+
112
+ <script src="components/header.js"></script>
113
+ <script src="components/footer.js"></script>
114
+ <script src="script.js"></script>
115
+ <script>
116
+ feather.replace();
117
+
118
+ document.getElementById('registerForm').addEventListener('submit', async function(e) {
119
+ e.preventDefault();
120
+
121
+ const firstName = document.getElementById('firstName').value;
122
+ const lastName = document.getElementById('lastName').value;
123
+ const email = document.getElementById('email').value;
124
+ const password = document.getElementById('password').value;
125
+ const confirmPassword = document.getElementById('confirmPassword').value;
126
+
127
+ // Validate password match
128
+ if (password !== confirmPassword) {
129
+ alert('Passwords do not match');
130
+ return;
131
+ }
132
+
133
+ // Validate password length
134
+ if (password.length < 8) {
135
+ alert('Password must be at least 8 characters');
136
+ return;
137
+ }
138
+
139
+ // Validate email format
140
+ if (!validateEmail(email)) {
141
+ alert('Please enter a valid email address');
142
+ return;
143
+ }
144
+
145
+ // Show loading state
146
+ document.getElementById('registerBtnText').textContent = 'Creating account...';
147
+ document.getElementById('registerSpinner').classList.remove('hidden');
148
+
149
+ // Prepare user data
150
+ const userData = {
151
+ firstName,
152
+ lastName,
153
+ email,
154
+ password
155
+ };
156
+
157
+ // Simulate API call
158
+ try {
159
+ const result = await simulateRegister(userData);
160
+
161
+ if (result.success) {
162
+ // Redirect to success page
163
+ window.location.href = '/register-success';
164
+ } else {
165
+ alert('Registration failed. Please try again.');
166
+ }
167
+ } catch (error) {
168
+ alert('An error occurred during registration. Please try again.');
169
+ } finally {
170
+ // Reset button state
171
+ document.getElementById('registerBtnText').textContent = 'Create Account';
172
+ document.getElementById('registerSpinner').classList.add('hidden');
173
+ }
174
+ });
175
+ </script>
176
+ </body>
177
+ </html>
script.js ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Auth simulation functions
2
+ function simulateLogin(email, password) {
3
+ return new Promise((resolve) => {
4
+ setTimeout(() => {
5
+ resolve({ success: true, token: 'simulated-jwt-token' });
6
+ }, 1000);
7
+ });
8
+ }
9
+
10
+ function simulateRegister(userData) {
11
+ return new Promise((resolve) => {
12
+ setTimeout(() => {
13
+ resolve({ success: true, user: userData });
14
+ }, 1500);
15
+ });
16
+ }
17
+
18
+ // Form validation helper
19
+ function validateEmail(email) {
20
+ const re = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
21
+ return re.test(email);
22
+ }
23
+
24
+ function validatePassword(password) {
25
+ return password.length >= 8;
26
+ }
27
+
28
+ // Theme toggle (for future implementation)
29
+ function toggleTheme() {
30
+ document.documentElement.classList.toggle('dark');
31
+ localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light');
32
+ }
style.css CHANGED
@@ -1,28 +1,35 @@
1
- body {
2
- padding: 2rem;
3
- font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
 
4
  }
5
 
6
- h1 {
7
- font-size: 16px;
8
- margin-top: 0;
9
  }
10
 
11
- p {
12
- color: rgb(107, 114, 128);
13
- font-size: 15px;
14
- margin-bottom: 10px;
15
- margin-top: 5px;
16
  }
17
 
18
- .card {
19
- max-width: 620px;
20
- margin: 0 auto;
21
- padding: 16px;
22
- border: 1px solid lightgray;
23
- border-radius: 16px;
24
  }
25
 
26
- .card p:last-child {
27
- margin-bottom: 0;
 
28
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Custom animations */
2
+ @keyframes fadeIn {
3
+ from { opacity: 0; }
4
+ to { opacity: 1; }
5
  }
6
 
7
+ .hero-section {
8
+ animation: fadeIn 0.8s ease-out forwards;
 
9
  }
10
 
11
+ .feature-card {
12
+ transition: transform 0.3s ease, box-shadow 0.3s ease;
 
 
 
13
  }
14
 
15
+ .feature-card:hover {
16
+ transform: translateY(-5px);
 
 
 
 
17
  }
18
 
19
+ /* Custom scrollbar */
20
+ ::-webkit-scrollbar {
21
+ width: 8px;
22
  }
23
+
24
+ ::-webkit-scrollbar-track {
25
+ background: #f1f1f1;
26
+ }
27
+
28
+ ::-webkit-scrollbar-thumb {
29
+ background: #a855f7;
30
+ border-radius: 4px;
31
+ }
32
+
33
+ ::-webkit-scrollbar-thumb:hover {
34
+ background: #7e22ce;
35
+ }