diff --git a/.env b/.env index f4f82ff8..872f67f0 100644 --- a/.env +++ b/.env @@ -3,4 +3,5 @@ SPARQL_ENDPOINT_URL=http://localhost:8890/sparql IMAGE_INLINE_SIZE_LIMIT=0 INLINE_RUNTIME_CHUNK=false NDC_MAINTENANCE_MESSAGE= -MATOMO_SITE_ID=35 \ No newline at end of file +MATOMO_SITE_ID=35 +SHOW_MAINTENANCE_PAGE=false \ No newline at end of file diff --git a/src/App.js b/src/App.js index 84823686..6c5abde8 100644 --- a/src/App.js +++ b/src/App.js @@ -8,17 +8,20 @@ import "./global-bootstrap-italia"; import "owl.carousel"; import React, { useRef } from "react"; +import WipPage from "./components/layout/WipPage/WipPage"; function App() { const mainRef = useRef(null); const footerRef = useRef(null); + const isMaintenance = window?._env_?.SHOW_MAINTENANCE_PAGE === "true"; + return (
-
+ {isMaintenance ? :
}
diff --git a/src/components/layout/WipPage/WipPage.js b/src/components/layout/WipPage/WipPage.js new file mode 100644 index 00000000..62367f42 --- /dev/null +++ b/src/components/layout/WipPage/WipPage.js @@ -0,0 +1,60 @@ +import React, { useEffect } from "react"; +// import { useNavigate } from "react-router-dom"; + +const WipPage = () => { + useEffect(() => { + document.title = "Lavori in corso - Catalogo Nazionale Dati"; + }); + + // const goToHome = useNavigate(); + return ( +
+ {/*
+
+ + + +
+
*/} +
+
+

+ Avviso di manutenzione +

+
+
+
+
+

+ {`Sono in corso attività di manutenzione per l'aggiornamento del + Portale`}{" "} +
+
+ Il sito sarà di nuovo raggiungibile al termine delle attività +

+
+
+ {/*
+
+ +
+
*/} + {/*
{message}
*/} +
+ ); +}; + +WipPage.propTypes = {}; + +export default WipPage; diff --git a/src/components/layout/WipPage/WipPage.module.css b/src/components/layout/WipPage/WipPage.module.css new file mode 100644 index 00000000..a3aae807 --- /dev/null +++ b/src/components/layout/WipPage/WipPage.module.css @@ -0,0 +1,16 @@ +.noFuondIcon { + width: auto; + height: 356px; + max-width: 560px; + max-height: 125px; + min-width: 256px; + min-height: 36px; + background-image: url("./error-page-not-found.svg"); + background-repeat: no-repeat; + +} +.myTest { + width: 5rem; + height: 5rem; + background-color: blue; +} diff --git a/src/components/layout/WipPage/error-page-not-found.svg b/src/components/layout/WipPage/error-page-not-found.svg new file mode 100644 index 00000000..c25d55a2 --- /dev/null +++ b/src/components/layout/WipPage/error-page-not-found.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file