-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfrontend.html
More file actions
242 lines (202 loc) · 6.47 KB
/
frontend.html
File metadata and controls
242 lines (202 loc) · 6.47 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
<!DOCTYPE html>
<html lang = "en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Directory Log In</title>
<style>
body{font family: Ariel, Times New Roman, sans-serif;}
/* input fields */
input[type=text], input[type-password]
{
width: 100%;
padding: 12px 20px;
margin: 8px 0;
display: inline-block;
border: 1px solid #ccc;
box-sizing: border-box;
}
/* button styling */
button
{
background-color: #4CAF50;
color: white;
padding: 14px 20px;
margin: 8px 0;
border: none;
cursor: pointer;
width: 100%;
}
button:hover
{
opacity: 0.8;
}
/* Extra styles for the cancel button */
.cancelbtn
{
width: auto;
padding: 10px 18px;
background-color: #f44336;
}
/* Center the image and position the close button */
.imgcontainer
{
text-align: center;
margin: 24px 0 12px 0;
position: relative;
}
.container
{
padding: 10px;
}
span.logHyperlink
{
float: right;
padding-top: 16px;
padding-right: 8px;
}
/* The Directory Log In (dlogin) pre-login button (background) */
.dLogin
{
display: none; /* Hidden by default */
position: fixed; /* Stay in place */
z-index: 1; /* Sit on top */
left: 0;
top: 0;
width: 100%; /* Full width */
height: 100%; /* Full height */
overflow: auto; /* Enable scroll if needed */
background-color: rgb(0,0,0); /* Fallback color */
background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
padding-top: 60px;
}
/* dLogin Content/Box */
.dLogin-content
{
background-color: #fefefe;
margin: 11% auto 15% auto; /* 11% from the top, 15% from the bottom and centered */
border: 3px solid #135;
width: 25%; /* adjust this to change to size of text box that pops up */
}
/* The Close Button (x) */
.close
{
position: absolute;
right: 15px;
top: -20px;
color: #000;
font-size: 35px;
font-weight: bold;
}
.close:hover,
.close:focus
{
color: red;
cursor: pointer;
}
/* Add Zoom Animation */
.animate
{
-webkit-animation: animatezoom 0.8s;
animation: animatezoom 0.8s
}
@-webkit-keyframes animatezoom
{
from {-webkit-transform: scale(0)}
to {-webkit-transform: scale(1)}
}
@keyframes animatezoom
{
from {transform: scale(0)}
to {transform: scale(1)}
}
/* Change styles for span and cancel button on extra small screens */
@media screen and (max-width: 300px)
{
span.psw
{
display: block;
float: none;
}
.cancelbtn
{
width: 100%;
}
}
</style>
</head>
<body>
<h1> Directory Log In</h1>
<button onclick = "document.getElementById('id01').style.display='block'" style="width:auto;">Login</button>
<h1> Sign up </h1>
<button onclick = "document.getElementById('id02').style.display='block'" style="width:auto;">Register</button>
<div id="id01" class="dLogin">
<form class="dLogin-content animate" action="mysuperscript.php" autocomplete="off">
<p>
<div class="imgcontainer">
<span onclick="document.getElementById('id01').style.display='none'" class="close" title="Close dLogin">×</span>
</div>
<div class="container">
<input placeholder="Username" id="Username" required><br>
<input placeholder="Password" id="Password" required><br>
<input type="checkbox" name="loginkeeping" id="loginkeeping" value="loginkeeping" />
<label for="loginkeeping">Keep me logged in</label><br>
<button onclick = "login()" >Login </button>
</div>
<div class="container" style="background-color:#f1f1f1">
<button type="button" onclick="document.getElementById('id01').style.display='none'" class="cancelbtn">Cancel</button>
<span class="logHyperlink">Not a member? <a href="#">Sign Up</a></span>
</div>
</p>
</form>
</div>
<div id="contacts"></div>
<div id="id02" class="dLogin">
<form class="dLogin-content animate" action="mysuperscript.php" autocomplete="off">
<p>
<div class="imgcontainer">
<span onclick="document.getElementById('id02').style.display='none'" class="close" title="Close dLogin">×</span>
</div>
<div class="container">
<input placeholder="New Username" id="Username" required type="username"><br>
<input placeholder="New Password" id="Password" name="passwordsignup" required type="password"><br>
<input placeholder="Re-enter New Password" id="Password_confirm" name="passwordsignup_confirm" required type="password"><br>
</div>
<p class="signin button">
<button onclick = "login()" >Register </button>
</p>
<div class="container" style="background-color:#f1f1f1">
<button type="button" onclick="document.getElementById('id02').style.display='none'" class="cancelbtn">Cancel</button>
<span class="logHyperlink">Already a member? <a href="#">Log in</a></span>
</div>
</p>
</form>
</div>
<script>
var contacts=[];
function add(){
var Username= document.getElementById("Username or email").value;
var Password= document.getElementById("Password").value;
var newContact= {
newUsername: Username,
newPassword: Password
}
contacts.push(newContact);
updateDiv();
document.getElementById("Username").value="";
document.getElementById("Password").value="";
}
function updateDiv(){
var tempContent="";
for(var i = 0, i < contacts.length; i++)
{
tempContent += "<p>Name : " + contacts[i].newName+
"<br>Password:" + contacts[i].newPassword + "<br><span onclick='del("+ i +")'>[del]</span></p>";
}
document.getElementById("contacts").innerHTML= tempContent;
}
function del(i){
contacts.splice(i,1);
}
</script>
</body>
</html>