You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
2.8 KiB

<link href="" rel="stylesheet">
<link href="" rel="stylesheet" />
/* center the html elements */
max-width: 800px;
margin-left: auto;
margin-right: auto;
window.onload = function() {
const 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 = `${instanceId}/${host}${path}map.json`;
document.getElementById('mapLink').href = url;
document.getElementById('mapLink2').href = url;
document.getElementById('mapLink').innerText = url;
const mapUrl = window.location.protocol+'//''map.json';
document.getElementById('mapUrl').innerText = mapUrl;
const gettingStartedLink = ''+mapUrl;
document.getElementById('gettingStartedLink').href = gettingStartedLink;
<div class="useful-width">
<div style="text-align: center; margin-top: 3rem">
<img src="" alt=""/>
<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=""></a>.</p>
<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 class="nes-container with-title is-centered" style="margin-top: 1rem">
<p class="title">Happy with the result?</p>
<p>Register your room on</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's administration panel:</p>
<p><span id="mapUrl" style="color: gray" /></p>