From cf0b3e310e14661a3cf4cdb8f55d3a1bd29de121 Mon Sep 17 00:00:00 2001 From: Kobe Attias Date: Sun, 8 Dec 2024 21:30:21 -0500 Subject: [PATCH 1/2] maintenance page --- pages/_app.js | 14 +++---- pages/maintenance.tsx | 85 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 92 insertions(+), 7 deletions(-) create mode 100644 pages/maintenance.tsx diff --git a/pages/_app.js b/pages/_app.js index 1259cba21..303dd031e 100644 --- a/pages/_app.js +++ b/pages/_app.js @@ -6,13 +6,6 @@ import "~/components/Modals/Stylesheets/Dnd.css"; import "~/components/Paper/progressbar.css"; import "~/components/Paper/Tabs/stylesheets/custom-editor.css"; import "~/components/SearchSuggestion/authorinput.css"; -import "~/pages/user/stylesheets/toggle.css"; -import "isomorphic-unfetch"; -import "katex/dist/katex.min.css"; -import "react-placeholder/lib/reactPlaceholder.css"; -import "react-quill/dist/quill.snow.css"; -import "react-tagsinput/react-tagsinput.css"; -import "~/components/Comment/lib/quill.css"; import "~/components/Notifications/lib/react-toastify-custom.css"; import "react-toastify/dist/ReactToastify.css"; import "pdfjs-dist/web/pdf_viewer.css"; @@ -28,6 +21,9 @@ import Base from "./Base"; import nookies from "nookies"; import { useRouter } from "next/router"; import withRedux from "next-redux-wrapper"; +import MaintenancePage from "./maintenance"; + +const MAINTENANCE_MODE = true; if (process.env.ELASTIC_APM_URL) { initApm({ @@ -176,6 +172,10 @@ const MyApp = ({ router.pathname !== "/linkedin-login" && !router.pathname.startsWith("/product"); + if (MAINTENANCE_MODE) { + return ; + } + return ( { + return ( +
+
+
+ +
+

We'll be back soon!

+

+ ResearchHub is currently undergoing scheduled maintenance. We'll be back shortly. +

+

+ Thank you for your patience. +

+
+
+ ); +}; + +const styles = StyleSheet.create({ + container: { + minHeight: "100vh", + display: "flex", + alignItems: "center", + justifyContent: "center", + backgroundColor: colors.GREY_ICY_BLUE_HUE, + padding: 20, + }, + content: { + textAlign: "center", + maxWidth: 600, + padding: "40px 20px", + backgroundColor: "#fff", + borderRadius: 8, + boxShadow: "0 2px 4px rgba(0,0,0,0.1)", + }, + logoWrapper: { + marginBottom: 40, + }, + logo: { + width: 200, + height: 45, + [`@media only screen and (max-width: ${breakpoints.small.str})`]: { + width: 160, + }, + }, + title: { + fontSize: 32, + fontWeight: 500, + color: colors.NEW_BLUE(), + marginBottom: 20, + [`@media only screen and (max-width: ${breakpoints.small.str})`]: { + fontSize: 28, + }, + }, + message: { + fontSize: 18, + lineHeight: 1.5, + color: colors.BLACK(0.8), + marginBottom: 16, + [`@media only screen and (max-width: ${breakpoints.small.str})`]: { + fontSize: 16, + }, + }, + submessage: { + fontSize: 16, + color: colors.BLACK(0.6), + [`@media only screen and (max-width: ${breakpoints.small.str})`]: { + fontSize: 14, + }, + }, +}); + +export default MaintenancePage; \ No newline at end of file From b9e1a6626007b37cd49c37721246491eaef3a7c4 Mon Sep 17 00:00:00 2001 From: Kobe Attias Date: Sun, 8 Dec 2024 21:31:57 -0500 Subject: [PATCH 2/2] reverting remove css --- pages/_app.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pages/_app.js b/pages/_app.js index 303dd031e..38ac290cc 100644 --- a/pages/_app.js +++ b/pages/_app.js @@ -6,6 +6,13 @@ import "~/components/Modals/Stylesheets/Dnd.css"; import "~/components/Paper/progressbar.css"; import "~/components/Paper/Tabs/stylesheets/custom-editor.css"; import "~/components/SearchSuggestion/authorinput.css"; +import "~/pages/user/stylesheets/toggle.css"; +import "isomorphic-unfetch"; +import "katex/dist/katex.min.css"; +import "react-placeholder/lib/reactPlaceholder.css"; +import "react-quill/dist/quill.snow.css"; +import "react-tagsinput/react-tagsinput.css"; +import "~/components/Comment/lib/quill.css"; import "~/components/Notifications/lib/react-toastify-custom.css"; import "react-toastify/dist/ReactToastify.css"; import "pdfjs-dist/web/pdf_viewer.css";