-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpasswordBar.html
119 lines (101 loc) · 2.1 KB
/
passwordBar.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
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
<html>
<head>
<style>
#passwordStrength
{
height:15px;
display:block;
float:left;
}
.strength0
{
width:250px;
background:#cccccc;
}
.strength1
{
width:50px;
background:#ff0000;
}
.strength2
{
width:100px;
background:#ff5f5f;
}
.strength3
{
width:150px;
background:#56e500;
}
.strength4
{
background:#4dcd00;
width:200px;
}
.strength5
{
background:#399800;
width:250px;
}
#temp {
height: 10px; /* Can be anything */
width: 250px;
background: #555;
-moz-border-radius: 25px;
-webkit-border-radius: 25px;
border-radius: 25px;
padding: 10px;
box-shadow: inset 0 -1px 1px rgba(255,255,255,0.3);
}
#bar {
display: block;
height: 10px;
border-top-right-radius: 8px;
border-bottom-right-radius: 8px;
border-top-left-radius: 20px;
border-bottom-left-radius: 20px;
background-color: rgb(43,194,83);
background-image: linear-gradient(
center bottom,
rgb(43,194,83) 37%,
rgb(84,240,84) 69%
);
box-shadow:
inset 0 2px 9px rgba(255,255,255,0.3),
inset 0 -2px 6px rgba(0,0,0,0.4);
position: relative;
overflow: hidden;
}
.orange > span {
background-color: #f1a165;
background-image: linear-gradient(to bottom, #f1a165, #f36d0a);
}
.red > span {
background-color: #FF0000;
background-image: linear-gradient(to bottom, #ff0000, #f36d0a);
}
</style>
</style>
</head>
<h4> Select an image you would like to upload.</h4>
<form id="uploadbanner" enctype="multipart/form-data" method="post" action="upload.php">
<input id="fileToUpload" name="fileToUpload" type="file" />
<input type="submit" value="Upload" id="submit" />
</form>
<img src="../pga/herokuTest/web/uploadedImages/animal.jpg" alt="HTML5 Icon" style="width:320px;height:250px">
<p></p>
<div id="temp" class="meter">
<span id="bar" style="width: 20%"></span>
</div>
<label for="temp" style="font-family:sans-serif">Weak password! </label>
<script>
password = 25;
if (password > 20) {
document.getElementById("temp").className = "meter red";
document.getElementById("bar").style.width = "30%";
}
else {
document.getElementById("passwordStrength").className = "strength" + 2;
}
</script>
</html>