Browse Source

Refactor map ui

pull/6/head
clerie 2 years ago
parent
commit
3d9e6a3bee
  1. 5
      wetter/static/wetter/css/wetter.css
  2. 2
      wetter/templates/index.html
  3. 2
      wetter/templates/station.html

5
wetter/static/wetter/css/wetter.css

@ -74,6 +74,11 @@ footer a { @@ -74,6 +74,11 @@ footer a {
background-color: rgba(0, 0, 0, 0.5);
}
/* Leaflet fixes*/
.leaflet-top, .leaflet-bottom {
z-index: 900 !important;
}
.leaflet-container a.btn {
color: #fff;
}

2
wetter/templates/index.html

@ -47,7 +47,7 @@ @@ -47,7 +47,7 @@
mymap.setView([stations[0]["lat"], stations[0]["lon"]], 6);
}
stations.forEach((station, i, j) => {
L.marker([station["lat"], station["lon"]]).addTo(mymap).bindPopup("<h3>" + station["name"] + "</h3><a href=\"/station/" + station["dwd_id"] + "/\" class=\"btn btn-primary\">Mehr</a>");
L.marker([station["lat"], station["lon"]]).addTo(mymap).bindPopup("<h3>" + station["name"] + "</h3><a href=\"/station/" + station["dwd_id"] + "/export/\" class=\"btn btn-secondary\">Export</a> <a href=\"/station/" + station["dwd_id"] + "/\" class=\"btn btn-primary\">Info</a>");
})
});
</script>

2
wetter/templates/station.html

@ -73,7 +73,7 @@ @@ -73,7 +73,7 @@
mymap.setView([stations[0]["lat"], stations[0]["lon"]], 6);
}
stations.forEach((station, i, j) => {
L.marker([station["lat"], station["lon"]]).addTo(mymap).bindPopup("<h3>" + station["name"] + "</h3><a href=\"/station/" + station["dwd_id"] + "/\" class=\"btn btn-primary\">Mehr</a>");
L.marker([station["lat"], station["lon"]]).addTo(mymap);
})
});
</script>

Loading…
Cancel
Save