Add query param to close sidebar
The sidebar is open by default on large devices, but now we can link to a fullscreen map for a more immersive experience. Requested-By: Eric Villnow <eric@vill.now>
This commit is contained in:
parent
ca8aa335e5
commit
e233c8dda6
1 changed files with 4 additions and 0 deletions
4
main.js
4
main.js
|
|
@ -153,6 +153,10 @@ for (let category of layerCategories) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const sidebarVisible = ('sidebar' in urlParams) ? (urlParams.sidebar !== 'false') : true;
|
||||||
|
if (!sidebarVisible) {
|
||||||
|
document.body.classList.remove("nav-open");
|
||||||
|
}
|
||||||
|
|
||||||
const customLayerDiv = document.createElement("div");
|
const customLayerDiv = document.createElement("div");
|
||||||
customLayerDiv.innerHTML = `
|
customLayerDiv.innerHTML = `
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue