-
Notifications
You must be signed in to change notification settings - Fork 193
Expand file tree
/
Copy pathindex.html
More file actions
232 lines (203 loc) · 6.44 KB
/
index.html
File metadata and controls
232 lines (203 loc) · 6.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Signup</title>
<link rel="stylesheet" href="assets/css/style.css">
<style>
:root {
/* Dynamic Theme Colors */
--accent-primary: #667eea;
--accent-secondary: #764ba2;
--accent-light: rgba(102, 126, 234, 0.1);
--accent-hover: rgba(102, 126, 234, 0.8);
/* Dynamic Background Colors */
--bg-primary: #667eea;
--bg-secondary: #764ba2;
--bg-tertiary: #8b9dc3;
--bg-gradient: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-tertiary) 100%);
}
/* Theme Variations */
[data-theme="blue"] {
--accent-primary: #667eea;
--accent-secondary: #764ba2;
--accent-light: rgba(102, 126, 234, 0.1);
--accent-hover: rgba(102, 126, 234, 0.8);
--bg-primary: #667eea;
--bg-secondary: #764ba2;
--bg-tertiary: #8b9dc3;
--bg-gradient: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-tertiary) 100%);
}
[data-theme="purple"] {
--accent-primary: #a855f7;
--accent-secondary: #7c3aed;
--accent-light: rgba(168, 85, 247, 0.1);
--accent-hover: rgba(168, 85, 247, 0.8);
--bg-primary: #a855f7;
--bg-secondary: #7c3aed;
--bg-tertiary: #c084fc;
--bg-gradient: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-tertiary) 100%);
}
[data-theme="green"] {
--accent-primary: #10b981;
--accent-secondary: #059669;
--accent-light: rgba(16, 185, 129, 0.1);
--accent-hover: rgba(16, 185, 129, 0.8);
--bg-primary: #10b981;
--bg-secondary: #059669;
--bg-tertiary: #34d399;
--bg-gradient: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-tertiary) 100%);
}
[data-theme="orange"] {
--accent-primary: #f59e0b;
--accent-secondary: #d97706;
--accent-light: rgba(245, 158, 11, 0.1);
--accent-hover: rgba(245, 158, 11, 0.8);
--bg-primary: #f59e0b;
--bg-secondary: #d97706;
--bg-tertiary: #fbbf24;
--bg-gradient: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-tertiary) 100%);
}
[data-theme="pink"] {
--accent-primary: #ec4899;
--accent-secondary: #db2777;
--accent-light: rgba(236, 72, 153, 0.1);
--accent-hover: rgba(236, 72, 153, 0.8);
--bg-primary: #ec4899;
--bg-secondary: #db2777;
--bg-tertiary: #f472b6;
--bg-gradient: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-tertiary) 100%);
}
[data-theme="teal"] {
--accent-primary: #14b8a6;
--accent-secondary: #0d9488;
--accent-light: rgba(20, 184, 166, 0.1);
--accent-hover: rgba(20, 184, 166, 0.8);
--bg-primary: #14b8a6;
--bg-secondary: #0d9488;
--bg-tertiary: #2dd4bf;
--bg-gradient: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-tertiary) 100%);
}
body {
font-family: "Montserrat", sans-serif;
background: var(--bg-gradient);
background-attachment: fixed;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
transition: background 0.5s ease;
}
.signup-container {
background: #fff;
padding: 2.5rem;
border-radius: 15px;
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
width: 350px;
text-align: center;
animation: fadeIn 0.8s ease;
}
.signup-container h2 {
margin-bottom: 1.5rem;
color: #333;
font-weight: 700;
}
label {
display: block;
margin: 10px 0 5px;
text-align: left;
font-size: 0.9rem;
font-weight: 600;
color: #444;
}
input {
width: 100%;
padding: 10px 12px;
margin-bottom: 15px;
border: 1px solid #ddd;
border-radius: 8px;
font-size: 1rem;
outline: none;
transition: 0.2s;
}
input:focus {
border-color: var(--accent-secondary);
box-shadow: 0 0 5px var(--accent-light);
}
button {
width: 100%;
padding: 12px;
border: none;
background: linear-gradient(135deg, var(--accent-secondary) 0%, var(--accent-primary) 100%);
color: #fff;
border-radius: 8px;
font-size: 1rem;
font-weight: bold;
cursor: pointer;
transition: background 0.3s ease;
}
button:hover {
opacity: 0.9;
}
p {
margin-top: 1rem;
font-size: 0.9rem;
color: #555;
}
p a {
color: var(--accent-primary);
text-decoration: none;
font-weight: 600;
}
p a:hover {
text-decoration: underline;
}
@keyframes fadeIn {
from {opacity: 0; transform: translateY(-10px);}
to {opacity: 1; transform: translateY(0);}
}
</style>
</head>
<body>
<div class="signup-container">
<h2>Create Account</h2>
<form id="signupForm">
<label for="username">Username</label>
<input type="text" id="username" placeholder="Enter your username" required />
<label for="password">Password</label>
<input type="password" id="password" placeholder="Enter your password" required />
<button type="submit">Sign Up</button>
</form>
<p>Already have an account? <a href="login.html">Login here</a></p>
</div>
<script>
document.getElementById("signupForm").addEventListener("submit", function(e) {
e.preventDefault();
const username = document.getElementById("username").value.trim();
const password = document.getElementById("password").value.trim();
if (!username || !password) {
alert("Please enter both username and password");
return;
}
let users = JSON.parse(localStorage.getItem("users") || "{}");
if (users[username]) {
alert("Username already exists. Please choose another one.");
return;
}
users[username] = {
password: password,
tasks: []
};
localStorage.setItem("users", JSON.stringify(users));
alert("Signup successful! Redirecting to login...");
window.location.href = "login.html";
});
// Load saved theme on page load
document.addEventListener('DOMContentLoaded', function() {
const savedTheme = localStorage.getItem('selectedTheme') || 'blue';
document.documentElement.setAttribute('data-theme', savedTheme);
});
</script>
</body>
</html>