-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
54 lines (49 loc) · 2.74 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Gumple Rush</title>
<link href="css/master.css" rel="stylesheet" charset="utf-8">
<link href='https://fonts.googleapis.com/css?family=Press+Start+2P' rel='stylesheet'>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes">
<link rel="manifest" href="manifest.json">
<link rel="icon" href="ikona.png">
</head>
<body>
<h1>Gümple Rush</h1>
<iframe id="hra" frameBorder="0" scrolling="no" height="576" width="1024" src="hra.html" allowfullscreen style="display: block;margin: auto"></iframe>
<script>
//detekce mobilu
if (typeof window.orientation !== 'undefined') {
if (confirm("Jste-li na mobilu, doporučujeme použít naši mobilní verzi hry.\nChcete na ni přejít?") == true) {
window.location.href = "hra.html";
}
}
//detekce času + změna pozadí
function zmenaPozadi() {
var ted = new Date();
var hodiny = ted.getHours();
if (hodiny >= 3 && hodiny <= 5) {
document.body.style.background = "#315628 url(https://rawcdn.githack.com/alanwright/BitDay/9b2f678920327b1e4829c34dd8917192ac06e836/img/1.png) no-repeat center center";
} else if (hodiny <= 8) {
document.body.style.background = "#4C873E url(https://rawcdn.githack.com/alanwright/BitDay/9b2f678920327b1e4829c34dd8917192ac06e836/img/2.png) no-repeat center center";
} else if (hodiny <= 11) {
document.body.style.background = "#73CD5F url(https://rawcdn.githack.com/alanwright/BitDay/9b2f678920327b1e4829c34dd8917192ac06e836/img/3.png) no-repeat center center";
} else if (hodiny <= 15) {
document.body.style.background = "#3D6B31 url(https://rawcdn.githack.com/alanwright/BitDay/9b2f678920327b1e4829c34dd8917192ac06e836/img/4.png) no-repeat center center";
} else if (hodiny <= 17) {
document.body.style.background = "#284620 url(https://rawcdn.githack.com/alanwright/BitDay/9b2f678920327b1e4829c34dd8917192ac06e836/img/5.png) no-repeat center center";
} else if (hodiny <= 19) {
document.body.style.background = "#1C071C url(https://rawcdn.githack.com/alanwright/BitDay/9b2f678920327b1e4829c34dd8917192ac06e836/img/6.png) no-repeat center center";
} else if (hodiny <= 21) {
document.body.style.background = "#07060B url(https://rawcdn.githack.com/alanwright/BitDay/9b2f678920327b1e4829c34dd8917192ac06e836/img/7.png) no-repeat center center";
} else {
document.body.style.background = "#0B090E url(https://rawcdn.githack.com/alanwright/BitDay/9b2f678920327b1e4829c34dd8917192ac06e836/img/8.png) no-repeat center center";
}
document.body.style.backgroundSize = "cover";
}
zmenaPozadi();
</script>
</body>
</html>