-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathindex.html
More file actions
478 lines (398 loc) · 20.3 KB
/
Copy pathindex.html
File metadata and controls
478 lines (398 loc) · 20.3 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
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
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
<!DOCTYPE html>
<html lang="en" dir="ltr" data-theme="dark">
<head>
<!-- Meta Data -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="color-scheme" content="light dark">
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<!-- Bootstrap Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"
defer></script>
<!-- Stylesheets -->
<link rel="stylesheet" href="styles/master.css">
<!-- Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link
href="https://fonts.googleapis.com/css2?family=Comfortaa:wght@500;700&family=Work+Sans:wght@300;400;500;600;700;800&display=swap"
rel="stylesheet">
<!-- Fontawesome -->
<script src="https://kit.fontawesome.com/180bb0a7e4.js" crossorigin="anonymous"></script>
<!-- Favicon -->
<link rel="shortcut icon" href="favicon.ico">
<title>Class B | Home</title>
</head>
<body class="lgtr-dark">
<!-- Template for Navbar -->
<template id="nav-template">
<!-- TODO: Test the behavior of navbar if container fluid is in nav element instead of a nested div element -->
<nav class="navbar navbar-expand-lg navbar-dark fixed-top container-fluid lgtr" id="nav-scroll">
<!-- Navbar Logo -->
<div class="brand-img me-3" v-if="width > 972">
<img class="brand-logo" src="images/brand-logo.svg" alt="Brand">
</div>
<!-- Navbar Name -->
<a class="navbar-brand brand-name fs-1" href="index.html">Memengineers</a>
<!-- This Toggler only appears for small screens -->
<a class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavAltMarkup"
aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
<div class="brand-img me-3" v-if="972 > width">
<img class="brand-logo" src="images/brand-logo.svg" alt="Brand">
</div>
</a>
<!-- Navbar Page links -->
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<div class="navbar-nav">
<a class="nav-link fs-3 me-2 active" @click="setFocusHome"
href="javascript:void(0);">Home</a>
<a class="nav-link fs-3 me-2" @click="setFocusTools"
href="javascript:void(0);">Tools</a>
<a class="nav-link fs-3 me-2" @click="setFocusTimeline"
href="javascript:void(0);">Timeline</a>
</div>
<!-- Add a toggler for dark mode using checkbox and Icon from Font Awesome -->
<i class="fas fa-2x toggle-icon"></i>
</div>
</nav>
</template>
<!-- Template for Modal -->
<template id="modal-template">
<div class="modal fade" id="modal-id" tabindex="-1" role="dialog" aria-labelledby="modal-title" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="modal-title">Change the contents of Carousel {{ carouselIndex }} </h5>
<button type="button" class="close" data-bs-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<!-- Form to update the Title, Content and Image of Carousel -->
<form>
<div class="form-group">
<label for="carousel-title">Title</label>
<input type="text" class="form-control my-2" id="carousel-title" v-model="carousel.title">
<label for="carousel-content">Content</label>
<textarea class="form-control my-2" id="carousel-content" v-model="carousel.content"></textarea>
<label for="carousel-image">Image</label>
<img :src="carousel.image" :alt="`Carousel ${carouselIndex} image`" id="carousel-image"
class="img-fluid my-2">
<!-- Input file -->
<input type="file" class="form-control-file" id="new-showcase-image" @change="fileChanged"
accept="image/png, image/jpeg, image/webp">
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary" @click="updateCarousel">Save Changes</button>
</div>
</div>
</div>
</div>
</template>
<!-- Template for Carousel Item -->
<template id="carousel-item">
<!-- Add a pencil symbol button if user is logged in-->
<div v-if="isUserLoggedIn">
<i class="carousel-edit-sym fa-solid fa-pen-to-square fa-2x" @click="updateModalCaller(key)"></i>
</div>
<img :src="imageURL" class="d-block w-100 tool-top" alt="This image cannot be displayed">
<div class="carousel-caption d-block">
<h2 class="fs-1">{{ title }}</h2>
<p>{{ caption }}</p>
</div>
</template>
<!-- Template for announcement -->
<template id="announcement">
<div v-effect="updateCollId()"></div>
<h2 class="accordion-header" :id="flushId">
<button class="accordion-button collapsed ann-accord-header" type="button" data-bs-toggle="collapse"
:data-bs-target="`#${collId}`" aria-expanded="false" :aria-controls="collId">
{{title}}
</button>
</h2>
<div :id="collId" class="accordion-collapse collapse" :aria-labelledby="flushId"
data-bs-parent="#announcementAccordion">
<div class="accordion-body">
{{description}}
</div>
</div>
</template>
<!-- Template for showcase -->
<template id="showcase-item">
<div class="card mb-4 border-0 shadow position-relative">
<img :src="imageURL" class="card-img-top img-fluid" alt="Image unavailable">
<div class="card-body bg-dark bg-gradient">
<!-- Add a pencil symbol button -->
<i v-if="isUserLoggedIn" class=" showcase-edit-sym fa-solid fa-xmark fa-2x" @click="removeShowcaseItem()"></i>
<h5 class="card-title text-white">{{title}}</h5>
<p class="card-text text-white-50">{{content}}</p>
<a v-if="!deleteButton" :href="url" target="_blank" class="btn btn-secondary bg-gradient">Read more...</a>
<!-- Secret button to confirm deletion -->
<div v-if="deleteButton">
<button type="button" class="btn btn-danger bg-gradient" @click="confirmDelete">Delete</button>
<button type="button" class="btn btn-secondary bg-gradient" @click="cancelDelete">Cancel</button>
</div>
</div>
</div>
</template>
<!-- Template For Footer Icon -->
<template id="footer-icon">
<div class="p-2 text-center grid-item">
<a :href="link" target="_blank"><i :class="imgSrc"></i></a>
</div>
<div class="p-2 text-center">
{{name}}
</div>
</template>
<!-- Template for Sign in Section -->
<template id="sign-in">
<div class="sign-in-container container">
<!-- A button to expand sign in form -->
<button v-if="!userPresent" class="btn btn-outline-info btn-block" @click="expandSignInForm">Sign In <i
:class="arrow"></i>
</button>
<!-- A message that shows which user is present -->
<div v-if="userPresent" class="text-center">
<h4 class="comfortaa footer-content opacity-50">Welcome, {{admin.name}}</h3>
<button class="btn btn-outline-danger btn-block" @click="signOutUser">Sign Out</button>
</div>
<!-- The expandable form -->
<div v-if="showForm && !userPresent" class="sign-in-form" id="sign-in-form">
<!-- The form with properly padded fields and buttons -->
<form @submit.prevent="SignIn">
<div class="form-group py-3">
<!-- Username input -->
<label for="username" class="footer-content">Username</label>
<input type="text" class="form-control my-2" id="username" v-model="username" placeholder="Enter username">
<!-- Add password with quick viewer -->
<label for="password" class="footer-content">Password</label>
<input type="password" class="form-control my-2" id="password" v-model="password"
placeholder="Enter password">
<!-- Forgot Password -->
<!-- Call forgotPassword link -->
<a href="#" class="d-block my-3 frgt-pass" @click.prevent="forgotPassword">Forgot
Password?</a>
<!-- Confirm that email was sent -->
<div v-if="forgotPasswordEmailSent" class="alert alert-danger" role="alert">
<p class="m-0">An email has been sent to {{username}}</p>
</div>
<!-- The submit button -->
<button type="submit" class="btn btn-primary btn-block my-2 border-0 shadow" @click="sendLoginDetails">Sign
In</button>
</div>
</form>
<!-- The error message -->
<div v-if="error" class="alert alert-danger" role="alert">
{{error}}
</div>
</div>
</div>
</template>
<!-- Start of the page -->
<div v-scope="Navbar()" @vue:mounted="mounted">
<!-- Render Main page -->
<section>
<!-- Hero Of the Page -->
<div id="heroCarousel" class="carousel slide" data-bs-ride="carousel" v-scope="Carousel()"
@vue:mounted="getCarousels">
<!-- Carousel Panels -->
<div class="carousel-inner">
<div class="carousel-item" v-for="(car,index) in carousels" :class="{ active: index==0 }">
<div v-scope="CarouselItem(car,index)" @vue:mounted="mounted"></div>
</div>
<!-- Mount Modal if modalCaller is not -1 -->
<div v-if="modalCaller != -1" v-scope="Modal(modalCaller)" @vue:mounted="mounted">
</div>
</div>
<!-- Carousel Buttons -->
<button class=" carousel-control-prev" type="button" data-bs-target="#heroCarousel" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#heroCarousel" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</button>
</div>
<!-- Rest of the Content, in a Grid flow -->
<div class="container pt-4 px-4">
<!-- Grid Layout for the rest of the page -->
<div class="row gx-5">
<!-- Left Column -->
<div class="col-12 col-md-7">
<!-- Announcements -->
<div v-scope="Announcements()" class="card ann-container text-dark mb-5"
@vue:mounted="getAnns(), mounted()">
<h3 class=" footer-header m-3">📢 Announcements</h3>
<div class="accordion accordion-flush" id="announcementAccordion" v-for="(ann,index) in announcements">
<div class="accordion-item" v-scope="Announcement(ann, keys[index])" @vue:mounted="mounted"></div>
</div>
<!-- Add section to add an announcement to the database if admin present -->
<div v-if="isUserLoggedIn && !showAnnAdder" class="d-flex justify-content-around my-3">
<!-- Add a Save Changes button based on confirmPush -->
<div v-if="confirmPush" class="d-inline">
<button class="btn btn-success" @click="sendAnnToDatabase">Save Changes</button>
</div>
<!-- Add a plus symbol button -->
<i class=" add-ann-plus fa-solid fa-circle-plus fa-2x" @click="toggleAnnForm"></i>
<!-- Add a Save Changes button based on confirmPush -->
<div v-if="confirmPush" class="d-inline">
<button class="btn btn-danger" @click="cancelAnnChanges">Cancel Changes</button>
</div>
</div>
<!-- A div to show a form to add a new announcement -->
<div v-if="showAnnAdder" class="p-3">
<hr>
<!-- The form to add a new announcement -->
<form @submit.prevent="previewNewAnnouncement">
<div class="form-group">
<label for="new-ann-title" class="my-2">Title</label>
<input type="text" class="form-control" id="new-ann-title" v-model="newAnnHeader"
placeholder="Enter title">
<label for="new-ann-content" class="my-2">Content</label>
<textarea class="form-control" id="new-ann-content" v-model="newAnnContent"
placeholder="Enter content" rows="3"></textarea>
</div>
<button type="submit" class="btn btn-primary btn-block my-3 border-0 shadow">Preview
Announcement</button>
<!-- Cancel button -->
<button class="btn btn-danger btn-block my-3 border-0 shadow" @click="toggleAnnForm">Cancel</button>
</form>
</div>
</div>
<!-- Announcements End -->
<!-- Showcases : -->
<div v-scope="Showcases()" @vue:mounted="getShowCaseItems(), mounted()">
<!-- For showcase items in showcase array, mount the ShowcaseItem component -->
<div v-for="(showcase,index) in showcases">
<div v-scope="ShowcaseItem(showcase, keys[index])" @vue:mounted="mounted"></div>
</div>
<!-- Add section to add a showcase to the database if admin present -->
<div v-if="isUserLoggedIn && !showShowcaseAdder" class="d-flex justify-content-around my-3">
<!-- Add a Save Changes button based on confirmPush -->
<div v-if="confirmPush" class="d-inline">
<button class="btn btn-success" @click="sendShowcaseToDatabase">Save Changes</button>
</div>
<!-- Add a plus symbol button -->
<i class="add-showcase-plus fa-solid fa-circle-plus fa-2x" @click="toggleShowcaseForm"></i>
<!-- Add a Save Changes button based on confirmPush -->
<div v-if="confirmPush" class="d-inline">
<button class="btn btn-danger" @click="cancelShowcaseChanges">Cancel Changes</button>
</div>
</div>
<!-- A div to show a form to add a new showcase -->
<div v-if="showShowcaseAdder" class="p-3 mb-3 bg-dark bg-gradient text-white rounded-2">
<h5>Add a new Showcase Item</h5>
<hr>
<!-- The form to add a new showcase -->
<form @submit.prevent="previewNewShowcase">
<div class="form-group">
<!-- For New Showcase Title -->
<label for="new-showcase-title" class="my-2">Title</label>
<input type="text" class="form-control" id="new-showcase-title" v-model="newShowcaseTitle"
placeholder="Enter title">
<!-- For New Showcase Content -->
<label for="new-showcase-content" class="my-2">Content</label>
<textarea class="form-control" id="new-showcase-content" v-model="newShowcaseContent"
placeholder="Enter content" rows="3"></textarea>
<!-- For New Showcase Image -->
<label for="new-showcase-image" class="my-2 d-block">Image</label>
<input type="file" class="form-control-file" id="new-showcase-image" @change="fileChanged"
accept="image/png, image/jpeg, image/webp">
<!-- For New Showcase URL -->
<label for="new-showcase-url" class="my-2 d-block">URL</label>
<input type="text" class="form-control" id="new-showcase-url" v-model="newShowcaseURL"
placeholder="Enter url">
<button type="submit" class="btn btn-primary btn-block my-3 border-0 shadow">Preview
New Showcase</button>
<!-- Cancel button -->
<button class="btn btn-danger btn-block my-3 border-0 shadow"
@click="toggleShowcaseForm">Cancel</button>
</div>
</form>
</div>
</div>
<!-- Showcase End -->
</div>
<!-- Right Column -->
<div class="col-12 col-md-5 text-center">
<!-- A blank div to show you can put more stuff here -->
<div class="card p-3 shadow position-relative h-100">
<h3 class="footer-header">📰 News Feeds</h3>
<h5>
Originally this section had different news feeds, twitter, discord and other information that was specific to my college batch. However, for the sake of privacy, I have removed it. If you decide to fork this project, you can add your own content here.
</h5>
</div>
</div>
</div>
</div>
</section>
</div>
<!--Footer -->
<footer id="id-footer" class="position-relative p-5 mt-3 lgtr-black">
<div class="footer-content row">
<div class="mb-2 col-lg-6">
<h3 class="footer-header">About Terna Engineering College</h3>
<p>Terna Engineering College is part of the
Terna Public Charitable Trust's Group of Institutions,
whose mission is to provide an environment of academic
excellence and to adopt appropriate teaching - learning
processes to produce competent and skilled engineers
ready to meet global challenges.
</p>
<br>
<p class="abt-desc">
Their vision has always been to deliver value added
quality education to the aspiring students, meeting
stringent requirements of the changing technology,
industry, business and society as a whole.
</p>
</div>
<div class="mb-2 col-lg-6">
<h3 class="footer-header">Follow College Clubs at:</h3>
<!-- Another Grid -->
<div class="row g-3">
<div :class="className"
v-scope="Footer({img:'fa-brands fa-discord fa-3x',name:'Evozone', link:'https://discord.gg//ZSGjsDYy5n'})">
</div>
<div :class="className"
v-scope="Footer({img:'fa-brands fa-github fa-3x',name:'Evozone Github', link:'https://github.com/Evozone'})">
</div>
<div :class="className"
v-scope="Footer({img:'fa-brands fa-instagram fa-3x',name:'Resorang', link:'https://www.instagram.com/resorang_tec/'})">
</div>
<div :class="className"
v-scope="Footer({img:'fa-brands fa-instagram fa-3x',name:'E-cell Terna', link:'https://www.instagram.com/e_cell_terna/'})">
</div>
<div :class="className"
v-scope="Footer({img:'fa-brands fa-instagram fa-3x',name:'Terna Engineering College', link:'https://www.instagram.com/ternaengg/'})">
</div>
<div :class="className"
v-scope="Footer({img:'fa-solid fa-globe fa-3x',name:'TEC Website', link:'https://ternaengg.ac.in/'})">
</div>
<div :class="className"
v-scope="Footer({img:'fa-brands fa-instagram fa-3x',name:'IEEE Terna', link:'https://www.instagram.com/ieeeterna/'})">
</div>
<div :class="className"
v-scope="Footer({img:'fa-brands fa-instagram fa-3x',name:'CSI Terna', link:'https://www.instagram.com/csi_terna/'})">
</div>
</div>
</div>
</div>
<hr class="footer-bg">
<!-- Sign in section -->
<div v-scope="SignIn()" class="py-3" @vue:mounted="mounted"></div>
<h6 class="footer-trademark position-absolute bottom-0 start-50 translate-middle-x mt-4">An Evozone Project, 2022
</h6>
</footer>
<!--Footer -->
<!-- This script module contains the code for Firebase and Petite vue -->
<script type="module" src="scripts/index.js"></script>
</body>
</html>