-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
157 lines (141 loc) · 5.62 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
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<!-- Compiled and minified CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
<title>GameGuidez</title>
</head>
<body class="grey lighten-3"">
<!-- NAVBAR -->
<nav class="z-depth-0 grey lighten-4">
<div class="nav-wrapper container">
<a href="#" class="brand-logo">
<img src="img/logo.svg" style="width: 180px; margin-top: 10px;">
</a>
<ul id="nav-mobile" class="right hide-on-med-and-down">
<li class="logged-in" style="display:none">
<a href="#" class="grey-text modal-trigger" data-target="modal-account">Account</a>
</li>
<li class="logged-in" style="display:none">
<a href="#" class="grey-text" id="logout">Logout</a>
</li>
<li class="admin" style="display:none">
<a href="#" class="grey-text modal-trigger" data-target="modal-create">Create Guide</a>
</li>
<li class="logged-out" style="display:none">
<a href="#" class="grey-text modal-trigger" data-target="modal-login">Login</a>
</li>
<li class="logged-out" style="display:none">
<a href="#" class="grey-text modal-trigger" data-target="modal-signup">Sign up</a>
</li>
</span>
</ul>
</div>
</nav>
<!-- ADMIN ACTIONS -->
<form class="center-align admin-actions admin" style="display:none;margin: 40px auto; max-width: 300px;">
<input type="email" placeholder="User email" id="admin-email" required />
<button class="btn-small yellow darken-2 z-depth-0">Make admin</button>
</form>
<!-- SIGN UP MODAL -->
<div id="modal-signup" class="modal">
<div class="modal-content">
<h4>Sign up</h4><br />
<form id="signup-form">
<div class="input-field">
<input type="email" id="signup-email" required />
<label for="signup-email">Email address</label>
</div>
<div class="input-field">
<input type="password" id="signup-password" required />
<label for="signup-password">Choose password</label>
</div>
<div class="input-field">
<input type="text" id="signup-bio" required />
<label for="signup-bio">One Line Bio</label>
</div>
<button class="btn yellow darken-2 z-depth-0">Sign up</button>
<p class="error pink-text center-align"></p>
</form>
</div>
</div>
<!-- LOGIN MODAL -->
<div id="modal-login" class="modal">
<div class="modal-content">
<h4>Login</h4><br />
<form id="login-form">
<div class="input-field">
<input type="email" id="login-email" required />
<label for="login-email">Email address</label>
</div>
<div class="input-field">
<input type="password" id="login-password" required />
<label for="login-password">Your password</label>
</div>
<button class="btn yellow darken-2 z-depth-0">Login</button>
<p class="error pink-text center-align"></p>
</form>
</div>
</div>
<!-- ACCOUNT MODAL -->
<div id="modal-account" class="modal">
<div class="modal-content center-align">
<h4>Account details</h4><br />
<div class="account-details"></div>
</div>
</div>
<!-- CREATE GUIDE MODAL -->
<div id="modal-create" class="modal">
<div class="modal-content">
<h4>Create Guide</h4><br />
<form id="create-form">
<div class="input-field">
<input type="text" id="title" required>
<label for="title">Guide Title</label>
</div>
<div class="input-field">
<textarea id="content" class="materialize-textarea" required></textarea>
<label for="content">Guide Content</label>
</div>
<button class="btn yellow darken-2 z-depth-0">Create</button>
</form>
</div>
</div>
<!-- GUIDE LIST -->
<div class="container" style="margin-top: 40px;">
<ul class="collapsible z-depth-0 guides" style="border: none;">
</ul>
</div>
<!-- The core Firebase JS SDK is always required and must be listed first -->
<script src="https://www.gstatic.com/firebasejs/7.17.2/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/7.17.2/firebase-auth.js"></script>
<script src="https://www.gstatic.com/firebasejs/7.17.2/firebase-firestore.js"></script>
<script src="https://www.gstatic.com/firebasejs/7.17.2/firebase-functions.js"></script>
<!-- TODO: Add SDKs for Firebase products that you want to use
https://firebase.google.com/docs/web/setup#available-libraries -->
<script>
// Your web app's Firebase configuration
var firebaseConfig = {
apiKey: "AIzaSyD2mdlyhb4Y9ob0hVOTGDWnE-kQm_v7XpM",
authDomain: "admin-auth-5abe6.firebaseapp.com",
databaseURL: "https://admin-auth-5abe6.firebaseio.com",
projectId: "admin-auth-5abe6",
storageBucket: "admin-auth-5abe6.appspot.com",
messagingSenderId: "821223262759",
appId: "1:821223262759:web:c9368f331e18eaabbd5c02"
};
// Initialize Firebase
firebase.initializeApp(firebaseConfig);
const auth = firebase.auth()
const db = firebase.firestore()
const functions = firebase.functions()
//db.settings({timestampsInSnapshots:true})
</script>
<!-- Compiled and minified JavaScript -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
<script src="scripts/auth.js"></script>
<script src="scripts/index.js"></script>
</body>
</html>