diff --git a/src/components/static-content/validatore/partials/ValidatoreResult.js b/src/components/static-content/validatore/partials/ValidatoreResult.js index 1adba3f2..3db8dbc2 100644 --- a/src/components/static-content/validatore/partials/ValidatoreResult.js +++ b/src/components/static-content/validatore/partials/ValidatoreResult.js @@ -18,6 +18,8 @@ const ValidatoreResult = () => { const buttonGroupErrorEl = document.getElementById("button-group-error"); const backgroundEl = document.getElementById("background-custom"); + const pageFrontEl = document.getElementById("page-front"); + const spaceEl = document.getElementById("space"); const errorRef = useRef(null); const warningRef = useRef(null); @@ -82,19 +84,42 @@ const ValidatoreResult = () => { offset - (isMobile() ? 0 : 80) }px, white 0)`; }; + const handleChangeSpace = () => { + const offset = pageFrontEl.clientHeight; + spaceEl.style.height = `calc(${window.screen.height}px - ${ + offset - 110 + }px)`; + }; + // to calculate the background (light-blue) height useEffect(() => { if (buttonGroupErrorEl) { handleChangeBackground(); window.addEventListener("resize", handleChangeBackground); + if (!stoplight) setStoplight(true); } return () => { window.removeEventListener("resize", handleChangeBackground); + window.removeEventListener("resize", handleChangeSpace); }; }, [buttonGroupErrorEl, response, backgroundEl]); + //to separate div between
and