diff --git a/src/info-popup.js b/src/info-popup.js index 6e7daa6..44e8a66 100644 --- a/src/info-popup.js +++ b/src/info-popup.js @@ -1,22 +1,26 @@ import Cookies from "js-cookie"; +import { el } from "./utils.js"; const HIDE_INFO_POPUP = "hideInfoPopup"; document.addEventListener("DOMContentLoaded", function () { - const infoPopup = document.querySelector(".info-popup"); - const noShowCheckbox = document.querySelector('input[name="no-show"]'); - const confirmButton = document.querySelector('.info-popup footer button'); + const infoPopup = document.querySelector(".info-popup"); + const noShowCheckbox = document.querySelector('input[name="no-show"]'); + const confirmButton = document.querySelector(".info-popup footer button"); + const map = el("map"); - const hidePopupCookie = Cookies.get(HIDE_INFO_POPUP); - if (!hidePopupCookie) { - infoPopup.style.display = "block"; - } + const hidePopupCookie = Cookies.get(HIDE_INFO_POPUP); + if (!hidePopupCookie) { + infoPopup.style.display = "block"; + map.style.display = "none"; + } - confirmButton.addEventListener("click", function () { - if (noShowCheckbox.checked) { - Cookies.set(HIDE_INFO_POPUP, "true", { expires: 400 }); - } + confirmButton.addEventListener("click", function () { + if (noShowCheckbox.checked) { + Cookies.set(HIDE_INFO_POPUP, "true", { expires: 400 }); + } - infoPopup.style.display = "none"; - }); + infoPopup.style.display = "none"; + map.style.display = "block"; + }); }); diff --git a/src/style.css b/src/style.css index 6841c27..2b20d74 100644 --- a/src/style.css +++ b/src/style.css @@ -75,4 +75,6 @@ body { .ol-attribution a:hover { color: var(--ol-brand-color); text-decoration: underline; -} \ No newline at end of file +} + +.info-popup-content > p { text-align:justify; } \ No newline at end of file