diff --git a/main.js b/main.js index 0080dbb..9cc8ddc 100644 --- a/main.js +++ b/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()) {