feat(web): web server and basic dashboard
This commit is contained in:
7
map-generator/static/bootstrap.min.css
vendored
Normal file
7
map-generator/static/bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
map-generator/static/bootstrap.min.css.map
Normal file
1
map-generator/static/bootstrap.min.css.map
Normal file
File diff suppressed because one or more lines are too long
7
map-generator/static/bootstrap.min.js
vendored
Normal file
7
map-generator/static/bootstrap.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
map-generator/static/bootstrap.min.js.map
Normal file
1
map-generator/static/bootstrap.min.js.map
Normal file
File diff suppressed because one or more lines are too long
18
map-generator/static/script.js
Normal file
18
map-generator/static/script.js
Normal file
@ -0,0 +1,18 @@
|
||||
const mapSettings = document.getElementById('map-settings');
|
||||
//const board = document.getElementById('board');
|
||||
const map = document.getElementById('map');
|
||||
const spinner = document.getElementById('spinner');
|
||||
|
||||
mapSettings.addEventListener('submit', (e) => {
|
||||
console.log('form submit');
|
||||
e.preventDefault();
|
||||
|
||||
spinner.classList.remove('d-none');
|
||||
map.src = '/map?q=' + (new Date()).getTime();
|
||||
map.classList.add('d-none');
|
||||
});
|
||||
|
||||
map.addEventListener('load', () => {
|
||||
spinner.classList.add('d-none');
|
||||
map.classList.remove('d-none');
|
||||
});
|
14
map-generator/static/style.css
Normal file
14
map-generator/static/style.css
Normal file
@ -0,0 +1,14 @@
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html, body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
aside {
|
||||
text-align: center;
|
||||
width: 300px;
|
||||
height: 100vh;
|
||||
}
|
||||
|
Reference in New Issue
Block a user