Browse Source

Changed website map url style

Valdo Romao 3 months ago
parent
commit
e16c5d85a8
3 changed files with 13 additions and 15 deletions
  1. 2 4
      README.md
  2. 10 10
      index.html
  3. 1 1
      src/style.css

+ 2 - 4
README.md

@@ -1,11 +1,11 @@
 # WorkAdventure Map Starter Kit
 
+![map](./map.png)
+
 This is a starter kit to help you build your own map for [WorkAdventure](https://workadventu.re).
 
 To understand how to use this starter kit, follow the tutorial at [https://workadventu.re/map-building](https://workadventu.re/map-building).
 
-![map](./map.png)
-
 ## Installation
 
 With npm installed (comes with [node](https://nodejs.org/en/)), run the following commands into a terminal in the root directory of this project:
@@ -15,8 +15,6 @@ npm install
 npm run start
 ```
 
-The project will run at http://localhost:8080/
-
 ## Licenses
 
 This project contains multiple licenses as follows:

+ 10 - 10
index.html

@@ -21,14 +21,14 @@
             }
             const instanceId = Math.random().toString(36).substring(2, 15);
             const url = `https://play.workadventu.re/_/${instanceId}/${host}${path}map.json`;
-            document.getElementById('mapLink').href = url;
-            document.getElementById('mapLink2').href = url;
-            document.getElementById('mapLink').innerText = url;
+            document.getElementById('testMapURL').href = url;
+            document.getElementById('testMapBtnURL').href = url;
+            document.getElementById('testMapURL').innerText = url;
 
-            const mapUrl = window.location.protocol+'//'+window.location.host+path+'map.json';
-            document.getElementById('mapUrl').innerText = mapUrl;
+            const jsonURL = window.location.protocol+'//'+window.location.host+path+'map.json';
+            document.getElementById('jsonURL').innerText = jsonURL;
 
-            const gettingStartedLink = 'https://workadventu.re/getting-started?name=Map&mapUrl='+mapUrl;
+            const gettingStartedLink = 'https://workadventu.re/getting-started?name=Map&mapUrl='+jsonURL;
             document.getElementById('gettingStartedLink').href = gettingStartedLink;
 
         };
@@ -74,16 +74,16 @@
 
         <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>
+            <p>You can test this map at <a id="testMapURL" href="" class="url"></a></p>
+            <p><a id="testMapBtnURL" 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><a id="gettingStartedLink" href="" class="nes-btn is-primary">Publish this map</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>
+            <p><span id="jsonURL" class="url"></span></p>
         </div>
     </main>
     <footer><a href="https://workadventu.re/" target="_blank" title="workadventu.re">&copy; WorkAdventure</a></footer>

+ 1 - 1
src/style.css

@@ -94,7 +94,7 @@ a.button:hover {
 	margin:1rem auto;
 }
 
-a#mapLink {
+.url {
 	font-family: 'Courier New', Courier, monospace;
 	font-size: 14px;
 }