This commit is contained in:
2021-12-16 10:59:20 +01:00
commit 386b385b69
26 changed files with 16712 additions and 0 deletions
+4
View File
@@ -0,0 +1,4 @@
.local
test
member/*
member.json
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 654 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 519 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

+6701
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1478
View File
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
+11
View File
File diff suppressed because one or more lines are too long
+134
View File
@@ -0,0 +1,134 @@
<!doctype html>
<html lang="en">
<head>
<script src="/iframe_api.js"></script>
<link href="./css/nes.min.css" type="text/css" rel="stylesheet" />
<style>
body {
padding: 15px;
background-color:#212529;
}
#panel {
margin: 15px auto;
width: 100%;
max-width: 300px;
}
#panel p {
text-transform: uppercase;
}
#buttons {
margin: 15px auto;
width: 100%;
max-width: 400px;
}
#buttons-rooms {
display: flex;
flex-direction: column-reverse;
flex-wrap: wrap;
}
#buttons-rooms>a {
flex-basis: 100%;
flex-shrink: 0;
}
#buttons-controls {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
justify-content: space-between;
}
</style>
</head>
<body>
<div id="buttons" class="nes-container">
<div id="buttons-rooms">
</div>
<div id="buttons-controls">
<a class="nes-btn">↔️</a>
<a class="nes-btn">↕️</a>
<a class="nes-btn is-error">🔔</a>
</div>
</div>
<div id="panel" class="nes-container is-dark with-title is-centered">
<p class="title">Elevator</p>
<p>In case of emergency please press and hold the alarm button for 5 seconds.</p>
</div>
<script>
let rooms = [
{
'room': 'clubhaus_downstairs.json',
'name': 'downstairs'
}, {
'room': 'clubhaus.json',
'name': 'main floor'
}, {
'room': 'clubhaus_upstairs.json',
'name': 'first floor'
}, {
'room': 'clubhaus_roof.json',
'name': 'roof'
}
];
let firstIndex = -1;
let buttons = document.getElementById("buttons-rooms");
WA.onInit().then(() => {
let roomId = WA.room.id;
let currentIndex = -1;
for (let i = 0; i < rooms.length; i++) {
let room = rooms[i];
let index = i + firstIndex;
let button = document.createElement("a");
button.id = i;
button.classList.add("nes-btn");
button.innerHTML = index + " " + room.name;
buttons.appendChild(button);
if (roomId.endsWith(room.room)) {
button.disabled = true;
button.classList.add('is-disabled');
currentIndex = i;
}
button.addEventListener('click', function (event) {
let button = event.target;
if (!button.disabled) {
let index = button.id;
let room = rooms[index];
let diff = index - currentIndex;
if (currentIndex > index) {
diff = currentIndex - index;
}
for (let i = 0; i < rooms.length; i++) {
let b = document.getElementById(i);
b.disabled = true;
b.classList.add('is-disabled');
}
setTimeout(function () {
WA.nav.goToRoom(room.room + '#start_elevator');
}, diff * 2000);
}
})
}
});
</script>
</body>
</html>
File diff suppressed because one or more lines are too long