-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
216 lines (205 loc) · 7.67 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Firebase Auth</title>
<!-- Font Aewsome -->
<link
rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"
/>
<!-- Compiled and minified Materialize CSS -->
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css"
/>
<link
href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet"
/>
<link rel="stylesheet" href="/static/css/style.css" />
</head>
<body>
<!-- Wrapper -->
<div class="wrapper">
<!-- Navbar -->
<nav class="amber darken-4">
<div class="nav-wrapper">
<div class="container">
<a href="#" class="brand-logo">Firebase Auth</a>
<a href="#" data-target="mobile-demo" class="sidenav-trigger"
><i class="material-icons">menu</i></a
>
<ul class="right hide-on-med-and-down">
<li class="logged-in">
<a class="modal-trigger" data-target="modal-account" href="#"
><span class="material-icons"> account_circle </span>My
Account</a
>
</li>
<li class="admin">
<a class="modal-trigger" data-target="modal-create" href="#"
><span class="material-icons"> create </span>Create Prompt</a
>
</li>
<li class="logged-in">
<a class="modal-trigger" id="logout" data-target="logout" href="#"
><span class="material-icons"> exit_to_app </span>Logout</a
>
</li>
<li class="logged-out">
<a class="modal-trigger" data-target="modal-login" href="#"
><span class="material-icons"> login </span>Login</a
>
</li>
<li class="logged-out">
<a class="modal-trigger" data-target="modal-signup" href="#"
><span class="material-icons"> create </span>Sign Up</a
>
</li>
</ul>
</div>
</div>
</nav>
<!-- Admin control -->
<form class="container center-align admin-actions admin">
<input type="email" placeholder="user email" id="admin-email" required />
<button class="btn-small yellow darken-2">Make Admin</button>
</form>
<ul class="sidenav" id="mobile-demo">
<li class="logged-in">
<a class="modal-trigger" data-target="modal-account" href="#"
>My
Account</a
>
</li>
<li class="logged-in">
<a class="modal-trigger" data-target="modal-create" href="#"
>Create Prompt</a
>
</li>
<li class="logged-in">
<a class="modal-trigger" id="logout" data-target="logout" href="#"
>Logout</a
>
</li>
<li class="logged-out">
<a class="modal-trigger" data-target="modal-login" href="#"
>Login</a
>
</li>
<li class="logged-out">
<a class="modal-trigger" data-target="modal-signup" href="#"
>Sign Up</a
>
</li>
</ul>
<!-- Sign up modal -->
<div id="modal-signup" class="modal">
<div class="modal-content">
<h4>Sign Up</h4>
</div>
<form id="signup-form">
<div class="input-field">
<input type="email" id="signup-email" required></input>
<label for="signup-email">Email</label>
</div>
<div class="input-field">
<input type="password" id="signup-password" required></input>
<label for="signup-password">Password</label>
</div>
<div class="input-field">
<input type="text" id="signup-bio" required></input>
<label for="signup-bio">Bio</label>
</div>
<button class="btn amber amber lighten-1">Sign Up</button>
<p class="error center-align orange-text"></p>
</form>
</div>
<!-- Login modal -->
<div id="modal-login" class="modal">
<div class="modal-content">
<h4>Login</h4>
</div>
<form id="login-form">
<div class="input-field">
<input type="email" id="login-email" required />
<label for="login-email">Email</label>
</div>
<div class="input-field">
<input type="password" id="login-password" required />
<label for="login-password">Password</label>
</div>
<button class="btn amber amber lighten-1">Login</button>
<p class="error center-align orange-text"></p>
</form>
</div>
<!-- Account modal -->
<div id="modal-account" class="modal">
<div class="modal-content">
<h4>Account Details</h4>
</div>
<div class="account-details"></div>
</div>
<!-- Create writing prompt modal -->
<div id="modal-create" class="modal">
<div class="modal-content">
<h4>Create Writing Prompt</h4>
</div>
<form id="create-form">
<div class="input-field">
<input type="text" id="title" required />
<label for="title">Prompt Title</label>
</div>
<div class="input-field">
<textarea id="content" class="materialize-textarea"></textarea>
<label for="content">Create Prompt</label>
</div>
<button class="btn amber amber lighten-1">Sign Up</button>
</form>
</div>
<!-- Prompt List -->
<div class="container prompt-container">
<ul class="collapsible prompts">
</ul>
</div>
</div>
<!-- Firebase -->
<!-- The core Firebase JS SDK is always required and must be listed first -->
<script src="https://www.gstatic.com/firebasejs/7.15.3/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/7.15.3/firebase-auth.js"></script>
<script src="https://www.gstatic.com/firebasejs/7.15.3/firebase-firestore.js"></script>
<script src="https://www.gstatic.com/firebasejs/7.15.3/firebase-analytics.js"></script>
<script src="https://www.gstatic.com/firebasejs/7.15.3/firebase-functions.js"></script>
<script>
// Your web app's Firebase configuration
// All keys and id's public consuming no need to hide
var firebaseConfig = {
apiKey: 'AIzaSyAoMd6BL4iBOJ6-XNnphsv_j_RtTCk1jHo',
authDomain: 'fir-auth-98141.firebaseapp.com',
databaseURL: 'https://fir-auth-98141.firebaseio.com',
projectId: 'fir-auth-98141',
appId: '1:96599976606:web:79024af0ec1b889604698f',
measurementId: 'G-7QBLRJN4ES',
};
// Initialize Firebase References
firebase.initializeApp(firebaseConfig);
firebase.analytics();
const auth = firebase.auth();
const db = firebase.firestore();
const functions = firebase.functions();
</script>
<!-- Jquery -->
<script
src="https://code.jquery.com/jquery-3.5.1.js"
integrity="sha256-QWo7LDvxbWT2tbbQ97B53yJnYU3WhH/C8ycbRAkjPDc="
crossorigin="anonymous"
></script>
<!-- Compiled and minified JavaScript -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
<script src="/static/js/materialize.js"></script>
<script src="/static/js/auth.js"></script>
<script src="/static/js/index.js"></script>
</body>
</html>