/
calendar.html
41 lines (38 loc) · 1.9 KB
/
calendar.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
<!doctype html>
<html lang="en-US">
<head>
<title>Voidlighter's Streaming Schedule</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="css/main.css" rel="stylesheet" type="text/css">
<style>
iframe#calendar {
height: 100vh;
width: 100%;
}
</style>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jstimezonedetect/1.0.7/jstz.js"></script>
</head>
<body>
<img id="bgImage" src="images/background.png" alt="backgroundImage">
<div>
<span>
<p id="timezone-text">Times are in MT.</p>
</span>
</div>
<!-- <iframe src="https://www.google.com/calendar/embed?showPrint=0&showCalendars=0&mode=WEEK&height=600&wkst=1&bgcolor=%23FFFFFF&src=somecalendaridentifier%40group.calendar.google.com&color=%23AB8B00&ctz=America%2FLos_Angeles" style=" border-width:0 " width="800" height="600" frameborder="0" scrolling="no"></iframe> -->
<div id="calendar-container">
<iframe id="calendar"
src="https://calendar.google.com/calendar/embed?height=600&wkst=1&bgcolor=%23ffffff&ctz=America%2FDenver&showTz=1&mode=WEEK&src=dm9pZGxpZ2h0ZXJAZ21haWwuY29t&color=%238E24AA"
style="border-width:0" frameborder="0" scrolling="no"></iframe>
</div>
</body>
<script type="text/javascript">
var timezone = jstz.determine().name();
var pref = '<iframe src="https://calendar.google.com/calendar/embed?height=600&wkst=1&bgcolor=%23ffffff&ctz=';
var suff = '&showTz=1&mode=WEEK&src=dm9pZGxpZ2h0ZXJAZ21haWwuY29t&color=%238E24AA" id="calendar" style="border-width:0" frameborder="0" scrolling="no"></iframe>';
var iframe_html = pref + encodeURIComponent(timezone) + suff;
document.getElementById('calendar-container').innerHTML = iframe_html;
document.getElementById('timezone-text').innerHTML = 'Times are in ' + timezone + '.';
</script>
</html>