-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadmin-panel.html
337 lines (311 loc) · 9.69 KB
/
admin-panel.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
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
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- Loading Bootstrap styling and Bootstrap icons -->
<link
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
crossorigin="anonymous"
/>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css"
/>
<!-- Loading icon and title -->
<link rel="icon" href="./assets/img/InfiniTips-Logo.png" />
<title>InfiniTips | Admin Panel</title>
</head>
<body style="text-align: center">
<!-- Making the navbar -->
<nav class="navbar navbar-expand-sm navbar-light bg-light border-bottom border-2">
<div class="container-fluid">
<!-- Adding brand and collapse navbar toggler -->
<a class="navbar-brand" href="index.html">
<img
src="./assets/img/InfiniTips-Logo.png"
alt="Logo"
width="30"
height="30"
class="d-inline-block align-text-top"
draggable="false"
/>
InfiniTips <span class="text-muted lead">Admin</span>
</a>
<button
class="navbar-toggler"
type="button"
data-bs-toggle="collapse"
data-bs-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent"
aria-expanded="false"
aria-label="Toggle navigation"
>
<span class="navbar-toggler-icon"></span>
</button>
<!-- Adding navbar links and admin dashboard button -->
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<!-- No links are active, since the admin dashboard was a button. -->
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link" href="index.html">
<i class="bi bi-house-door"></i> Home
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="videos.html">
<i class="bi bi-camera-reels"></i> Videos
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="suggestions.html">
<i class="bi bi-chat-dots"></i> Suggestions
</a>
</li>
</ul>
</div>
</div>
</nav>
<!-- Title section -->
<section class="p-5 pb-3" id="title">
<div class="container-lg">
<h1 class="display-3">Admin Panel</h1>
<p class="text-muted lead">
Access all of the videos here! You can add or delete videos for the community to
view.
</p>
</div>
</section>
<!-- Add Video section -->
<section class="p-5 pt-3 bg-light" id="add">
<div class="container-lg">
<div class="text-center">
<h2>Add Video</h2>
<p class="text-muted lead">Add a video here!</p>
</div>
<!-- Form for adding a new video. -->
<div class="row justify-content-center">
<div class="col-lg-6">
<form class="addVideo" style="text-align: start">
<div class="input-group mb-3">
<span class="input-group-text">
<i class="bi bi-type"></i>
</span>
<input
type="text"
class="form-control"
id="title"
name="title"
placeholder="Title..."
required
/>
</div>
<div class="input-group mb-3">
<span class="input-group-text">
<i class="bi bi-card-text"></i>
</span>
<textarea
name="description"
id="description"
class="form-control"
placeholder="Description..."
rows="3"
required
></textarea>
</div>
<div class="input-group mb-1">
<span class="input-group-text">
<i class="bi bi-code-slash"></i>
</span>
<textarea
name="iframe"
id="iframe"
class="form-control"
placeholder="<iframe> tag for the video..."
rows="3"
required
></textarea>
</div>
<small class="text-muted mb-2">
This can be found on Vimeo at the toolbar on top of a video. Make
sure to remove the JavaScript import!
</small>
<br /><br />
<div class="input-group mb-1">
<span class="input-group-text">
<i class="bi bi-link-45deg"></i>
</span>
<input
type="text"
class="form-control"
id="cover"
name="cover"
placeholder="Cover photo link..."
required
/>
</div>
<small class="text-muted mb-2"
>Make sure it is a valid photo link!</small
>
<br /><br />
<div class="input-group mb-3">
<span class="input-group-text">
<i class="bi bi-clock"></i>
</span>
<input
type="number"
class="form-control"
id="duration"
name="duration"
placeholder="Duration..."
required
/>
</div>
<button class="btn btn-success mt-2" type="submit">
<i class="bi bi-plus-square-dotted"></i> Add
</button>
<div class="feedback mt-3"></div>
</form>
</div>
</div>
</div>
</section>
<!-- Video section -->
<section class="p-5 pt-3" id="videos">
<div class="container-lg">
<div class="text-center">
<h2>Videos</h2>
<p class="text-muted lead">See the videos posted here!</p>
</div>
<!-- All of the videos. This is rendered by JavaScript. -->
<div class="videos">
<div class="card mt-3 shadow-sm loadingVideos">
<div class="card-body">
<div class="row">
<div class="col">
<div
class="spinner-border spinner-border-sm text-muted me-2"
role="status"
>
<span class="visually-hidden">Loading...</span>
</div>
<span class="lead me-2">Loading...</span>
<small class="text-muted me-5 text-break">
Please wait... we're just fetching the videos!
</small>
</div>
</div>
</div>
</div>
</div>
<div class="deleteFeedback mt-3"></div>
</div>
</section>
<!-- Footer -->
<footer class="text-center text-lg-start bg-light text-muted border-top border-2">
<section>
<div class="container text-center text-md-start mt-5">
<div class="row mt-3">
<div class="col-md-3 col-lg-4 col-xl-3 mx-auto mb-4">
<h6 class="fw-bold mb-4">
<img
src="./assets/img/InfiniTips-Logo-Grayscale.png"
alt="Logo"
class="img-fluid"
width="25"
height="25"
draggable="false"
/>
InfiniTips
</h6>
<p>
A great website for getting helpful online tips and tricks every
week!
</p>
<a href="videos.html" class="btn btn-outline-secondary btn-sm mt-2">
Start Watching!
</a>
</div>
<div class="col-md-3 col-lg-2 col-xl-2 mx-auto mb-4">
<h6 class="text-uppercase fw-bold mb-4">Useful links</h6>
<p>
<a href="index.html" class="text-reset text-decoration-none"
><i class="bi bi-house-door"></i> Home</a
>
</p>
<p>
<a href="videos.html" class="text-reset text-decoration-none"
><i class="bi bi-camera-reels"></i> Videos</a
>
</p>
</div>
<div class="col-md-4 col-lg-3 col-xl-3 mx-auto mb-md-0 mb-4">
<h6 class="text-uppercase fw-bold mb-4">Contact</h6>
<p>
<i class="bi bi-envelope me-2"></i>
</p>
<hr />
<p>
<i class="bi bi-code-slash me-2"></i>
Arnav Thorat
</p>
</div>
</div>
</div>
</section>
<!-- Copyright -->
<div class="text-center p-4" style="background-color: rgba(0, 0, 0, 0.05)">
Copyright © 2021
<a class="text-reset fw-bold text-decoration-none" href="index.html">InfiniTips</a>.
All rights reserved.
</div>
</footer>
<!-- Loading Bootstrap scripts -->
<script
src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js"
integrity="sha384-7+zCNj/IqJ95wo16oMtfsKbZ9ccEh31eOz1HGyDuCQ6wgnyJNSYdrPa03rtR1zdB"
crossorigin="anonymous"
></script>
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js"
integrity="sha384-QJHtvGhmr9XOIpI6YVutG+2QOK9T+ZnN4kzFN1RtK3zEFEIsxhlmWl5/YESvpZ13"
crossorigin="anonymous"
></script>
<!-- Loading Google hosted JQuery scripts -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<!-- Loading and using Firebase scripts -->
<script src="https://www.gstatic.com/firebasejs/8.10.0/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.10.0/firebase-firestore.js"></script>
<script>
// Your web app's Firebase configuration.
// For Firebase JS SDK v7.20.0 and later, measurementId is optional.
const firebaseConfig = {
apiKey: "AIzaSyBwgoow7mhrA3oLXhHeCsv_pX1zKGmQxPc",
authDomain: "infinitips-f336e.firebaseapp.com",
projectId: "infinitips-f336e",
storageBucket: "infinitips-f336e.appspot.com",
messagingSenderId: "1040500497251",
appId: "1:1040500497251:web:658bcdc25e0fff1af85156",
measurementId: "G-FHTJKDZ45V",
};
// Initialize Firebase
firebase.initializeApp(firebaseConfig);
const db = firebase.firestore();
</script>
<!-- Loading custom scripts -->
<script src="./scripts/other/consoleWarn.js"></script>
<script src="./scripts/admin/valid.js"></script>
<script src="./scripts/admin/videoAdmin.js"></script>
<!-- Using JQuery scripts -->
<script>
// Disabling right-click on images
$("body").on("contextmenu", "img", (e) => {
return false;
});
</script>
</body>
</html>