diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/public/javascripts/datetime.js b/public/javascripts/datetime.js
index 550cbc5..c53efcc 100644
--- a/public/javascripts/datetime.js
+++ b/public/javascripts/datetime.js
@@ -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'))
}
}
diff --git a/public/javascripts/global.js b/public/javascripts/global.js
index a0a03f8..49b5787 100644
--- a/public/javascripts/global.js
+++ b/public/javascripts/global.js
@@ -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)
-})
\ No newline at end of file
+})()
\ No newline at end of file
diff --git a/public/javascripts/map.js b/public/javascripts/map.js
index 4f40518..0215126 100644
--- a/public/javascripts/map.js
+++ b/public/javascripts/map.js
@@ -250,7 +250,7 @@ export async function buildMarkers() {
markers.addLayer(marker);
}
map.addLayer(markers);
- showLastDate(sensors.lastDate);
+// ToDo showLastDate(sensors.lastDate);
}
diff --git a/public/stylesheets/style.css b/public/stylesheets/style.css
index 57ad2b3..b4ec14b 100644
--- a/public/stylesheets/style.css
+++ b/public/stylesheets/style.css
@@ -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 {
diff --git a/public/stylesheets/style.css.map b/public/stylesheets/style.css.map
index 338b3a6..6127f7c 100644
--- a/public/stylesheets/style.css.map
+++ b/public/stylesheets/style.css.map
@@ -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"}
\ No newline at end of file
+{"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"}
\ No newline at end of file
diff --git a/public/stylesheets/style.sass b/public/stylesheets/style.sass
index f6a460e..aed6785 100644
--- a/public/stylesheets/style.sass
+++ b/public/stylesheets/style.sass
@@ -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
diff --git a/views/index.pug b/views/index.pug
index 1815b77..1a92f6e 100644
--- a/views/index.pug
+++ b/views/index.pug
@@ -3,8 +3,38 @@ extends layout
block content
header
#hline1
- #h1name Lärm-Messung
+ #h1name Noise Measurement
#h1datum
+ #fenster
+ #navi
+ ul.nav.nav-tabs#tablist
+ li.nav-item(role='presentation')
+ button.nav-link.active#kartentab(data-bs-toggle="tab" data-bs-target="#t_map" type="button" role="tab" aria-controls="map" aria-selected="true") Map
+ li.nav-item(role='presentation')
+ button.nav-link.active#livetab(data-bs-toggle="tab" data-bs-target="#t_live" type="button" role="tab" aria-controls="live" aria-selected="true") Live
+ li.nav-item(role='presentation')
+ button.nav-link.active#houravgtab(data-bs-toggle="tab" data-bs-target="#t_houravg" type="button" role="tab" aria-controls="houravg" aria-selected="true") Hour_AVG
+ li.nav-item(role='presentation')
+ button.nav-link.active#dayavgtab(data-bs-toggle="tab" data-bs-target="#t_dayavg" type="button" role="tab" aria-controls="dayavg" aria-selected="true") Day_AVG
+ li.nav-item(role='presentation')
+ button.nav-link.active#daynightab(data-bs-toggle="tab" data-bs-target="#t_daynight" type="button" role="tab" aria-controls="daynight" aria-selected="true") Day_Night
+ li.nav-item(role='presentation')
+ button.nav-link.active#ldenab(data-bs-toggle="tab" data-bs-target="#t_lden" type="button" role="tab" aria-controls="lden" aria-selected="true") LDEN-Index
+ #buttonsRight
+ button.btn.btn-primary#btnSet(value='set') Settings
+ button.btn.btn-primary#btnHelp(value='help') Info
- #map
\ No newline at end of file
+ .tab-content#thetabs
+ .tab-pane.fade.show.active#t_map(role="tabpanel" aria-labelledby="map-tab")
+ #map MapTAB
+ .tab-pane.fade.show.active#t_live(role="tabpanel" aria-labelledby="map-tab")
+ #placeholderNOI1 LiveTAB
+ .tab-pane.fade.show.active#t_houravg(role="tabpanel" aria-labelledby="map-tab")
+ #placeholderNOI2 HourTAB
+ .tab-pane.fade.show.active#t_dayavg(role="tabpanel" aria-labelledby="map-tab")
+ #placeholderNOI3 DayTAB
+ .tab-pane.fade.show.active#t_daynight(role="tabpanel" aria-labelledby="map-tab")
+ #placeholderNOI4 DayNightTAB
+ .tab-pane.fade.show.active#t_lden(role="tabpanel" aria-labelledby="map-tab")
+ #placeholderNOI5 LdenTAB
diff --git a/views/layout.pug b/views/layout.pug
index ee79e62..6cd4cd3 100644
--- a/views/layout.pug
+++ b/views/layout.pug
@@ -39,8 +39,6 @@ html
script(src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js"
integrity="sha384-kenU1KFdBIe4zVF0s0G1M5b4hcpxyD9F7jL+jjXkk+Q2h455rYXK/7HAuoJl+0I4"
crossorigin="anonymous")
- script(src="https://code.jquery.com/jquery-3.6.4.min.js"
- integrity="sha256-oP6HI9z1XaZNBrJURtCoUT5SUnxFr8s3BzRl+cbzUq8=" crossorigin="anonymous")
script(src="https://unpkg.com/leaflet@1.9.3/dist/leaflet.js"
integrity="sha256-WBkoXOwTeyKclOHuWtc+i2uENFpDZ9YPdf5Hf+D7ewM="
crossorigin="")