This repository has been archived by the owner on Nov 9, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
76 lines (72 loc) · 2.35 KB
/
index.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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Eve</title>
<link rel="stylesheet" type="text/css" href="fonts/roboto.css">
<link rel="stylesheet" type="text/css" href="index.css">
<link rel="stylesheet" type="text/css" href="node_modules/fullcalendar/dist/fullcalendar.css">
<script>if (typeof module === 'object') {window.module = module; module = undefined;}</script>
<script src="node_modules/jquery/dist/jquery.min.js"></script>
<script src="node_modules/moment/moment.js"></script>
<script>if (window.module) module = window.module;</script>
</head>
<body>
<div class="container">
<header>
</header>
<section class="top-left">
<div class="clock">
<div class="time medium"></div>
<div class="date medium"></div>
</div>
</section>
<div id="player"></div>
<section class="bottom-center main">
<h1>Say "Hey, Eve" to talk to me.</h1>
</section>
<div id='calendar'></div>
<footer></footer>
</div>
</body>
<script>
var youtubePlayer;
var playerReady = false;
// 2. This code loads the IFrame Player API code asynchronously.
var tag = document.createElement('script');
tag.src = "https://www.youtube.com/iframe_api";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
function onYouTubeIframeAPIReady() {
youtubePlayer = new YT.Player('player', {
height: $(window).height(),
width: $(window).width(),
events: {
"onReady": onPlayerReady,
"onStateChange": onPlayerStateChange
}
});
}
function onPlayerReady(){
playerReady = true;
}
var done = false;
function onPlayerStateChange(event) {
if (event.data == YT.PlayerState.PLAYING && !done) {
setTimeout(stopVideo, 6000);
done = true;
} else if (event.data == YT.PlayerState.ENDED){
$("#player").hide();
}
}
function stopVideo() {
youtubePlayer.stopVideo();
}
$("#player").hide();
</script>
<script src="node_modules/fullcalendar/dist/fullcalendar.min.js"></script>
<script src="modules/underscore.min.js"></script>
<script src="modules/skycons.js"></script>
<script src="modules/clock.js"></script>
<script src="modules/main.js"></script>
</html>