forked from talarekl/DogDays-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
239 lines (218 loc) · 7.17 KB
/
Copy pathindex.html
File metadata and controls
239 lines (218 loc) · 7.17 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
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="font.css">
<link rel="stylesheet" href="Buttons.css">
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="font.css">
<link rel="stylesheet" href="Buttons.css">
<meta charset="utf-8" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<script src="https://cdn.firebase.com/libs/firebaseui/3.5.2/firebaseui.js"></script>
<link type="text/css" rel="stylesheet" href="https://cdn.firebase.com/libs/firebaseui/3.5.2/firebaseui.css" />
<title>Dog Days</title>
</head>
<script src= "Password-valid.js">
</script>
<style>
body {font-family: Arial, Helvetica, sans-serif;}
/* The Modal (background) */
.modal {
display: none; /* Hidden by default */
position: fixed; /* Stay in place */
z-index: 1; /* Sit on top */
padding-top: 100px; /* Location of the box */
left: 0;
top: 0;
width: 100%; /* Full width */
height: 100%; /* Full height */
overflow: auto; /* Enable scroll if needed */
}
/* Modal Content */
.modal-content {
background-color: #ece8e8;
margin: auto;
padding: 15px;
border: 3px solid rgb(124, 124, 124);
border-radius: 5px;
width: 85%;
line-height: 30pt;
}
/* The Close Button */
.close {
color: #aaaaaa;
float: right;
font-size: 50px;
font-weight: bold;
}
.close:hover,
.close:focus {
color: #000;
text-decoration: none;
cursor: pointer;
}
</style>
</head>
<body >
<div class=border>
<h1>Dog Days</h1>
<p>Live in the Dog Days Today!</p>
<p>
<img src="Dog Days Logo.png" width="406" height="301">
</p>
<!-- Trigger/Open The Modal -->
<p>
<button id="signupbtn">Sign-up</button>
</p>
<!-- The Modal -->
<div id="signupModal" class="modal">
<!-- Modal content -->
<div class="modal-content">
<span class="close">×</span>
<h4>Sign-up</h4>
<form id="Signup-form" action="main.html" method="post">
<div class="input">
<p>
<label for="signup-fname">First Name:</label>
<input type="text" id="signup-fname" title="Enter your First Name" required/>
</p>
</div>
<div class="input">
<p>
<label for="signup-surname">Last Name:</label>
<input type="text" id="signup-surname" title="Enter your Last Name" required />
</p>
</div>
<div class="input">
<p>
<label for="signup-email">Email Address:</label>
<input type="email" id="signup-email" title="Enter your Email Address. Must contain '@' symbol"required />
</p>
</div>
<div class="input">
<p>
<label for="signup-password">Enter password:</label>
<input type="password" id="signup-password" pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}" title="Must contain at least one number and one uppercase and lowercase letter, and at least 8 or more characters"
required/>
</p>
</div>
<div class="input">
<p>
<label for="signup-DOB">Enter Date of Birth:</label>
<input type="date" id="signup-DOB" title="Enter your Date of Birth (Must be 18+)"required />
</p>
</div>
<div class="input">
<p>
<label for="signup-image">Profile Image:</label>
<input type="file" id="signup-image" accept="image/*" title="Upload a Profile Image"required />
</p>
</div>
<div class="clearfix">
<p>
<button type="submit" class="signupbtn">Sign-Up</button>
</p>
</div>
</form>
</div>
</div>
<p>
<button id="loginbtn">Log-in</button>
</p>
<div id="loginModal" class="modal">
<div class="modal-content">
<span class="close">×</span>
<h4>Log-in</h4>
<form id="Login-form" method="post">
<div class="input">
<p>
<label for="login-email">Email Address:</label>
<input type="email" id="login-email" title="Enter your Email Address" required />
</p>
</div>
<div class="input">
<p>
<label for="login-password">Password:</label>
<input type="password" id="login-password" pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}" title="Must contain at least one number and one uppercase and lowercase letter, and at least 8 or more characters" required />
</p>
</div>
<div class="clearfix">
<p>
<button type="submit" class="loginbtn">Log-in</button>
</p>
</div>
</form>
</div>
</div>
</p>
<p>
<a>
<button id="signoutbtn" type="button">Sign-out</button>
</a>
</p>
<p>
<a>
<button type="button" onclick="location.href='main.html'">Home</button>
</a>
</p>
<script>
// Get the modal
var smodal = document.getElementById("signupModal");
var lmodal = document.getElementById("loginModal");
// Get the button that opens the modal
var sbtn = document.getElementById("signupbtn");
var lbtn = document.getElementById("loginbtn");
// Get the <span> element that closes the modal
var sspan = document.getElementsByClassName("close")[0];
var lspan = document.getElementsByClassName("close")[1];
// When the user clicks the button, open the modal
sbtn.onclick = function() {
smodal.style.display = "block";
}
lbtn.onclick = function() {
lmodal.style.display = "block";
}
// When the user clicks on <span> (x), close the modal
sspan.onclick = function() {
smodal.style.display = "none";
}
lspan.onclick = function() {
lmodal.style.display = "none";
}
</script>
</div>
<!-- The core Firebase JS SDK is always required and must be listed first -->
<script src="https://www.gstatic.com/firebasejs/8.6.0/firebase-app.js"></script>
<!-- TODO: Add SDKs for Firebase products that you want to use
https://firebase.google.com/docs/web/setup#available-libraries -->
<script src="https://www.gstatic.com/firebasejs/8.6.0/firebase-auth.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.6.0/firebase-firestore.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.6.0/firebase-analytics.js"></script>
<script>
// Your web app's Firebase configuration
// For Firebase JS SDK v7.20.0 and later, measurementId is optional
var firebaseConfig = {
apiKey: "AIzaSyAzjL9l25mAmgOqy1PuNhNkQAhFGEGkUEA",
authDomain: "dog-days-51554.firebaseapp.com",
databaseURL: "https://dog-days-51554-default-rtdb.firebaseio.com",
projectId: "dog-days-51554",
storageBucket: "dog-days-51554.appspot.com",
messagingSenderId: "223722049182",
appId: "1:223722049182:web:3b421b741498663a88758f",
measurementId: "G-QYD9PCSK45"
};
// Initialize Firebase
firebase.initializeApp(firebaseConfig);
firebase.analytics();
//auth and firestore references
const auth = firebase.auth();
//update database
database.settings({ timestampsInSnapshots: true });
</script>
<script type="text/javascript" src="auth.js" charset="utf-8"></script>
<script src = index.js></script>
<script src = database.js></script>
</body>
</html>