generated from workadventure/map-starter-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
92 lines (82 loc) · 4.05 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
<html>
<head>
<link href="https://fonts.googleapis.com/css?family=Press+Start+2P" rel="stylesheet">
<link href="https://unpkg.com/[email protected]/css/nes.min.css" rel="stylesheet" />
<style>
.margin-constraint {
/*On indique tout simplement une marge*/
margin-left: 20px;
margin-right: 20px;
}
.useful-width {
/*On règle ensuite la largeur utile puis on centre*/
max-width: 800px;
margin-left: auto;
margin-right: auto;
}
.margin-constraint,
.useful-width {
/*Si vous utilisez uniquement des div, cette dernière règle css n'est même pas nécessaire*/
display: block;
width: auto;
}
</style>
<script>
window.onload = function () {
var path = window.location.pathname;
if (path.endsWith('index.html')) {
path = path.substr(path, path.length - 'index.html'.length);
}
var url = 'https://play.world.fem-net.de/_/global/' + window.location.host + path + 'Einlass.json';
var mapUrl = window.location.protocol + '//' + window.location.host + path + 'Einlass.json';
document.getElementById('mapUrl').innerText = mapUrl;
var gettingStartedLink = 'https://workadventu.re/getting-started?name=Map&mapUrl=' + mapUrl;
document.getElementById('gettingStartedLink').href = gettingStartedLink;
document.querySelectorAll('.mapProvider').forEach(function (item) {
var mapName = item.dataset.map;
var itemUrl = 'https://play.world.fem-net.de/_/global/' + window.location.host + path + mapName;
item.href = itemUrl;
item.innerHTML = itemUrl;
});
};
</script>
</head>
<body>
<div class="useful-width">
<div style="text-align: center; margin-top: 3rem">
<img src="https://workadventu.re/img/logo.png" alt="" />
</div>
<div class="nes-container with-title is-centered" style="margin-top: 3rem">
<p class="title">WorkAdventure map</p>
<p>This website contains a map for <a href="https://workadventu.re">Workadventu.re</a>.</p>
</div>
<div class="nes-container with-title is-centered" style="margin-top: 1rem">
<p class="title">Test this map</p>
<p>You can test this map at <a class="mapProvider" target="_blank" data-map="Einlass.json" href=""></a>.</p>
</div>
<div class="nes-container with-title is-centered" style="margin-top: 1rem">
<p class="title">Test this map</p>
<p>You can test this map at <a class="mapProvider" target="_blank" data-map="WapuginaFlur.json" href=""></a>.</p>
</div>
<div class="nes-container with-title is-centered" style="margin-top: 1rem">
<p class="title">Test this map</p>
<p>You can test this map at <a class="mapProvider"target="_blank" data-map="Rumpelgasse.json" href=""></a>.</p>
</div>
<div class="nes-container with-title is-centered" style="margin-top: 1rem">
<p class="title">Test this map</p>
<p>You can test this map at <a class="mapProvider" target="_blank" data-map="serverroom.json" href=""></a>.</p>
</div>
<div class="nes-container with-title is-centered" style="margin-top: 1rem">
<p class="title">Test this map</p>
<p>You can test this map at <a class="mapProvider" target="_blank" data-map="cyberspace.json" href=""></a>.</p>
</div>
<div class="nes-container with-title is-centered" style="margin-top: 1rem">
<p class="title">Happy with the result?</p>
<p>Register your room on Workadventu.re.</p>
<p><a id="gettingStartedLink" href="" class="nes-btn is-primary">Create a new room</a></p>
<p>or copy and paste the map URL in WorkAdventu.re's administration panel:</p>
<p><span id="mapUrl" style="color: gray" /></p>
</div>
</div>
</body>
</html>