-
Notifications
You must be signed in to change notification settings - Fork 0
/
events.html
285 lines (275 loc) · 9.7 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
272
273
274
275
276
277
278
279
280
281
282
283
284
285
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>Events | UH Japanese Language and Culture Club</title>
<link rel="icon" href="./public/favicon.ico" type="image/x-icon" />
<link href="events-style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="officerList.js"></script>
<!-- Google tag (gtag.js) -->
<script
async
src="https://www.googletagmanager.com/gtag/js?id=G-NHFFQ4KL74"
></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag("js", new Date());
gtag("config", "G-NHFFQ4KL74");
</script>
</head>
<body>
<!-- Header -->
<secion id="header">
<div class="header container">
<div class="nav-bar">
<div class="brand">
<a href="/">
<img src="./public/logo192.png" />
</a>
<a href="/">
<img
class="banner-text"
src="./img/JLCC-UH-Banner-Text-2023-v2.png"
/>
</a>
</div>
<div class="nav-list">
<div class="hamburger">
<div class="bar"></div>
</div>
<ul>
<li><a href="./#about" data-after="About">About</a></li>
<li>
<a
href="#events"
data-after="Events"
style="
color: #f7a088;
font-weight: 600;
background-color: rgba(0, 0, 0, 15%);
"
>Events</a
>
</li>
<li><a href="./#officers" data-after="Officers">Officers</a></li>
<li>
<a href="./#membership" data-after="Membership">Membership</a>
</li>
<li>
<a href="./#community" data-after="Community">Community</a>
</li>
</ul>
</div>
</div>
</div>
</secion>
<!-- End of Header -->
<!-- Hero Section -->
<section id="hero">
<div class="hero container"></div>
</section>
<!-- End of Hero Section -->
<!-- Events Section -->
<section id="events">
<div class="events container">
<div class="events-top">
<h1 class="section-title">Upcoming Events</h1>
</div>
<div class="events-bottom">
<script>
var eventsBot = document.getElementsByClassName("events-bottom");
eventsBot[0].innerHTML = `<h1 class="events-loading">LOADING EVENTS...</h1>`;
const SHEET_ID = "1FtZ30gm7E50faLSdECNBO8aVx3k6sRV-RVlRwHi_vbE";
const API_KEY = "AIzaSyB--kBZheOdXiaXSmRaLzLDZ_nXQRs1crY";
fetch(
`https://sheets.googleapis.com/v4/spreadsheets/${SHEET_ID}/values/Upcoming!A1:H90?key=${API_KEY}`
)
.then(function (response) {
return response.json();
})
.then(function (data) {
result = ``;
for (var i = 0; i < 90; i++) {
if (
data.values.length > i + 1 &&
data.values[i + 1][0] != ""
) {
//if title isn't blank
let eventLink = ``;
if (data.values[i + 1][7] != undefined) {
//Event link
if (
data.values[i + 1][6] != undefined &&
data.values[i + 1][6] != ""
) {
// if theres a label, use it
eventLink = `<a target="_blank" href=${
data.values[i + 1][7]
}>${data.values[i + 1][6]}</a>`;
} else {
//else just put the link there
eventLink = `<a target="_blank" href=${
data.values[i + 1][7]
}">Event Details or RSVP</a>`;
}
}
let eventImg = `<img src="./img/placeholder3.png" alt="${
data.values[i + 1][0]
} Event Image" >`;
if (
data.values[i + 1][5] != undefined &&
data.values[i + 1][5] != ""
) {
eventImg = `<img src=${data.values[i + 1][5]} alt="${
data.values[i + 1][0]
} Event Image" >`;
}
var item = `
<div class="events-item">
<div class="events-img"> ${eventImg} </div>
<div class="events-info">
<h1>${data.values[i + 1][0]}</h1>
<p>Location: ${data.values[i + 1][2]}</p>
<p>${data.values[i + 1][3]}, ${data.values[i + 1][4]}</p>
<div class="events-info more">
<p><i>${data.values[i + 1][1]}</i></p>
${eventLink}
</div>
<div class="events-info-expand">
<img class="expand-button" src="./img/expand.png"/>
</div>
</div>
</div>
`;
} else {
break;
}
//eventsBot[0].innerHTML += item;
result += item;
}
eventsBot[0].innerHTML = result;
})
.catch(function (error) {
console.log(error);
});
</script>
</div>
<br />
<br />
<br />
<div class="events-top">
<h1 class="section-title">Previous Events</h1>
</div>
<div class="events-prev">
<script>
var eventsPrev = document.getElementsByClassName("events-prev");
eventsPrev[0].innerHTML = `<h1 class="events-loading">LOADING EVENTS...</h1>`;
fetch(
`https://sheets.googleapis.com/v4/spreadsheets/${SHEET_ID}/values/Archive!A1:G90?key=${API_KEY}`
)
.then(function (response) {
return response.json();
})
.then(function (data) {
result = ``;
for (var i = 0; i < 90; i++) {
if (
data.values.length > i + 1 &&
data.values[i + 1][0] != ""
) {
//if title isn't blank
let eventLink = ``;
if (data.values[i + 1][7] != undefined) {
//Event link
if (
data.values[i + 1][6] != undefined &&
data.values[i + 1][6] != ""
) {
// if theres a label, use it
eventLink = `<a target="_blank" href=${
data.values[i + 1][7]
}>${data.values[i + 1][6]}</a>`;
} else {
//else just put the link there
eventLink = `<a target="_blank" href=${
data.values[i + 1][7]
}">Event Details or RSVP</a>`;
}
}
let eventImg = `<img src="./img/placeholder3.png" alt="${
data.values[i + 1][0]
} Event Image" >`;
if (
data.values[i + 1][5] != undefined &&
data.values[i + 1][5] != ""
) {
eventImg = `<img src=${data.values[i + 1][5]} alt="${
data.values[i + 1][0]
} Event Image" >`;
}
var item = `
<div class="events-item">
<div class="events-img"> ${eventImg} </div>
<div class="events-info">
<h1>${data.values[i + 1][0]}</h1>
<p>Location: ${data.values[i + 1][2]}</p>
<p>${data.values[i + 1][3]}, ${data.values[i + 1][4]}</p>
</div>
</div>
`;
} else {
break;
}
//eventsPrev[0].innerHTML += item;
result += item;
}
eventsPrev[0].innerHTML = result;
})
.catch(function (error) {
console.log(error);
});
</script>
</div>
</div>
</section>
<!-- End of Events Section -->
<!-- Footer Section -->
<section id="footer">
<div class="footer container">
<div class="brand">
<a href="/">
<img src="./public/logo192.png" />
</a>
<a href="/">
<img
class="banner-text"
src="./img/JLCC-UH-Banner-Text-2023-v2.png"
/>
</a>
</div>
<h2>Japanese Language and Culture Club, University of Houston</h2>
<div class="social-icon">
<!-- <div class="social-item"> <a href="#"> <img src="./img/JLCC-Instagram.png" alt="JLCC UH Instagram"></a></div> -->
<div class="social-item">
<a href="#">
<img src="./img/JLCC-Mail.png" alt="Email JLCC UH"
/></a>
</div>
</div>
<p>
Created by
<a href="https://mitchellsharma.com/?utm_source=jlcc-uh"
>Mitchell Sharma</a
>
in 2023.
</p>
</div>
</section>
<!-- End of Footer Section -->
<script src="script.js"></script>
</body>
</html>