mirror of
https://gitlab.com/dezentrale/workadventure/maps.git
synced 2025-05-28 16:14:26 +00:00
added local startup from workadventure starter kit
This commit is contained in:
parent
38b0a35868
commit
2cafe08d39
17 changed files with 9366 additions and 1 deletions
60
index.html
Normal file
60
index.html
Normal file
|
@ -0,0 +1,60 @@
|
|||
<html lang="de-DE">
|
||||
<head>
|
||||
<link href="https://fonts.googleapis.com/css?family=Press+Start+2P" rel="stylesheet">
|
||||
<link href="https://unpkg.com/nes.css@2.3.0/css/nes.min.css" rel="stylesheet" />
|
||||
<style>
|
||||
.useful-width{
|
||||
/* center the html elements */
|
||||
max-width: 800px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
window.onload = function() {
|
||||
const host = window.location.host;
|
||||
let path = window.location.pathname;
|
||||
if (path.endsWith('index.html')) {
|
||||
path = path.substr(path, path.length - 'index.html'.length);
|
||||
}
|
||||
const instanceId = Math.random().toString(36).substring(2, 15);
|
||||
const url = `https://play.workadventu.re/_/${instanceId}/${host}${path}main.json`;
|
||||
document.getElementById('mapLink').href = url;
|
||||
document.getElementById('mapLink2').href = url;
|
||||
document.getElementById('mapLink').innerText = url;
|
||||
|
||||
const mapUrl = window.location.protocol+'//'+window.location.host+path+'main.json';
|
||||
document.getElementById('mapUrl').innerText = mapUrl;
|
||||
|
||||
document.getElementById('gettingStartedLink').href = 'https://workadventu.re/getting-started?name=Map&mapUrl=' + mapUrl;
|
||||
|
||||
};
|
||||
</script>
|
||||
<title></title>
|
||||
</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 id="mapLink" href=""></a>.</p>
|
||||
<p><a id="mapLink2" href="" class="nes-btn is-primary">Test this map</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"></span></p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue