-
Notifications
You must be signed in to change notification settings - Fork 2
/
events.html
271 lines (271 loc) · 14.9 KB
/
events.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
---
layout: default
description: Techverse is a technical club in Pune. We are a group of tech enthusiasts who are passionate about technology and its applications.
title: Events | Techverse
---
<!-- include header -->
{% include navbar.html %}
<!-- content -->
<!-- Page Header Start -->
<div class="container-fluid page-header-events py-6 my-6 mt-0 wow fadeIn" data-wow-delay="0.1s">
<div class="container text-center">
<h1 class="display-4 text-white animated slideInDown mb-4">Events</h1>
<nav aria-label="breadcrumb animated slideInDown">
<ol class="breadcrumb justify-content-center mb-0">
<li class="breadcrumb-item"><a class="text-white" href="/">Home</a></li>
<!-- <li class="breadcrumb-item"><a class="text-white" href="#">Pages</a></li> -->
<li class="breadcrumb-item text-primary active" aria-current="page">Events</li>
</ol>
</nav>
</div>
</div>
<!-- Page Header End -->
<!-- Courses Start -->
<div class="container-xxl py-6">
<div class="container">
<div class="text-center mx-auto mb-5 wow fadeInUp" data-wow-delay="0.1s" style="max-width: 80%;">
<h6 class="text-primary text-uppercase mb-2">Upcoming Events</h6>
<h1 class="display-6 mb-4">Our Events to Upskill You</h1>
</div>
<div id="upcoming_events" class="row g-4 justify-content-center">
<div class="col-lg-4 col-md-6 wow fadeInUp">
<div class="courses-item d-flex flex-column bg-light overflow-hidden h-100">
<div class="text-center p-4 pt-0">
<div class="d-inline-block text-white fs-5 py-1 px-4 mb-4">
<span class="loading-skeleton">Loading Domain</span>
</div>
<h5 class="mb-3"><span class="loading-skeleton">Loading Title</span></h5>
<p><span class="loading-skeleton">Loading Description <br> Loading Description<br> </span></p>
<ol class="breadcrumb justify-content-center mb-0">
<li class="breadcrumb-item small"><span class="loading-skeleton">Loading Location</span>
</li>
<li class="breadcrumb-item small"><span class="loading-skeleton">Loading DateTime</span>
</li>
</ol>
</div>
<div class="position-relative mt-auto mx-auto" style="width: 86%; height: 200px;">
<span class="loading-skeleton">
</span>
</div>
</div>
</div>
<div class="col-lg-4 col-md-6 wow fadeInUp">
<div class="courses-item d-flex flex-column bg-light overflow-hidden h-100">
<div class="text-center p-4 pt-0">
<div class="d-inline-block text-white fs-5 py-1 px-4 mb-4">
<span class="loading-skeleton">Loading Domain</span>
</div>
<h5 class="mb-3"><span class="loading-skeleton">Loading Title</span></h5>
<p><span class="loading-skeleton">Loading Description <br> Loading Description<br> </span></p>
<ol class="breadcrumb justify-content-center mb-0">
<li class="breadcrumb-item small"><span class="loading-skeleton">Loading Location</span>
</li>
<li class="breadcrumb-item small"><span class="loading-skeleton">Loading DateTime</span>
</li>
</ol>
</div>
<div class="position-relative mt-auto mx-auto" style="width: 86%; height: 200px;">
<span class="loading-skeleton">
</span>
</div>
</div>
</div>
<div class="col-lg-4 col-md-6 wow fadeInUp">
<div class="courses-item d-flex flex-column bg-light overflow-hidden h-100">
<div class="text-center p-4 pt-0">
<div class="d-inline-block text-white fs-5 py-1 px-4 mb-4">
<span class="loading-skeleton">Loading Domain</span>
</div>
<h5 class="mb-3"><span class="loading-skeleton">Loading Title</span></h5>
<p><span class="loading-skeleton">Loading Description <br> Loading Description<br> </span></p>
<ol class="breadcrumb justify-content-center mb-0">
<li class="breadcrumb-item small"><span class="loading-skeleton">Loading Location</span>
</li>
<li class="breadcrumb-item small"><span class="loading-skeleton">Loading DateTime</span>
</li>
</ol>
</div>
<div class="position-relative mt-auto mx-auto" style="width: 86%; height: 200px;">
<span class="loading-skeleton">
</span>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Courses End -->
<!-- Courses Start -->
<div class="container-xxl py-6">
<div class="container">
<div class="text-center mx-auto mb-5 wow fadeInUp" data-wow-delay="0.1s" style="max-width: 80%;">
<h6 class="text-primary text-uppercase mb-2">Past Events</h6>
<h1 class="display-6 mb-4">See Past Events Don't Forgot To Register for Our Upcoming Events First</h1>
</div>
<div id="past_events" class="row g-4 justify-content-center">
<div class="col-lg-4 col-md-6 wow fadeInUp">
<div class="courses-item d-flex flex-column bg-light overflow-hidden h-100">
<div class="text-center p-4 pt-0">
<div class="d-inline-block text-white fs-5 py-1 px-4 mb-4">
<span class="loading-skeleton">Loading Domain</span>
</div>
<h5 class="mb-3"><span class="loading-skeleton">Loading Title</span></h5>
<p><span class="loading-skeleton">Loading Description <br> Loading Description<br> </span></p>
<ol class="breadcrumb justify-content-center mb-0">
<li class="breadcrumb-item small"><span class="loading-skeleton">Loading Location</span>
</li>
<li class="breadcrumb-item small"><span class="loading-skeleton">Loading DateTime</span>
</li>
</ol>
</div>
<div class="position-relative mt-auto mx-auto" style="width: 86%; height: 200px;">
<span class="loading-skeleton">
</span>
</div>
</div>
</div>
<div class="col-lg-4 col-md-6 wow fadeInUp">
<div class="courses-item d-flex flex-column bg-light overflow-hidden h-100">
<div class="text-center p-4 pt-0">
<div class="d-inline-block text-white fs-5 py-1 px-4 mb-4">
<span class="loading-skeleton">Loading Domain</span>
</div>
<h5 class="mb-3"><span class="loading-skeleton">Loading Title</span></h5>
<p><span class="loading-skeleton">Loading Description <br> Loading Description<br> </span></p>
<ol class="breadcrumb justify-content-center mb-0">
<li class="breadcrumb-item small"><span class="loading-skeleton">Loading Location</span>
</li>
<li class="breadcrumb-item small"><span class="loading-skeleton">Loading DateTime</span>
</li>
</ol>
</div>
<div class="position-relative mt-auto mx-auto" style="width: 86%; height: 200px;">
<span class="loading-skeleton">
</span>
</div>
</div>
</div>
<div class="col-lg-4 col-md-6 wow fadeInUp">
<div class="courses-item d-flex flex-column bg-light overflow-hidden h-100">
<div class="text-center p-4 pt-0">
<div class="d-inline-block text-white fs-5 py-1 px-4 mb-4">
<span class="loading-skeleton">Loading Domain</span>
</div>
<h5 class="mb-3"><span class="loading-skeleton">Loading Title</span></h5>
<p><span class="loading-skeleton">Loading Description <br> Loading Description<br> </span></p>
<ol class="breadcrumb justify-content-center mb-0">
<li class="breadcrumb-item small"><span class="loading-skeleton">Loading Location</span>
</li>
<li class="breadcrumb-item small"><span class="loading-skeleton">Loading DateTime</span>
</li>
</ol>
</div>
<div class="position-relative mt-auto mx-auto" style="width: 86%; height: 200px;">
<span class="loading-skeleton">
</span>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Courses End -->
<script type="module">
import { backend_url, setLoading, offLoading } from '/js/script.js';
async function getActiveEvents() {
var url = backend_url + "/api/active_events";
var response = await fetch(url);
var data = await response.json();
var upcoming_events = document.getElementById("upcoming_events");
upcoming_events.innerHTML = "";
// console.log(data);
if (data.length == 0) {
upcoming_events.innerHTML = "<h1 class='text-center'>No Upcoming Events</h1>";
return;
} else {
data.forEach(function (event) {
// Create a new div
var newDiv = document.createElement('div');
newDiv.className = 'col-lg-4 col-md-6 wow fadeInUp';
newDiv.dataset.wowDelay = '0.1s';
// Add the HTML with the event data
newDiv.innerHTML = `
<div class="courses-item d-flex flex-column bg-light overflow-hidden h-100">
<div class="text-center p-4 pt-0">
<div class="d-inline-block bg-primary text-white fs-5 py-1 px-4 mb-4">${event.domain}</div>
<h5 class="mb-3">${event.title}</h5>
<p>${event.description}</p>
<ol class="breadcrumb justify-content-center mb-0">
<li class="breadcrumb-item small"><i class="fa fa-location-arrow text-primary me-2"></i>${event.venue}</li>
<li class="breadcrumb-item small"><i class="fa fa-calendar-alt text-primary me-2"></i>${new Date(event.event_date_time).toLocaleString()}</li>
</ol>
</div>
<div class="position-relative mt-auto">
<img class="img-fluid" src="${backend_url + event.event_poster}" alt="Event Poster">
<div class="courses-overlay">
<a class="btn btn-outline-primary border-2" href="/events/active/event.html?event=${event.ref_id}">Register Now</a>
</div>
</div>
</div>`;
// on click on new div redirect to event page
newDiv.onclick = function () {
window.location.href = "/events/active/event.html?event=" + event.ref_id;
};
// Append the new div to the container
upcoming_events.appendChild(newDiv);
});
}
}
async function getPastEvents() {
var url = backend_url + "/api/past_events";
var response = await fetch(url);
var data = await response.json();
var past_events = document.getElementById("past_events");
past_events.innerHTML = "";
// console.log(data);
if (data.length == 0) {
past_events.innerHTML = "<h1 class='text-center'>No Past Events</h1>";
return;
} else {
data.forEach(function (event) {
// Create a new div
var newDiv = document.createElement('div');
newDiv.className = 'col-lg-4 col-md-6 wow fadeInUp';
newDiv.dataset.wowDelay = '0.1s';
// Add the HTML with the event data
newDiv.innerHTML = `
<div class="courses-item d-flex flex-column bg-light overflow-hidden h-100">
<div class="text-center p-4 pt-0">
<div class="d-inline-block bg-primary text-white fs-5 py-1 px-4 mb-4">${event.domain}</div>
<h5 class="mb-3">${event.title}</h5>
<p>${event.description}</p>
<ol class="breadcrumb justify-content-center mb-0">
<li class="breadcrumb-item small"><i class="fa fa-location-arrow text-primary me-2"></i>${event.venue}</li>
<li class="breadcrumb-item small"><i class="fa fa-calendar-alt text-primary me-2"></i>${new Date(event.event_date_time).toLocaleString()}</li>
</ol>
</div>
<div class="position-relative mt-auto">
<img class="img-fluid" src="${backend_url + event.event_poster}" alt="Event Poster">
<div class="courses-overlay">
<a class="btn btn-outline-primary border-2" href="/events/past/event.html?event=${event.ref_id}">See Details</a>
</div>
</div>
</div>`;
// on click on new div redirect to event page
newDiv.onclick = function () {
window.location.href = "/events/past/event.html?event=" + event.ref_id;
};
// Append the new div to the container
past_events.appendChild(newDiv);
});
}
}
document.getElementById("nav-events").classList.add("active");
window.onload = async () => {
await getActiveEvents();
await getPastEvents();
offLoading();
};
</script>
<!-- include footer -->
{% include footer.html %}