-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
71 lines (67 loc) · 2.58 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
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="title" content="Moin Saufnase!">
<meta name="description" content="Moin Saufnase!">
<meta name="keywords" content="moin, saufnase">
<meta name="robots" content="index, follow">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="language" content="German">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Moin Saufnase!</title>
<link rel="icon"
href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🍺</text></svg>">
<link rel="stylesheet" href="styles/main.css">
</head>
<body onload="nameFromSubfolder();" onclick="play('assets/opener.mp3')">
<main>
<h1 id="text"></h1>
</main>
<div class="fab-wrapper">
<input type="checkbox" />
<div class="fab"></div>
<div class="fac">
<h3>Personalisieren für deine Saufnase</h3>
<p>Gib einfach den Namen hinter saufna.se ein.</p>
<p>Zum Beispiel: saufna.se/max</p>
</div>
</div>
<footer>
<small>🍺 Philipp du Alkoholiker © <script>document.write(new Date().getFullYear());</script></small>
</footer>
<script>
function capitalize(string) {
return string.charAt(0).toUpperCase() + string.slice(1);
}
function nameFromSubfolder() {
if (window.location.pathname !== '/') {
let text = 'Moin ' + capitalize(window.location.pathname.split('/')[1]) + ' du Saufnase! 🍺';
document.getElementById("text").innerHTML = "Moin " + capitalize(window.location.pathname.split('/')[1]) + " du Saufnase! 🍺";
document.title = capitalize(window.location.pathname.split('/')[1]) + " - Saufnase! 🍺"
document.querySelector('meta[name="title"]').setAttribute("content", text);
document.querySelector('meta[name="description"]').setAttribute("content", text);
} else {
document.getElementById("text").innerHTML = "Moin Saufnase! 🍺";
}
}
function play(file) {
let audio = document.createElement('audio');
audio.src = file;
document.body.appendChild(audio);
audio.play();
audio.onended = function () {
this.parentNode.removeChild(this);
}
}
</script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-YHVGLGKMH1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-YHVGLGKMH1');
</script>
</body>
</html>