fix sticky menu
This commit is contained in:
parent
bb611d7d81
commit
4558894282
18
main.js
18
main.js
@ -753,7 +753,16 @@
|
||||
location.href = link.href
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
function addStickyHeaderToMainList() {
|
||||
let topMenu = document.querySelector(".large-menu")
|
||||
let table = document.querySelector("#props")
|
||||
if (topMenu) {
|
||||
let caption = document.createElement("caption")
|
||||
caption.appendChild(topMenu)
|
||||
table.prepend(caption)
|
||||
}
|
||||
}
|
||||
|
||||
function addFullscreenButton() {
|
||||
@ -768,11 +777,13 @@
|
||||
}
|
||||
|
||||
let styles = `
|
||||
.large-menu {
|
||||
#props caption {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
background: white;
|
||||
|
||||
.large-menu {
|
||||
background: white;
|
||||
}
|
||||
}
|
||||
|
||||
#content-wrapper {
|
||||
@ -1167,6 +1178,7 @@
|
||||
addJs('https://api.mapbox.com/mapbox.js/plugins/leaflet-fullscreen/v1.0.1/Leaflet.fullscreen.min.js')
|
||||
addCss('https://api.mapbox.com/mapbox.js/plugins/leaflet-fullscreen/v1.0.1/leaflet.fullscreen.css')
|
||||
|
||||
addStickyHeaderToMainList()
|
||||
addFullscreenButton()
|
||||
|
||||
if (!isEditCpPage()) {
|
||||
|
Loading…
Reference in New Issue
Block a user