Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
bebraw committed Jun 19, 2021
0 parents commit 058b83f
Show file tree
Hide file tree
Showing 13 changed files with 7,123 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/build-and-deploy.yml
@@ -0,0 +1,55 @@
name: Optimize map and deploy

on:
- push

jobs:

deploy:

runs-on: ubuntu-latest

steps:

- name: Checkout
uses: actions/checkout@v2

- name: Optimize map
uses: thecodingmachine/map-optimizer-action@master

- uses: actions/setup-node@v2
with:
node-version: '14.x'
registry-url: 'https://registry.npmjs.org'

- name: "Install dependencies"
run: npm install

- name: "Build scripts"
run: npm run build

- name: "Move scripts"
run: mv dist/* .

- name: Bash
if: github.ref == 'refs/heads/master'
run: |
ls -al
git config --global user.email "d.negrier@thecodingmachine.com"
git config --global user.name "David Négrier"
git checkout master
git add .
git commit -am "Adding files"
- name: Deploy
uses: JamesIves/github-pages-deploy-action@releases/v3
if: github.ref == 'refs/heads/master'
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: . # The folder the action should deploy.
BASE_BRANCH: master

- name: Bash2
run: |
ls -al
1 change: 1 addition & 0 deletions .gitignore
@@ -0,0 +1 @@
/node_modules/
6 changes: 6 additions & 0 deletions README.md
@@ -0,0 +1,6 @@
# WorkAdventure Map Starter Kit

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).

Binary file added floortileset.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 58 additions & 0 deletions index.html
@@ -0,0 +1,58 @@
<html>
<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() {
let path = window.location.pathname;
if (path.endsWith('index.html')) {
path = path.substr(path, path.length - 'index.html'.length);
}
const url = 'https://play.workadventu.re/_/global/'+window.location.host+path+'map.json?alone=true';
document.getElementById('mapLink').href = url;
document.getElementById('mapLink2').href = url;
document.getElementById('mapLink').innerText = url;

const mapUrl = window.location.protocol+'//'+window.location.host+path+'map.json';
document.getElementById('mapUrl').innerText = mapUrl;

const gettingStartedLink = 'https://workadventu.re/getting-started?name=Map&mapUrl='+mapUrl;
document.getElementById('gettingStartedLink').href = gettingStartedLink;

};
</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 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" /></p>
</div>
</div>
</body>
</html>
908 changes: 908 additions & 0 deletions map.json

Large diffs are not rendered by default.

0 comments on commit 058b83f

Please sign in to comment.