-
Notifications
You must be signed in to change notification settings - Fork 6
/
index.html
34 lines (34 loc) · 868 Bytes
/
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
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title>Vim Adventures in Elm</title>
<link rel="stylesheet" href="style.css">
<script src="main.js"></script>
</head>
<body>
<div class="terminal-window">
<header>
<div class="button green"></div>
<div class="button yellow"></div>
<div class="button red"></div>
</header>
<section class="terminal">
<div class="history"></div>
<div id="elm"></div>
</section>
</div>
<audio src="sfx/church-chime-daniel_simon.mp3" >
</audio>
<script>
var app = Elm.Main.init({
node: document.getElementById('elm')
});
app.ports.audio_event.subscribe(function(event) {
localStorage.setItem('cache', JSON.stringify(event));
});
var audio = new Audio('sfx/church-chime-daniel_simon.mp3');
audio.play();
</script>
</body>
</html>