-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
412 lines (361 loc) · 15.6 KB
/
index.html
File metadata and controls
412 lines (361 loc) · 15.6 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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Generate secure passwords with custom policies and AI assistance">
<title>SecurePass Studio - Password Generator</title>
<!-- Google Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
<!-- Styles -->
<link rel="stylesheet" href="styles/main.css">
<!-- EmailJS SDK -->
<script src="https://cdn.jsdelivr.net/npm/@emailjs/browser@4/dist/email.min.js"></script>
</head>
<body>
<!-- Animated Background Orbs -->
<div class="orb orb-1"></div>
<div class="orb orb-2"></div>
<div class="orb orb-3"></div>
<!-- Navigation Bar -->
<nav class="navbar">
<div class="nav-content">
<a href="#" class="logo">
<svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<rect x="3" y="11" width="18" height="11" rx="2" />
<path d="M7 11V7a5 5 0 0 1 10 0v4" />
</svg>
<span>SecurePass</span>
</a>
<div class="nav-links">
<a href="#features">Features</a>
<a href="#game">Mini Game</a>
<a href="#generator">Generator</a>
<button id="themeBtn" class="theme-btn" title="Toggle theme">🌙</button>
</div>
</div>
</nav>
<main>
<!-- Hero Section -->
<section id="hero" class="hero">
<div class="hero-content">
<h1><span class="highlight">SecurePass</span> Studio</h1>
<p class="tagline">Generate bulletproof passwords with custom policies, strength analysis, and AI assistance.
</p>
<div class="hero-buttons">
<a href="#generator" class="btn primary">🔐 Generate Password</a>
<a href="#game" class="btn secondary">🎮 Play Mini Game</a>
</div>
</div>
</section>
<!-- Features Section -->
<section id="features" class="features">
<div class="container">
<h2>Why <span class="highlight">SecurePass</span>?</h2>
<p class="section-desc">Everything you need to create and manage secure passwords</p>
<div class="feature-grid">
<div class="feature-card">
<div class="feature-icon">🛡️</div>
<h3>Policy Controls</h3>
<p>Set length, uppercase, lowercase, digits, and symbols requirements.</p>
</div>
<div class="feature-card">
<div class="feature-icon">📊</div>
<h3>Strength Meter</h3>
<p>Visual strength bar with entropy calculation in bits.</p>
</div>
<div class="feature-card">
<div class="feature-icon">🤖</div>
<h3>AI Assistant</h3>
<p>Describe what you need and let AI generate a custom password.</p>
</div>
<div class="feature-card">
<div class="feature-icon">📜</div>
<h3>History & Undo</h3>
<p>All passwords saved locally with search, sort, and undo support.</p>
</div>
<div class="feature-card">
<div class="feature-icon">📱</div>
<h3>Responsive</h3>
<p>Works great on desktop, tablet, and mobile devices.</p>
</div>
<div class="feature-card">
<div class="feature-icon">⌨️</div>
<h3>Keyboard Shortcuts</h3>
<p>Press G to generate, C to copy, T to toggle theme.</p>
</div>
</div>
</div>
</section>
<!-- Mini Game Section -->
<section id="game" class="game-section">
<div class="container">
<h2>Password <span class="highlight">Challenge</span></h2>
<p class="section-desc">Test your typing speed with our mini game!</p>
<div class="game-layout">
<div class="game-box">
<!-- Score Display -->
<div class="game-stats">
<div class="stat">
<span class="stat-label">Score</span>
<span id="gameScore" class="stat-value">0</span>
</div>
<div class="stat">
<span class="stat-label">Level</span>
<span id="gameLevel" class="stat-value">1</span>
</div>
<div class="stat">
<span class="stat-label">Time</span>
<span id="gameTimer" class="stat-value">10</span>
</div>
</div>
<!-- Game Area -->
<p id="gameInstruction" class="game-instruction">Type the password as fast as you can!</p>
<div id="gamePassword" class="game-password">Press Start to Play</div>
<input type="text" id="gameInput" class="game-input" placeholder="Type here..." disabled autocomplete="off">
<p id="gameFeedback" class="game-feedback"></p>
<!-- Game Buttons -->
<div class="game-buttons">
<button id="gameStartBtn" class="btn primary">▶ Start Game</button>
<button id="gameRestartBtn" class="btn secondary" disabled>🔄 Restart</button>
</div>
<p class="high-score">🏆 High Score: <span id="gameHighScore">0</span></p>
</div>
<!-- Game Tips -->
<div class="game-tips">
<h4>How to Play</h4>
<ul>
<li>A random password appears on screen</li>
<li>Type it exactly before time runs out</li>
<li>Score increases with each correct password</li>
<li>Passwords get longer as you level up!</li>
</ul>
</div>
</div>
</div>
</section>
<!-- Password Generator Section -->
<section id="generator" class="generator-section">
<div class="container">
<h2>Generate Your <span class="highlight">Password</span></h2>
<p class="section-desc">Customize your password with powerful policy controls</p>
<div class="generator-grid">
<!-- Left Column: Controls -->
<div class="generator-controls">
<!-- Policy Card -->
<div class="card">
<h3>🛡️ Policy Controls</h3>
<form id="policyForm">
<div class="form-row">
<label>
Length
<input type="number" id="length" min="4" max="128" value="16">
</label>
<label>
Min Uppercase
<input type="number" id="minUpper" min="0" max="64" value="1">
</label>
<label>
Min Lowercase
<input type="number" id="minLower" min="0" max="64" value="1">
</label>
<label>
Min Digits
<input type="number" id="minDigits" min="0" max="64" value="1">
</label>
<label>
Min Symbols
<input type="number" id="minSymbols" min="0" max="64" value="1">
</label>
</div>
<div class="checkbox-row">
<label class="checkbox">
<input type="checkbox" id="avoidSimilar" checked>
<span>Avoid similar chars (I, l, 1, 0, O)</span>
</label>
<label class="checkbox">
<input type="checkbox" id="noRepeating">
<span>No repeating characters</span>
</label>
</div>
<p id="policyError" class="error-msg"></p>
<div class="button-row">
<button type="button" id="generateBtn" class="btn primary">🔑 Generate</button>
<button type="button" id="copyBtn" class="btn secondary" disabled>📋 Copy</button>
<button type="button" id="loadExampleBtn" class="btn ghost">Load Example</button>
</div>
</form>
</div>
<!-- AI Card -->
<div class="card ai-card">
<h3>🤖 AI Password Generator <span class="badge">Gemini</span></h3>
<textarea id="aiPrompt"
placeholder="Describe the password you want... e.g., 'A strong password for my bank account'"
rows="3"></textarea>
<p class="hint">Press Enter to generate, Shift+Enter for new line</p>
<p id="aiError" class="error-msg"></p>
<button type="button" id="aiGenerateBtn" class="btn ai-btn">
<span class="btn-text">✨ Generate with AI</span>
<span class="spinner hidden"></span>
</button>
</div>
</div>
<!-- Right Column: Results -->
<div class="generator-results">
<!-- Result Card -->
<div class="card">
<h3>✅ Generated Password</h3>
<div class="password-output">
<output id="passwordOutput" class="password-display">—</output>
<button type="button" id="toggleVisibility" class="icon-btn" title="Toggle visibility">👁️</button>
</div>
<!-- Strength Meter -->
<div class="strength-meter">
<div class="strength-bar">
<div id="strengthSegment1" class="segment"></div>
<div id="strengthSegment2" class="segment"></div>
<div id="strengthSegment3" class="segment"></div>
<div id="strengthSegment4" class="segment"></div>
<div id="strengthSegment5" class="segment"></div>
</div>
<div class="strength-labels">
<span id="entropyDisplay">Entropy: — bits</span>
<span id="strengthLabel">Strength: —</span>
</div>
</div>
</div>
<!-- History Card -->
<div class="card">
<div class="card-header">
<h3>📜 Password History</h3>
<button type="button" id="clearHistoryBtn" class="btn ghost small">Clear All</button>
</div>
<div class="history-controls">
<input type="search" id="historySearch" placeholder="🔍 Search history...">
<select id="historySort">
<option value="newest">Newest First</option>
<option value="oldest">Oldest First</option>
<option value="strongest">Strongest First</option>
<option value="weakest">Weakest First</option>
<option value="longest">Longest First</option>
<option value="shortest">Shortest First</option>
</select>
</div>
<div id="historyList" class="history-list">
<div class="history-empty">
<p>📝 No passwords generated yet</p>
</div>
</div>
<div id="pagination" class="pagination hidden">
<button type="button" id="prevPage" class="btn ghost small" disabled>← Prev</button>
<span id="pageInfo">Page 1 of 1</span>
<button type="button" id="nextPage" class="btn ghost small" disabled>Next →</button>
</div>
</div>
</div>
</div>
</div>
</section>
</main>
<!-- Footer -->
<footer class="footer">
<div class="container">
<div class="footer-content">
<div class="footer-brand">
<span class="logo-text">🔐 SecurePass Studio</span>
<p>Generate bulletproof passwords with ease.</p>
</div>
<div class="footer-links">
<a href="#">About</a>
<a href="#">Privacy</a>
<a href="#" id="contactBtn">Contact</a>
<a href="https://github.com/hharshhsaini" target="_blank">GitHub</a>
</div>
<p class="copyright">© SecurePass Studio. Built by Harsh Saini</p>
</div>
</div>
</footer>
<!-- Toast Notifications -->
<div id="toastContainer" class="toast-container"></div>
<!-- Help Modal -->
<dialog id="helpModal" class="modal">
<div class="modal-box">
<div class="modal-header">
<h3>⌨️ Keyboard Shortcuts</h3>
<button type="button" class="modal-close">✕</button>
</div>
<div class="modal-body">
<ul class="shortcuts">
<li><kbd>G</kbd> Generate password</li>
<li><kbd>C</kbd> Copy password</li>
<li><kbd>T</kbd> Toggle theme</li>
<li><kbd>H</kbd> Toggle visibility</li>
<li><kbd>/</kbd> Focus search</li>
<li><kbd>?</kbd> Show help</li>
<li><kbd>Esc</kbd> Close modal</li>
</ul>
</div>
</div>
</dialog>
<!-- Contact Modal -->
<dialog id="contactModal" class="modal contact-modal">
<div class="modal-box">
<div class="modal-header">
<h3>📬 Get in Touch</h3>
<button type="button" class="modal-close" onclick="document.getElementById('contactModal').close()">✕</button>
</div>
<div class="modal-body">
<p class="contact-intro">Have a question, feedback, or just want to say hi? Fill out the form below!</p>
<form id="contactForm" class="contact-form">
<div class="form-group">
<label for="contactName">Your Name *</label>
<input type="text" id="contactName" name="name" placeholder="John Doe" required>
</div>
<div class="form-group">
<label for="contactEmail">Your Email *</label>
<input type="email" id="contactEmail" name="email" placeholder="john@example.com" required>
</div>
<div class="form-group">
<label for="contactSubject">Subject *</label>
<select id="contactSubject" name="subject" required>
<option value="">Select a topic...</option>
<option value="General Inquiry">General Inquiry</option>
<option value="Bug Report">Bug Report</option>
<option value="Feature Request">Feature Request</option>
<option value="Feedback">Feedback</option>
<option value="Collaboration">Collaboration</option>
<option value="Other">Other</option>
</select>
</div>
<div class="form-group">
<label for="contactMessage">Message *</label>
<textarea id="contactMessage" name="message" placeholder="Write your message here..." rows="4"
required></textarea>
</div>
<div class="form-group checkbox-group">
<label class="checkbox">
<input type="checkbox" id="contactNewsletter" name="newsletter" value="yes">
<span>Keep me updated about new features</span>
</label>
</div>
<button type="submit" class="btn primary contact-submit">
<span class="btn-text">📤 Send Message</span>
<span class="spinner hidden"></span>
</button>
</form>
<div id="contactSuccess" class="contact-success hidden">
<div class="success-icon">✅</div>
<h4>Message Sent!</h4>
<p>Thanks for reaching out! I'll get back to you as soon as possible.</p>
<button type="button" class="btn secondary"
onclick="document.getElementById('contactModal').close()">Close</button>
</div>
</div>
</div>
</dialog>
<!-- Scripts -->
<script type="module" src="js/main.js"></script>
</body>
</html>