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