-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
46 lines (45 loc) · 2.24 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
<!DOCTYPE html>
<html lang="en" dir="ltr" id="klangschutzgebietde">
<head>
<meta charset="utf-8">
<title>klangschutzgebiet</title>
<meta name="description" content="Klanschutzgebiet is an experiment to bring modern electronic music to our small town.">
<meta name="author" content="Alexander Fahlke">
<meta name="keywords" content="klangschutzgebiet, techno, minimal, electro, techhouse, chillout, party, festival, uelzen">
<meta name="viewport" content="width=device-width">
<style type="text/css">
* { margin: 0; padding: 0; user-select: none; -khtml-user-select: none; -o-user-select: none; -moz-user-select: -moz-none; -webkit-user-select: none; -ms-user-select: none; }
html { background: url(background.jpg) no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; }
.overlay { width: 100%; height: 100%; position: absolute; }
.logo { background: url(logo.png) no-repeat; width: 400px; height: 346px; position: absolute; left: 80%; top: 50%; margin: -173px 0 0 -200px; z-index: -100; }
.speaker { bottom: 10px; left: 10px; width: 32px; height: 32px; position: absolute; display: hidden; }
</style>
</head>
<body>
<div class="overlay" id="mute">
<img src="speaker_on.png" class="speaker">
<div class="logo"></div>
</div>
<audio id="background_audio" autoplay loop>
<source src="background.mp3" type="audio/mpeg" />
<source src="background.ogg" type="audio/ogg" />
</audio>
<script type="text/javascript">
var audioElement = document.getElementById('background_audio');
var toggleElement = document.getElementById('mute');
var speakersymbol = document.getElementById("mute").getElementsByTagName("img");
toggleElement.addEventListener('click', function(toggle) { toggleMute(toggle); }, false);
toggleElement.addEventListener('touchstart', function(toggle) { toggleMute(toggle); }, false);
function toggleMute(toggle) {
toggle = toggle || window.event;
audioElement.muted = !audioElement.muted;
toggle.preventDefault();
if(speakersymbol[0].src == "speaker_on.png") {
speakersymbol[0].src = "speaker_off.png";
} else {
speakersymbol[0].src = "speaker_on.png";
}
}
</script>
</body>
</html>