-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
61 lines (59 loc) · 2.3 KB
/
index.html
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
<script src="https://cdn.jsdelivr.net/npm/handlebars@latest/dist/handlebars.js"></script>
<script>
// compile the template
var template = Handlebars.compile("Handlebars <b>{{doesWhat}}</b>");
// execute the compiled template and print the output to the console
console.log(template({ doesWhat: "rocks!" }));
</script>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script src="script.js" defer></script>
<link rel="stylesheet" href="style.css" />
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link
href="https://fonts.googleapis.com/css2?family=Red+Rose:wght@300;400;500&family=Work+Sans:ital,wght@0,100;0,200;0,400;0,500;0,600;0,700;1,100;1,300;1,400;1,500;1,600&display=swap"
rel="stylesheet"
/>
<title class="title">Password Generator</title>
</head>
<body>
<div class="container">
<h1>Password Generator</h1>
<h2 class="password-display" id="passwordDisplay">password</h2>
<form class="form" id="passwordGeneratorForm">
<label for="characterCountNumber">Number of characters</label>
<!-- User is prompted for length of password. User selects length of password using slider or arrow, offering input validation. -->
<div class="character-count-container">
<!-- Length must be at least 8 and no more than 128 characters -->
<input
type="range"
min="8"
max="128"
value="8"
id="characterCountRange"
/>
<input
class="number-input"
type="number"
min="8"
max="128"
id="characterCountNumber"
value="8"
/>
<!-- Prompts for password critera include lowercase letters, uppercase letters, numbers, and special characters. User selects which criteria to include in password.-->
</div>
<label for="">Include uppercase?</label>
<input type="checkbox" id="includeUppercase" />
<label for="">Include numbers?</label>
<input type="checkbox" id="includeNumbers" />
<label for="">Include special characters?</label>
<input type="checkbox" id="includeSpecial" />
<!-- When all prompts are answered, the password is written to the page. Window height expands for longer passwords-->
<button class="button" type="submit">Generate password</button>
</form>
</div>
</body>
</html>