WIP WIP WIP *** Now with tabs

This commit is contained in:
rxf
2023-03-15 16:08:33 +01:00
parent b270370105
commit 0a89e05329
9 changed files with 88 additions and 10 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ import { DateTime } from './luxon.min.js'
export const showDate = (sofort) => {
let d = DateTime.now()
if(sofort || d.second === 0) {
$('#h1datum').text(d.toFormat('yyyy-MM-dd HH:mm'))
document.querySelector('#h1datum').setHTML(d.toFormat('yyyy-MM-dd HH:mm'))
}
}
+14 -3
View File
@@ -4,7 +4,7 @@
import * as map from './map.js'
import * as dt from './datetime.js'
$(async() => {
(async function () {
// global constants
const Stuttgart = [48.779, 9.16]
const MAXROWS_IN_TABLE = 1000
@@ -28,13 +28,24 @@ $(async() => {
async function main() {
// initialise tabs
let triggerTabList = [].slice.call(document.querySelectorAll('#myTab a'))
triggerTabList.forEach(function (triggerEl) {
let tabTrigger = new bootstrap.Tab(triggerEl)
triggerEl.addEventListener('click', function (event) {
event.preventDefault()
tabTrigger.show()
})
})
// show dat/time at start
dt.showDate(true)
// and show date/time every minute
setInterval(() => dt.showDate(false), 1000)
// show version and version-date
$('#versn').text(`Version: ${sysparams.version} vom ${sysparams.date.slice(0,10)}`)
document.querySelector('#versn').setHTML(`Version: ${sysparams.version} vom ${sysparams.date.slice(0,10)}`)
// show the map
map.showMap(params)
@@ -42,4 +53,4 @@ $(async() => {
}
main().catch(console.error)
})
})()
+1 -1
View File
@@ -250,7 +250,7 @@ export async function buildMarkers() {
markers.addLayer(marker);
}
map.addLayer(markers);
showLastDate(sensors.lastDate);
// ToDo showLastDate(sensors.lastDate);
}
+18
View File
@@ -43,6 +43,24 @@ header #h1name {
}
header #h1datum {
float: right;
margin-top: 5px;
}
#fenster {
margin-top: 45px;
background: lightgray;
padding-top: 5px;
}
#fenster #navi {
float: left;
margin-left: 1%;
}
#fenster #buttonsRight {
float: right;
margin-right: 1%;
}
#fenster #buttonsRight #btnSet {
margin-right: 20px;
}
#map {
+1 -1
View File
@@ -1 +1 @@
{"version":3,"sourceRoot":"","sources":["style.sass"],"names":[],"mappings":"AAUA;EACE;EACA;EACA;EACA;EACA;EACA;EACA,kBAfW;;;AAiBb;EACE;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA;;AAEA;EACE;EACA;EACA;;AAEF;EACE;EACA;EACA;EACA;;AAEF;EACE;;;AAGJ;EACE;EACA;EACA;EACA;EACA,eA1Dc;EA2Dd;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAEF;EACE;;;AAGJ;EACE;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA","file":"style.css"}
{"version":3,"sourceRoot":"","sources":["style.sass"],"names":[],"mappings":"AAUA;EACE;EACA;EACA;EACA;EACA;EACA;EACA,kBAfW;;;AAiBb;EACE;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA;;AAEA;EACE;EACA;EACA;;AAEF;EACE;EACA;EACA;EACA;;AAEF;EACE;EACA;;;AAEJ;EACE;EACA;EACA;;AAEA;EACE;EACA;;AAEF;EACE;EACA;;AACA;EACE;;;AAEN;EACE;EACA;EACA;EACA;EACA,eAzEc;EA0Ed;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAEF;EACE;;;AAGJ;EACE;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA","file":"style.css"}
+15
View File
@@ -49,7 +49,22 @@ header
#h1datum
float: right
margin-top: 5px
#fenster
margin-top: 45px
background: lightgray
padding-top: 5px
#navi
float: left
margin-left: 1%
#buttonsRight
float: right
margin-right: 1%
#btnSet
margin-right: 20px
#map
margin-left: 1vw