-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
243 lines (224 loc) · 12.5 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
<!DOCTYPE html>
<html lang="de">
<head>
<title>Michi′s Escape Room</title>
<link rel="icon" type="image/png" href="graphics/media/1.png">
<link rel="shortcut icon" type="image/png" href="graphics/media/1.png">
<link rel="apple-touch-icon" href="graphics/media/1.png">
<link rel="apple-touch-icon" sizes="152x152" href="graphics/media/1.png">
<link rel="apple-touch-icon" sizes="180x180" href="graphics/media/1.png">
<link rel="apple-touch-icon" sizes="167x167" href="graphics/media/1.png">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://d3js.org/d3.v6.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.1/css/all.min.css">
<link rel="stylesheet" type="text/css" href="style.css">
<meta charset="UTF-8">
<meta name="description" content="Sie müssen einen siebenstelligen Zahlencode finden um das Gebäude in möglichst kurzer Zeit zu verlassen.">
<meta name="keywords" content="Escape, Escape Room, Exit Room, Room, Michis Escape Room, Michi Escape Room, Escape Room Michi, Ausbrechen, Raum, Spiel, Browserspiel, Game, Gaming, Michi, Michi von Ah, von Ah, Freizeit, Schule, Abschlussarbeit, Abschlussprojekt, kostenlos, Pixabay">
<meta name="author" content="Michi von Ah">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0">
<meta name="robots" content="index, follow"/>
<meta name="google-site-verification" content="UOcSicNBhJAeZ_o2zcUaNZXlBA4FCknLXh913uR6OsM"/>
<meta name="msvalidate.01" content="1ABF99965126559C41B4E05536561180"/>
<meta property="og:title" content="Michi's Escape Room">
<meta property="og:description" content="Sie müssen einen siebenstelligen Zahlencode finden um das Gebäude in möglichst kurzer Zeit zu verlassen.">
<meta property="og:image" itemprop="image" content="https://escape.michivonah.ch/graphics/media/1.png">
<meta property="og:image:type" content="image/png">
<meta property="og:url" content="https://escape.michivonah.ch">
<meta property="og:site_name" content="Michi's Escape Room">
<meta property="og:type" content="website">
<meta property="twitter:title" content="Michi's Escape Room">
<meta property="twitter:description" content="Sie müssen einen siebenstelligen Zahlencode finden um das Gebäude in möglichst kurzer Zeit zu verlassen.">
<meta property="twitter:image" content="https://escape.michivonah.ch/graphics/media/2.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image:alt" content="Michi's Escape Room Logo">
<meta name="twitter:creator" content="@michivonah"/>
<meta name="msapplication-TileImage" content="https://escape.michivonah.ch/graphics/media/1.png">
<link rel="manifest" href="manifest.json">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans&display=swap" rel="stylesheet">
<script defer src="https://data.mchvnh.ch/script.js" data-website-id="6cd03368-20ea-49fd-8b5d-632833a3c942"></script>
</head>
<body>
<div id="loading-screen">
<div id="loader">
<img src="graphics/rooms/kitchen/teddy1.png">
</div>
</div>
<div id="content">
<div class="inner-width">
<div id="header">
<h1>Michi′s Escape Room</h1>
<div id="description">
<p id="desc-small">Sie müssen das Gebäude möglichst schnell verlassen. Mit den Pfeilen unten links und rechts können sie zwischen den Räumen hin und her wechseln. Durch anklicken einiger Gegenständen, können sie mit ihnen interagiere...<a onclick="showDesc();">Mehr anzeigen.</a></p>
<p id="desc-full" style="display:none;">Sie müssen das Gebäude möglichst schnell verlassen. Mit den Pfeilen unten links und rechts können sie zwischen den Räumen hin und her wechseln. Durch anklicken einiger Gegenständen, können sie mit ihnen interagieren oder sie einsammeln. Sie müssen den <strong>siebenstelligen</strong> geheimen Zahlencode herausfinden und am Schluss bei der Tür eingeben. Die Zahlen sind versteckt halten sie also Ihre Augen gut offen. Geschafft? Sie sehen am Schluss wie lange sie hatten und können es erneut versuchen um Ihre Zeit zu verbessern. Bei Fehlern, Problemen oder Feedback kontaktieren Sie mich unter <a href="mailto:escape@michivonah.ch?subject=Problem%20mit%20Michi%27s%20Escape%20Room">escape@michivonah.ch</a>. Rechtliches finden Sie <a href="https://legal.michivonah.ch/">hier</a>. <a onclick="showDesc();">Weniger anzeigen!</a></p>
</div>
</div>
<div id="fullscreen-area">
<div id="game-container">
<iframe id="game-frame" src="game.html" title="Escape Room" allowfullscreen="true" scrolling="no">Error, game can′t load.</iframe>
</div>
<div id="gameplay-options">
<button id="share-btn" onclick="toggleShare()"><i class="fas fa-share-alt"></i></button>
<button id="reload-btn" onclick="reloadGame()"><i class="fas fa-redo"></i></button>
<button id="fullscreen-btn" onclick="toggleFullscreen()"><i class="fas fa-expand" id="fullscreen-icon"></i></button>
</div>
<div id="share-btns">
<button onclick="share('twitter')"><i class="fab fa-twitter"></i></button>
<button onclick="share('facebook')"><i class="fab fa-facebook"></i></button>
<button onclick="share('reddit')"><i class="fab fa-reddit"></i></button>
<button onclick="share('whatsapp')"><i class="fab fa-whatsapp"></i></button>
<button onclick="share('mail')"><i class="fas fa-envelope"></i></button>
<button onclick="share('qrcode')"><i class="fas fa-qrcode"></i></button>
</div>
</div>
</div>
</div>
<div id="screensize-error">
<i class="fas fa-times-circle"></i>
<h1>Bitte drehen Sie das Gerät um das Spiel zu spielen. Das Spiel unterstützt nur das Querformat.</h1>
</div>
<script>
// Loading
window.addEventListener('load', () => {
$("#loading-screen").fadeOut(800);
if(window.matchMedia('(prefers-color-scheme: dark)').matches || localStorage.getItem('darkmode') == "true"){
document.body.style.setProperty('--color', '#f2f2f2');
document.body.style.setProperty('--background', '#181818');
document.body.style.setProperty('--theme', '#e67e22');
console.log('Darkmode activated.');
}
if('serviceWorker' in navigator) {
navigator.serviceWorker.register('/service-worker.js');
}
console.log("Page loaded.");
});
/*$(document).keyup(function(e){
if(e.key === "Escape"){
if(document.fullscreen == true){
closeFullscreen();
console.log('Fullscreen closed with Escape Key')
}
alert(e.key);
}
});*/
document.getElementById('fullscreen-area').addEventListener('fullscreenchange', (event) => {
if(document.fullscreenElement){
console.log('Fullscreen opened');
}
else{
closeFullscreen();
}
});
function fullscreen(){
var game = document.getElementById("fullscreen-area");
var gameFrame = document.getElementById("game-frame");
var fullScreenBtn = document.getElementById('fullscreen-btn');
var fullScreenBtnIcon = document.getElementById('fullscreen-icon');
//game.style.paddingTop = "15vh";
if($(window).height() <= 600){
gameFrame.style.maxWidth = "calc(100vw * 0.8)";
gameFrame.style.maxHeight = "calc(100vw * 0.6)";
}
else{
gameFrame.style.maxWidth = "calc(100vw * 0.75)";
gameFrame.style.maxHeight = "calc(100vw * 0.5625)";
}
//gameFrame.style.maxWidth = "80vw";
//gameFrame.style.maxHeight = "60vw";
gameFrame.style.width = "100vw";
gameFrame.style.height = "100vh";
fullScreenBtn.style.position = "absolute";
fullScreenBtn.style.bottom = "15px";
fullScreenBtn.style.right = "15px";
fullScreenBtnIcon.className = "fas fa-compress";
if(game.requestFullscreen){
game.requestFullscreen();
}
else if(game.webkitRequestFullscreen){
game.webkitRequestFullscreen();
}
}
function closeFullscreen(){
var game = document.getElementById("fullscreen-area");
var gameFrame = document.getElementById("game-frame");
var fullScreenBtn = document.getElementById('fullscreen-btn');
var fullScreenBtnIcon = document.getElementById('fullscreen-icon');
//game.style.paddingTop = "0";
gameFrame.style.maxWidth = "calc(1100px * 0.8)";
gameFrame.style.maxHeight = "calc(1100px * 0.6)";
gameFrame.style.width = "80%";
gameFrame.style.height = "60vw";
fullScreenBtn.style.position = "static";
fullScreenBtnIcon.className = "fas fa-expand";
if(document.exitFullscreen){
document.exitFullscreen();
}
else if(document.webkitExitFullscreen){
document.webkitExitFullscreen();
}
}
function toggleFullscreen(){
if(document.fullscreen == false){
fullscreen();
console.log('Fullscreen opened')
}
else{
closeFullscreen();
console.log('Fullscreen closed')
}
}
function reloadGame(){
//location.reload();
var gameFrame = document.getElementById("game-frame");
gameFrame.src = gameFrame.src;
}
function toggleShare(){
var shareButtons = document.getElementById('share-btns');
if(shareButtons.style.display == "block"){
window.scrollTo(0, 0);
shareButtons.style.display = "none";
}
else{
shareButtons.style.display = "block";
window.scrollTo(0, 200);
}
}
function share(service){
if(service == null){
console.log("Error");
}
else if(service == "qrcode"){
window.open('https://escape.michivonah.ch/graphics/media/qrcode-escaperoom.png');
}
else if(service == "twitter"){
window.open('https://twitter.com/intent/tweet?status=Ihr%20müsst%20unbedingt%20das%20Spiel%20Michi%27s%20Escape%20Room%20spielen.%20Ihr%20findet%20es%20unter%20escape.michivonah.ch!');
}
else if(service == "facebook"){
window.open('https://www.facebook.com/sharer/sharer.php?u=https://escape.michivonah.ch');
}
else if(service == "reddit"){
window.open('http://www.reddit.com/submit?url=https://escape.michivonah.ch');
}
else if(service == "mail"){
window.open("mailto:?subject=Michi%27s%20Escape%20Room&body=Ihr%20müsst%20unbedingt%20das%20Spiel%20Michi%27s%20Escape%20Room%20spielen.%20Ihr%20findet%20es%20unter%20escape.michivonah.ch!");
}
else if(service == "whatsapp"){
window.open('https://api.whatsapp.com/send?text=Ihr%20m%C3%BCsst%20unbedingt%20das%20Spiel%20Michi%27s%20Escape%20Room%20spielen.%20Ihr%20findet%20es%20unter%20escape.michivonah.ch!');
}
}
function showDesc(){
var description = document.getElementById('description');
var descriptionFull = document.getElementById('desc-full');
var descriptionSmall = document.getElementById('desc-small');
if(descriptionFull.style.display == "none"){
descriptionFull.style.display = "block";
descriptionSmall.style.display = "none";
}
else{
descriptionFull.style.display = "none";
descriptionSmall.style.display = "block";
}
}
</script>
</body>
</html>