diff --git a/.github/workflows/opencatalogi-page-deploy.yml b/.github/workflows/opencatalogi-page-deploy.yml index 89c6ef175..e95079637 100644 --- a/.github/workflows/opencatalogi-page-deploy.yml +++ b/.github/workflows/opencatalogi-page-deploy.yml @@ -7,6 +7,8 @@ env: # Change these to your preferences any image url can also be a base encoded # options: "true" | "false" USE_GITHUB_REPOSITORY_NAME_AS_PATH_PREFIX: "false" + SHOW_THEME_SWITCHER: "false" + ME_URL: "https://api.opencatalogi.nl/api/users/me" API_URL: "https://api.opencatalogi.nl/api" ADMIN_URL: "https://api.opencatalogi.nl/admin" @@ -68,6 +70,7 @@ jobs: with: envkey_GATSBY_GITHUB_REPOSITORY_NAME: ${{ env.GITHUB_REPOSITORY_NAME }} envkey_GATSBY_USE_GITHUB_REPOSITORY_NAME_AS_PATH_PREFIX: ${{ env.USE_GITHUB_REPOSITORY_NAME_AS_PATH_PREFIX }} + envkey_GATSBY_SHOW_THEME_SWITCHER: ${{ env.SHOW_THEME_SWITCHER }} envkey_GATSBY_ME_URL: ${{ env.ME_URL }} envkey_GATSBY_API_URL: ${{ env.API_URL }} envkey_GATSBY_ADMIN_URL: ${{ env.ADMIN_URL }} diff --git a/pwa/gatsby-config.js b/pwa/gatsby-config.js index 68d745a23..54de2b1f6 100644 --- a/pwa/gatsby-config.js +++ b/pwa/gatsby-config.js @@ -5,10 +5,14 @@ require("dotenv").config({ }); module.exports = { + /** + * We do NOT want to set the pathPrefix when we're using a DNS; it's only needed on gh-pages + * We CAN NOT set the pathPrefix when we're using the JSON-config files (due to needing access to window) + */ pathPrefix: - process.env.GATSBY_USE_GITHUB_REPOSITORY_NAME_AS_PATH_PREFIX === "true" - ? `/${process.env.GATSBY_GITHUB_REPOSITORY_NAME}` - : "", // we do NOT want to set the prefix if we're using an DNS + process.env.USE_GITHUB_REPOSITORY_NAME_AS_PATH_PREFIX === "true" + ? `/${process.env.GITHUB_REPOSITORY_NAME}` + : "", plugins: [ { resolve: `gatsby-plugin-layout`, diff --git a/pwa/package-lock.json b/pwa/package-lock.json index ee17adf7f..36e8b4649 100644 --- a/pwa/package-lock.json +++ b/pwa/package-lock.json @@ -3101,66 +3101,6 @@ "@lezer/common": "^1.0.0" } }, - "node_modules/@lmdb/lmdb-darwin-arm64": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/@lmdb/lmdb-darwin-arm64/-/lmdb-darwin-arm64-2.5.3.tgz", - "integrity": "sha512-RXwGZ/0eCqtCY8FLTM/koR60w+MXyvBUpToXiIyjOcBnC81tAlTUHrRUavCEWPI9zc9VgvpK3+cbumPyR8BSuA==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@lmdb/lmdb-darwin-x64": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/@lmdb/lmdb-darwin-x64/-/lmdb-darwin-x64-2.5.3.tgz", - "integrity": "sha512-337dNzh5yCdNCTk8kPfoU7jR3otibSlPDGW0vKZT97rKnQMb9tNdto3RtWoGPsQ8hKmlRZpojOJtmwjncq1MoA==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@lmdb/lmdb-linux-arm": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/@lmdb/lmdb-linux-arm/-/lmdb-linux-arm-2.5.3.tgz", - "integrity": "sha512-mU2HFJDGwECkoD9dHQEfeTG5mp8hNS2BCfwoiOpVPMeapjYpQz9Uw3FkUjRZ4dGHWKbin40oWHuL0bk2bCx+Sg==", - "cpu": [ - "arm" - ], - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@lmdb/lmdb-linux-arm64": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/@lmdb/lmdb-linux-arm64/-/lmdb-linux-arm64-2.5.3.tgz", - "integrity": "sha512-VJw60Mdgb4n+L0fO1PqfB0C7TyEQolJAC8qpqvG3JoQwvyOv6LH7Ib/WE3wxEW9nuHmVz9jkK7lk5HfWWgoO1Q==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@lmdb/lmdb-linux-x64": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/@lmdb/lmdb-linux-x64/-/lmdb-linux-x64-2.5.3.tgz", - "integrity": "sha512-qaReO5aV8griBDsBr8uBF/faO3ieGjY1RY4p8JvTL6Mu1ylLrTVvOONqKFlNaCwrmUjWw5jnf7VafxDAeQHTow==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ] - }, "node_modules/@lmdb/lmdb-win32-x64": { "version": "2.5.3", "resolved": "https://registry.npmjs.org/@lmdb/lmdb-win32-x64/-/lmdb-win32-x64-2.5.3.tgz", @@ -12684,6 +12624,66 @@ "@lmdb/lmdb-win32-x64": "2.5.3" } }, + "node_modules/lmdb/node_modules/@lmdb/lmdb-darwin-arm64": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/@lmdb/lmdb-darwin-arm64/-/lmdb-darwin-arm64-2.5.3.tgz", + "integrity": "sha512-RXwGZ/0eCqtCY8FLTM/koR60w+MXyvBUpToXiIyjOcBnC81tAlTUHrRUavCEWPI9zc9VgvpK3+cbumPyR8BSuA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/lmdb/node_modules/@lmdb/lmdb-darwin-x64": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/@lmdb/lmdb-darwin-x64/-/lmdb-darwin-x64-2.5.3.tgz", + "integrity": "sha512-337dNzh5yCdNCTk8kPfoU7jR3otibSlPDGW0vKZT97rKnQMb9tNdto3RtWoGPsQ8hKmlRZpojOJtmwjncq1MoA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/lmdb/node_modules/@lmdb/lmdb-linux-arm": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/@lmdb/lmdb-linux-arm/-/lmdb-linux-arm-2.5.3.tgz", + "integrity": "sha512-mU2HFJDGwECkoD9dHQEfeTG5mp8hNS2BCfwoiOpVPMeapjYpQz9Uw3FkUjRZ4dGHWKbin40oWHuL0bk2bCx+Sg==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/lmdb/node_modules/@lmdb/lmdb-linux-arm64": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/@lmdb/lmdb-linux-arm64/-/lmdb-linux-arm64-2.5.3.tgz", + "integrity": "sha512-VJw60Mdgb4n+L0fO1PqfB0C7TyEQolJAC8qpqvG3JoQwvyOv6LH7Ib/WE3wxEW9nuHmVz9jkK7lk5HfWWgoO1Q==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/lmdb/node_modules/@lmdb/lmdb-linux-x64": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/@lmdb/lmdb-linux-x64/-/lmdb-linux-x64-2.5.3.tgz", + "integrity": "sha512-qaReO5aV8griBDsBr8uBF/faO3ieGjY1RY4p8JvTL6Mu1ylLrTVvOONqKFlNaCwrmUjWw5jnf7VafxDAeQHTow==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ] + }, "node_modules/lmdb/node_modules/node-addon-api": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-4.3.0.tgz", diff --git a/pwa/src/apiService/apiService.ts b/pwa/src/apiService/apiService.ts index 854e1a47b..62f2a1a36 100644 --- a/pwa/src/apiService/apiService.ts +++ b/pwa/src/apiService/apiService.ts @@ -38,7 +38,7 @@ export default class APIService { const authorization = this.JWT ? { Authorization: "Bearer " + this.JWT } : {}; return axios.create({ - baseURL: process.env.GATSBY_API_URL ?? undefined, + baseURL: window.sessionStorage.getItem("API_URL") ?? undefined, headers: { Accept: "application/json", "Content-Type": "application/json", @@ -49,7 +49,7 @@ export default class APIService { public get LoginClient(): AxiosInstance { return axios.create({ - baseURL: process.env.GATSBY_API_URL ?? undefined, + baseURL: window.sessionStorage.getItem("API_URL") ?? undefined, headers: { Accept: "application/json", "Content-Type": "application/json", @@ -59,7 +59,7 @@ export default class APIService { public get BaseClient(): AxiosInstance { return axios.create({ - baseURL: process.env.GATSBY_BASE_URL ?? undefined, + baseURL: window.sessionStorage.getItem("BASE_URL") ?? undefined, headers: { Accept: "application/json", "Content-Type": "application/json", @@ -70,7 +70,7 @@ export default class APIService { public get MarkdownClient(): AxiosInstance { return axios.create({ - baseURL: process.env.GATSBY_BASE_URL ?? undefined, + baseURL: window.sessionStorage.getItem("BASE_URL") ?? undefined, headers: { Accept: "application/vnd.github.html", }, @@ -79,21 +79,13 @@ export default class APIService { public get FooterContentClient(): AxiosInstance { return axios.create({ - baseURL: removeFileNameFromUrl( - process.env.GATSBY_FOOTER_CONTENT !== undefined && process.env.GATSBY_FOOTER_CONTENT.length !== 0 - ? process.env.GATSBY_FOOTER_CONTENT - : DEFAULT_FOOTER_CONTENT_URL, - ), + baseURL: removeFileNameFromUrl(window.sessionStorage.getItem("FOOTER_CONTENT") ?? DEFAULT_FOOTER_CONTENT_URL), }); } public get HeaderContentClient(): AxiosInstance { return axios.create({ - baseURL: removeFileNameFromUrl( - process.env.GATSBY_HEADER_CONTENT !== undefined && process.env.GATSBY_HEADER_CONTENT.length !== 0 - ? process.env.GATSBY_HEADER_CONTENT - : DEFAULT_HEADER_CONTENT_URL, - ), + baseURL: removeFileNameFromUrl(window.sessionStorage.getItem("HEADER_CONTENT") ?? DEFAULT_HEADER_CONTENT_URL), }); } diff --git a/pwa/src/apiService/resources/search.ts b/pwa/src/apiService/resources/search.ts index 19938d3f9..87830f6ff 100644 --- a/pwa/src/apiService/resources/search.ts +++ b/pwa/src/apiService/resources/search.ts @@ -15,8 +15,10 @@ export default class Search { filters, )}`; - if (process.env.GATSBY_GITHUB_ORGANIZATION_URL) { - endpoint += `&embedded.url.embedded.organisation.github=${process.env.GATSBY_GITHUB_ORGANIZATION_URL}`; + if (window.sessionStorage.getItem("GITHUB_ORGANIZATION_URL") !== "") { + endpoint += `&embedded.url.embedded.organisation.github=${window.sessionStorage.getItem( + "GITHUB_ORGANIZATION_URL", + )}`; } const { data } = await Send(this._instance, "GET", endpoint); diff --git a/pwa/src/components/componentCard/ComponentCard.module.css b/pwa/src/components/componentCard/ComponentCard.module.css index 69d0c4e3f..5f629716e 100644 --- a/pwa/src/components/componentCard/ComponentCard.module.css +++ b/pwa/src/components/componentCard/ComponentCard.module.css @@ -42,48 +42,60 @@ .interactionLayer, .interfaceLayer { --utrecht-badge-background-color: var(--web-app-layer-color-interaction); + --utrecht-badge-color: #ffffff; } .interactionCategory, .interfaceCategory { --utrecht-badge-background-color: var(--web-app-layer-category-color-interaction); + --utrecht-badge-color: #000000; } .processLayer, .processsLayer { --utrecht-badge-background-color: var(--web-app-layer-color-process); + --utrecht-badge-color: #ffffff; } .procesCategory, .processCategory { --utrecht-badge-background-color: var(--web-app-layer-category-color-process); + --utrecht-badge-color: #000000; } .integrationLayer { --utrecht-badge-background-color: var(--web-app-layer-color-integration); + --utrecht-badge-color: #ffffff; } .integrationCategory { --utrecht-badge-background-color: var(--web-app-layer-category-color-integration); + --utrecht-badge-color: #000000; } .servicesLayer, .serviceLayer { --utrecht-badge-background-color: var(--web-app-layer-color-services); + --utrecht-badge-color: #ffffff; } .servicesCategory, .serviceCategory { --utrecht-badge-background-color: var(--web-app-layer-category-color-services); + --utrecht-badge-color: #000000; } .dataLayer { --utrecht-badge-background-color: var(--web-app-layer-color-data); + --utrecht-badge-color: #ffffff; } .dataCategory { --utrecht-badge-background-color: var(--web-app-layer-category-color-data); + --utrecht-badge-color: #000000; } .unknownLayer { --utrecht-badge-background-color: var(--web-app-layer-color-unknown); + --utrecht-badge-color: #ffffff; } .unknownCategory { --utrecht-badge-background-color: var(--web-app-layer-color-unknown); + --utrecht-badge-color: #000000; } diff --git a/pwa/src/hooks/footerContent.ts b/pwa/src/hooks/footerContent.ts index 71a92ef0d..e395c4a90 100644 --- a/pwa/src/hooks/footerContent.ts +++ b/pwa/src/hooks/footerContent.ts @@ -8,11 +8,7 @@ import { DEFAULT_FOOTER_CONTENT_URL } from "../templates/templateParts/footer/Fo export const useFooterContent = () => { const API: APIService | null = React.useContext(APIContext); - const fileName = getFileNameFromUrl( - process.env.GATSBY_FOOTER_CONTENT !== undefined && process.env.GATSBY_FOOTER_CONTENT.length !== 0 - ? process.env.GATSBY_FOOTER_CONTENT - : DEFAULT_FOOTER_CONTENT_URL, - ); + const fileName = getFileNameFromUrl(window.sessionStorage.getItem("FOOTER_CONTENT") ?? DEFAULT_FOOTER_CONTENT_URL); const getContent = () => useQuery(["contents", fileName], () => API?.FooterContent.getContent(fileName), { diff --git a/pwa/src/hooks/headerContent.ts b/pwa/src/hooks/headerContent.ts index 15ee8bc9d..8df2a0b8a 100644 --- a/pwa/src/hooks/headerContent.ts +++ b/pwa/src/hooks/headerContent.ts @@ -8,11 +8,7 @@ import { DEFAULT_HEADER_CONTENT_URL } from "../templates/templateParts/header/He export const useHeaderContent = () => { const API: APIService | null = React.useContext(APIContext); - const fileName = getFileNameFromUrl( - process.env.GATSBY_HEADER_CONTENT !== undefined && process.env.GATSBY_HEADER_CONTENT.length !== 0 - ? process.env.GATSBY_HEADER_CONTENT - : DEFAULT_HEADER_CONTENT_URL, - ); + const fileName = getFileNameFromUrl(window.sessionStorage.getItem("HEADER_CONTENT") ?? DEFAULT_HEADER_CONTENT_URL); const getContent = () => useQuery(["contents", fileName], () => API?.HeaderContent.getContent(fileName), { diff --git a/pwa/src/hooks/htmlParser/anchor/getAnchor.tsx b/pwa/src/hooks/htmlParser/anchor/getAnchor.tsx index 86de8fc5e..ee495937e 100644 --- a/pwa/src/hooks/htmlParser/anchor/getAnchor.tsx +++ b/pwa/src/hooks/htmlParser/anchor/getAnchor.tsx @@ -89,7 +89,7 @@ const handleInternalLinks = (props: any, targetFile: string, location: string, d if (!directoryFound) { const hrefWithLeadingSlash = !props.href.startsWith("/") ? `/${props.href}` : props.href; - open(`${process.env.GATSBY_GITHUB_REPOSITORY_URL}/blob/master${hrefWithLeadingSlash}`); + open(`${window.sessionStorage.getItem("GITHUB_REPOSITORY_URL")}/blob/master${hrefWithLeadingSlash}`); } return; // ensure no other flow is triggered diff --git a/pwa/src/hooks/htmlParser/image/getImage.tsx b/pwa/src/hooks/htmlParser/image/getImage.tsx index 979ac26f5..71c451f22 100644 --- a/pwa/src/hooks/htmlParser/image/getImage.tsx +++ b/pwa/src/hooks/htmlParser/image/getImage.tsx @@ -1,10 +1,11 @@ +import * as React from "react"; import { Image } from "@utrecht/component-library-react/dist/css-module"; export const getImage = (props: any) => { let src = props.src; if (!props.src.includes("https://" || "http://")) { - const sessionUrl = process.env.GATSBY_GITHUB_REPOSITORY_URL; + const sessionUrl = window.sessionStorage.getItem("GITHUB_REPOSITORY_URL"); const url = sessionUrl?.replace("https://github.com/", ""); src = `https://raw.githubusercontent.com/${url}/master/docs/features/${props.src}`; diff --git a/pwa/src/hooks/useDigiD.ts b/pwa/src/hooks/useDigiD.ts deleted file mode 100644 index 2f1255fad..000000000 --- a/pwa/src/hooks/useDigiD.ts +++ /dev/null @@ -1,25 +0,0 @@ -import * as React from "react"; -import APIService from "../apiService/apiService"; -import APIContext from "../apiService/apiContext"; - -export const useDigiD = () => { - const API: APIService | null = React.useContext(APIContext); - - const authenticate = () => { - const params = new URLSearchParams(location.search); - const undecodedToken: string | null = params.get("token"); - - if (!undecodedToken) return false; - - const JWT: string = window.atob(undecodedToken); - - API?.setAuthentication(JWT); - return true; - }; - - const getRedirectURL = (): string => { - return `${process.env.GATSBY_BASE_URL}/digid/login?returnUrl=${process.env.GATSBY_FRONTEND_URL}/callbacks/digid`; - }; - - return { authenticate, getRedirectURL }; -}; diff --git a/pwa/src/hooks/useEnvironment.ts b/pwa/src/hooks/useEnvironment.ts new file mode 100644 index 000000000..45c029789 --- /dev/null +++ b/pwa/src/hooks/useEnvironment.ts @@ -0,0 +1,105 @@ +import * as React from "react"; +import { getConfig } from "../services/getConfig"; +import { uniqueId } from "lodash"; + +export const useEnvironment = () => { + const [, setSessionStorageUpdatedId] = React.useState("-1"); + + const handleStorageChange = () => { + setSessionStorageUpdatedId(uniqueId()); + themeSwitcherMiddleware(); + }; + + const updateSessionStorage = () => { + window.dispatchEvent(new Event("sessionStorageChange")); + }; + + React.useEffect(() => { + window.addEventListener("sessionStorageChange", handleStorageChange); + + return () => { + window.removeEventListener("sessionStorageChange", handleStorageChange); + }; + }, []); + + const initiateFromEnv = () => { + window.sessionStorage.setItem("SHOW_THEME_SWITCHER", process.env.GATSBY_SHOW_THEME_SWITCHER ?? ""); + window.sessionStorage.setItem("GITHUB_REPOSITORY_NAME", process.env.GATSBY_GITHUB_REPOSITORY_NAME ?? ""); + window.sessionStorage.setItem( + "USE_GITHUB_REPOSITORY_NAME_AS_PATH_PREFIX", + process.env.GATSBY_USE_GITHUB_REPOSITORY_NAME_AS_PATH_PREFIX ?? "", + ); + window.sessionStorage.setItem("API_URL", process.env.GATSBY_API_URL ?? ""); + window.sessionStorage.setItem("BASE_URL", process.env.GATSBY_BASE_URL ?? ""); + window.sessionStorage.setItem("NL_DESIGN_THEME_CLASSNAME", process.env.GATSBY_NL_DESIGN_THEME_CLASSNAME ?? ""); + window.sessionStorage.setItem("FAVICON_URL", process.env.GATSBY_FAVICON_URL ?? ""); + window.sessionStorage.setItem("PAGE_TITLE", process.env.GATSBY_PAGE_TITLE ?? ""); + window.sessionStorage.setItem("HEADER_LOGO_URL", process.env.GATSBY_HEADER_LOGO_URL ?? ""); + window.sessionStorage.setItem("HEADER_SHOW_LOGIN", process.env.GATSBY_HEADER_SHOW_LOGIN ?? ""); + window.sessionStorage.setItem("HEADER_CONTENT", process.env.GATSBY_HEADER_CONTENT ?? ""); + window.sessionStorage.setItem("JUMBOTRON_TITLE", process.env.GATSBY_JUMBOTRON_TITLE ?? ""); + window.sessionStorage.setItem("JUMBOTRON_SUBTITLE", process.env.GATSBY_JUMBOTRON_SUBTITLE ?? ""); + window.sessionStorage.setItem("JUMBOTRON_IMAGE_PLACEMENT", process.env.GATSBY_JUMBOTRON_IMAGE_PLACEMENT ?? ""); + window.sessionStorage.setItem("JUMBOTRON_IMAGE_URL", process.env.GATSBY_JUMBOTRON_IMAGE_URL ?? ""); + window.sessionStorage.setItem("JUMBOTRON_DESCRIPTION", process.env.GATSBY_JUMBOTRON_DESCRIPTION ?? ""); + window.sessionStorage.setItem("JUMBOTRON_ISCARD", process.env.GATSBY_JUMBOTRON_ISCARD ?? ""); + window.sessionStorage.setItem("JUMBOTRON_SEARCHFORM", process.env.GATSBY_JUMBOTRON_SEARCHFORM ?? ""); + window.sessionStorage.setItem("JUMBOTRON_CONTAINER", process.env.GATSBY_JUMBOTRON_CONTAINER ?? ""); + window.sessionStorage.setItem("FOOTER_SHOW_CREATOR", process.env.GATSBY_FOOTER_SHOW_CREATOR ?? ""); + window.sessionStorage.setItem("FOOTER_LOGO_URL", process.env.GATSBY_FOOTER_LOGO_URL ?? ""); + window.sessionStorage.setItem("FOOTER_CONTENT", process.env.GATSBY_FOOTER_CONTENT ?? ""); + window.sessionStorage.setItem("FOOTER_CONTENT_HEADER", process.env.GATSBY_FOOTER_CONTENT_HEADER ?? ""); + window.sessionStorage.setItem("OPTIONAL_START_PAGE", process.env.GATSBY_OPTIONAL_START_PAGE ?? ""); + + updateSessionStorage(); + }; + + const initiateFromJSON = (themeOrDomainName: string) => { + const config = getConfig(themeOrDomainName); + + if (!config) return; // no config found, nothing else to do + + window.sessionStorage.setItem("SHOW_THEME_SWITCHER", config.GATSBY_SHOW_THEME_SWITCHER ?? ""); + window.sessionStorage.setItem("GITHUB_REPOSITORY_NAME", config.GATSBY_GITHUB_REPOSITORY_NAME ?? ""); + window.sessionStorage.setItem( + "USE_GITHUB_REPOSITORY_NAME_AS_PATH_PREFIX", + config.GATSBY_USE_GITHUB_REPOSITORY_NAME_AS_PATH_PREFIX ?? "", + ); + window.sessionStorage.setItem("API_URL", config.GATSBY_API_URL ?? ""); + window.sessionStorage.setItem("BASE_URL", config.GATSBY_BASE_URL ?? ""); + window.sessionStorage.setItem("NL_DESIGN_THEME_CLASSNAME", config.GATSBY_NL_DESIGN_THEME_CLASSNAME ?? ""); + window.sessionStorage.setItem("FAVICON_URL", config.GATSBY_FAVICON_URL ?? ""); + window.sessionStorage.setItem("PAGE_TITLE", config.GATSBY_PAGE_TITLE ?? ""); + window.sessionStorage.setItem("HEADER_LOGO_URL", config.GATSBY_HEADER_LOGO_URL ?? ""); + window.sessionStorage.setItem("HEADER_SHOW_LOGIN", config.GATSBY_HEADER_SHOW_LOGIN ?? ""); + window.sessionStorage.setItem("HEADER_CONTENT", config.GATSBY_HEADER_CONTENT ?? ""); + window.sessionStorage.setItem("JUMBOTRON_TITLE", config.GATSBY_JUMBOTRON_TITLE ?? ""); + window.sessionStorage.setItem("JUMBOTRON_SUBTITLE", config.GATSBY_JUMBOTRON_SUBTITLE ?? ""); + window.sessionStorage.setItem("JUMBOTRON_IMAGE_PLACEMENT", config.GATSBY_JUMBOTRON_IMAGE_PLACEMENT ?? ""); + window.sessionStorage.setItem("JUMBOTRON_IMAGE_URL", config.GATSBY_JUMBOTRON_IMAGE_URL ?? ""); + window.sessionStorage.setItem("JUMBOTRON_DESCRIPTION", config.GATSBY_JUMBOTRON_DESCRIPTION ?? ""); + window.sessionStorage.setItem("JUMBOTRON_ISCARD", config.GATSBY_JUMBOTRON_ISCARD ?? ""); + window.sessionStorage.setItem("JUMBOTRON_SEARCHFORM", config.GATSBY_JUMBOTRON_SEARCHFORM ?? ""); + window.sessionStorage.setItem("JUMBOTRON_CONTAINER", config.GATSBY_JUMBOTRON_CONTAINER ?? ""); + window.sessionStorage.setItem("FOOTER_SHOW_CREATOR", config.GATSBY_FOOTER_SHOW_CREATOR ?? ""); + window.sessionStorage.setItem("FOOTER_LOGO_URL", config.GATSBY_FOOTER_LOGO_URL ?? ""); + window.sessionStorage.setItem("FOOTER_CONTENT", config.GATSBY_FOOTER_CONTENT ?? ""); + window.sessionStorage.setItem("FOOTER_CONTENT_HEADER", config.GATSBY_FOOTER_CONTENT_HEADER ?? ""); + window.sessionStorage.setItem("OPTIONAL_START_PAGE", config.GATSBY_OPTIONAL_START_PAGE ?? ""); + + updateSessionStorage(); + }; + + const themeSwitcherMiddleware = () => { + switch (window.location.hostname) { + case "koophulpje.nl": + // case "localhost": // development purposes + window.sessionStorage.setItem("SHOW_THEME_SWITCHER", "true"); + break; + } + + if (process.env.GATSBY_SHOW_THEME_SWITCHER === "true") window.sessionStorage.setItem("SHOW_THEME_SWITCHER", "true"); + }; + + return { initiateFromEnv, initiateFromJSON }; +}; diff --git a/pwa/src/hooks/useGitHubDirectories.ts b/pwa/src/hooks/useGitHubDirectories.ts index 3094d45bc..e725096ac 100644 --- a/pwa/src/hooks/useGitHubDirectories.ts +++ b/pwa/src/hooks/useGitHubDirectories.ts @@ -9,7 +9,8 @@ export const useGitHubDirectories = () => { const [directories, setDirectories] = React.useState([]); React.useEffect(() => { - const gitHubDirectoryPathsString: string | undefined = process.env.GATSBY_GITHUB_DOCS_DIRECTORY_PATHS; + const gitHubDirectoryPathsString: string | undefined = + window.sessionStorage.getItem("GITHUB_DOCS_DIRECTORY_PATHS") ?? ""; if (!gitHubDirectoryPathsString) return; diff --git a/pwa/src/hooks/useHeaderTopNavItems.ts b/pwa/src/hooks/useHeaderTopNavItems.ts index 453176cab..629a14c2b 100644 --- a/pwa/src/hooks/useHeaderTopNavItems.ts +++ b/pwa/src/hooks/useHeaderTopNavItems.ts @@ -35,8 +35,8 @@ export const useHeaderTopNavItems = (data: THeaderTopNavItem[]) => { data?.map((item: any) => { const isCurrent = (current: any) => { const prefixedPathname = - process.env.GATSBY_USE_GITHUB_REPOSITORY_NAME_AS_PATH_PREFIX === "true" - ? `/${process.env.GATSBY_GITHUB_REPOSITORY_NAME}${current.pathname}` + window.sessionStorage.getItem("USE_GITHUB_REPOSITORY_NAME_AS_PATH_PREFIX") === "true" + ? `/${window.sessionStorage.getItem("GITHUB_REPOSITORY_NAME")}${current.pathname}` : current.pathname; const isCurrentRoute = (): boolean => { diff --git a/pwa/src/hooks/useMarkdownDirectories.ts b/pwa/src/hooks/useMarkdownDirectories.ts index 107afcf63..216a9ae68 100644 --- a/pwa/src/hooks/useMarkdownDirectories.ts +++ b/pwa/src/hooks/useMarkdownDirectories.ts @@ -9,7 +9,8 @@ export const useMarkdownDirectories = () => { const [directories, setDirectories] = React.useState([]); React.useEffect(() => { - const markdownDirectoryPathsString: string | undefined = process.env.GATSBY_GITHUB_DOCS_DIRECTORY_PATHS; + const markdownDirectoryPathsString: string | undefined = + window.sessionStorage.getItem("GITHUB_DOCS_DIRECTORY_PATHS") ?? ""; if (!markdownDirectoryPathsString) return; diff --git a/pwa/src/layout/Head.tsx b/pwa/src/layout/Head.tsx index cd624a503..5bd7a4bb5 100644 --- a/pwa/src/layout/Head.tsx +++ b/pwa/src/layout/Head.tsx @@ -4,20 +4,18 @@ import { Helmet } from "react-helmet"; import { useInitCssVariables } from "../hooks/initCssVariables"; export const Head: React.FC = () => { - const theme = process.env.GATSBY_NL_DESIGN_THEME_CLASSNAME ?? "conduction-theme"; + const [theme] = React.useState( + window.sessionStorage.getItem("NL_DESIGN_THEME_CLASSNAME") ?? "conduction-theme", + ); + useInitCssVariables(theme); return ( - - {process.env.GATSBY_PAGE_TITLE && process.env.GATSBY_PAGE_TITLE !== "" - ? process.env.GATSBY_PAGE_TITLE - : "OpenCatalogi"} - - + /> ); }; diff --git a/pwa/src/layout/Layout.tsx b/pwa/src/layout/Layout.tsx index e68ced568..7fbaecd9e 100644 --- a/pwa/src/layout/Layout.tsx +++ b/pwa/src/layout/Layout.tsx @@ -21,6 +21,8 @@ import { fas } from "@fortawesome/free-solid-svg-icons"; import { fab } from "@fortawesome/free-brands-svg-icons"; import { far } from "@fortawesome/free-regular-svg-icons"; import { library } from "@fortawesome/fontawesome-svg-core"; +import { useEnvironment } from "../hooks/useEnvironment"; +import { ThemeSwitcherTopBar } from "../templates/templateParts/themeSwitcherTopBar/ThemeSwitcherTopBar"; export const TOOLTIP_ID = "cb8f47c3-7151-4a46-954d-784a531b01e6"; @@ -34,9 +36,18 @@ const Layout: React.FC = ({ children, pageContext, location }) => { const [globalContext, setGlobalContext] = React.useState(defaultGlobalContext); const [API, setAPI] = React.useState(React.useContext(APIContext)); const [screenSize, setScreenSize] = React.useState("mobile"); + const { initiateFromEnv, initiateFromJSON } = useEnvironment(); library.add(fas, fab, far); + React.useEffect(() => { + if (process.env.GATSBY_ENV_VARS_SET === "true") { + initiateFromEnv(); + } else { + initiateFromJSON(window.location.hostname); + } + }, []); + React.useEffect(() => { // initiate API Service setAPI(new APIService()); @@ -79,7 +90,9 @@ const Layout: React.FC = ({ children, pageContext, location }) => { - + + + diff --git a/pwa/src/pages/callbacks/digid.tsx b/pwa/src/pages/callbacks/digid.tsx deleted file mode 100644 index fc820c34e..000000000 --- a/pwa/src/pages/callbacks/digid.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import * as React from "react"; -import { navigate } from "gatsby"; -import { useDigiD } from "../../hooks/useDigiD"; - -const digid: React.FC = () => { - const [authenticated, setAuthenticated] = React.useState(false); - const { authenticate } = useDigiD(); - - React.useEffect(() => { - setAuthenticated(authenticate()); - }, []); - - React.useEffect(() => { - authenticated && navigate("/"); - }, [authenticated]); - - return <>; -}; - -export default digid; diff --git a/pwa/src/services/getConfig.ts b/pwa/src/services/getConfig.ts new file mode 100644 index 000000000..7daa31e70 --- /dev/null +++ b/pwa/src/services/getConfig.ts @@ -0,0 +1,51 @@ +import { TGroupedSelectOption } from "@conduction/components/lib/components/formFields/select/select"; + +import Conduction from "./../../static/configFiles/conduction.json"; +import CommonGround from "./../../static/configFiles/common-ground.json"; +import Rotterdam from "./../../static/configFiles/rotterdam.json"; +import Epe from "./../../static/configFiles/epe.json"; +import Noordwijk from "./../../static/configFiles/noordwijk.json"; +import Leiden from "./../../static/configFiles/leiden.json"; +import Dimpact from "./../../static/configFiles/dimpact.json"; +import OpenWebconcept from "./../../static/configFiles/open-webconcept.json"; + +export const getConfig = (themeOrDomainName: string): Record | undefined => { + switch (themeOrDomainName) { + // case "localhost": // development purposes + case "commonground-theme": + return CommonGround; + case "rotterdam-theme": + return Rotterdam; + case "conduction-theme": + return Conduction; + case "epe-theme": + return Epe; + case "noordwijk-theme": + return Noordwijk; + case "leiden-theme": + return Leiden; + case "dimpact-theme": + return Dimpact; + case "open-webconcept-theme": + return OpenWebconcept; + + default: + return CommonGround; + } +}; + +export const availableThemes: TGroupedSelectOption[] = [ + { + label: "Alle overheidsorganisaties", + options: [ + { label: "Common Ground", value: "commonground-theme" }, + { label: "Conduction", value: "conduction-theme" }, + { label: "Rotterdam", value: "rotterdam-theme" }, + { label: "Epe", value: "epe-theme" }, + { label: "Noordwijk", value: "noordwijk-theme" }, + { label: "Leiden", value: "leiden-theme" }, + { label: "Dimpact", value: "dimpact-theme" }, + { label: "OpenWebconcept", value: "open-webconcept-theme" }, + ], + }, +]; diff --git a/pwa/src/services/isHomepage.ts b/pwa/src/services/isHomepage.ts index d6b73d2f4..6e970a1f5 100644 --- a/pwa/src/services/isHomepage.ts +++ b/pwa/src/services/isHomepage.ts @@ -2,10 +2,10 @@ //The prefix is set in the config.js file export const isHomepage = (pathname: string): boolean => { //Checks if the prefix is set. If the prefix is set than the homepage is not "/"" but "/prefix" - if (process.env.GATSBY_USE_GITHUB_REPOSITORY_NAME_AS_PATH_PREFIX === "true") { - return pathname === `/${process.env.GATSBY_GITHUB_REPOSITORY_NAME}/`; + if (window.sessionStorage.getItem("USE_GITHUB_REPOSITORY_NAME_AS_PATH_PREFIX") === "true") { + return pathname === `/${window.sessionStorage.getItem("GITHUB_REPOSITORY_NAME")}/`; } - if (process.env.GATSBY_USE_GITHUB_REPOSITORY_NAME_AS_PATH_PREFIX === "false") { + if (window.sessionStorage.getItem("USE_GITHUB_REPOSITORY_NAME_AS_PATH_PREFIX") === "false") { return pathname === "/"; } diff --git a/pwa/src/templates/components/ComponentsTemplate.module.css b/pwa/src/templates/components/ComponentsTemplate.module.css index ccbf92d72..1250fdb86 100644 --- a/pwa/src/templates/components/ComponentsTemplate.module.css +++ b/pwa/src/templates/components/ComponentsTemplate.module.css @@ -41,7 +41,6 @@ .paginationContainer { display: flex; - padding-left: 0; list-style: none; justify-content: center; } diff --git a/pwa/src/templates/landing/LandingTemplate.tsx b/pwa/src/templates/landing/LandingTemplate.tsx index 38e063eb5..68b9e4d21 100644 --- a/pwa/src/templates/landing/LandingTemplate.tsx +++ b/pwa/src/templates/landing/LandingTemplate.tsx @@ -46,13 +46,17 @@ export const LandingTemplate: React.FC = ({ params }) => { return ( - {process.env.GATSBY_OPTIONAL_START_PAGE && - process.env.GATSBY_OPTIONAL_START_PAGE !== "false" && - process.env.GATSBY_OPTIONAL_START_PAGE !== undefined && ( - + {window.sessionStorage.getItem("OPTIONAL_START_PAGE") && + window.sessionStorage.getItem("OPTIONAL_START_PAGE") !== "false" && + window.sessionStorage.getItem("OPTIONAL_START_PAGE") !== undefined && ( + )} - {(!process.env.GATSBY_OPTIONAL_START_PAGE || process.env.GATSBY_OPTIONAL_START_PAGE === "false") && ( + {(!window.sessionStorage.getItem("OPTIONAL_START_PAGE") || + window.sessionStorage.getItem("OPTIONAL_START_PAGE") === "false") && ( <>
diff --git a/pwa/src/templates/templateParts/footer/FooterTemplate.tsx b/pwa/src/templates/templateParts/footer/FooterTemplate.tsx index e30f6d76b..30aa144ad 100644 --- a/pwa/src/templates/templateParts/footer/FooterTemplate.tsx +++ b/pwa/src/templates/templateParts/footer/FooterTemplate.tsx @@ -73,9 +73,7 @@ export const FooterTemplate: React.FC = ({ layoutClassName
- {footerContent?.map((content, idx) => ( - - ))} + {footerContent?.map((content, idx) => )}
@@ -92,7 +90,7 @@ const DynamicSection: React.FC<{ content: TDynamicContentItem }> = ({ content }) return (
- + {content.items.map((item, idx) => (
@@ -137,15 +135,20 @@ const DynamicSectionHeading: React.FC<{ content: TDynamicContentItem; heading?: }; const Logo: React.FC = () => { - if (process.env.GATSBY_FOOTER_LOGO_URL === "false") return <>; + if (window.sessionStorage.getItem("FOOTER_LOGO_URL") === "false") return <>; + const { t } = useTranslation(); return (
(process.env.GATSBY_FOOTER_LOGO_URL ? open(process.env.GATSBY_FOOTER_LOGO_URL) : navigate("/"))} - src={process.env.GATSBY_FOOTER_LOGO_URL} + onClick={() => + window.sessionStorage.getItem("FOOTER_LOGO_URL") + ? open(window.sessionStorage.getItem("FOOTER_LOGO_URL") ?? "/") + : navigate("/") + } + src={window.sessionStorage.getItem("FOOTER_LOGO_URL") ?? ""} alt={t("Footer-logo")} aria-label={`${t("Footer-logo")}, ${t("Can open a new window")}`} tabIndex={0} @@ -155,7 +158,7 @@ const Logo: React.FC = () => { }; const WithLoveByConduction: React.FC = () => { - if (process.env.GATSBY_FOOTER_SHOW_CREATOR === "false") return <>; + if (window.sessionStorage.getItem("FOOTER_SHOW_CREATOR") === "false") return <>; const { t } = useTranslation(); diff --git a/pwa/src/templates/templateParts/header/HeaderTemplate.module.css b/pwa/src/templates/templateParts/header/HeaderTemplate.module.css index 3507f14e6..86fb468cb 100644 --- a/pwa/src/templates/templateParts/header/HeaderTemplate.module.css +++ b/pwa/src/templates/templateParts/header/HeaderTemplate.module.css @@ -36,6 +36,8 @@ .logoDesktop { display: none; + padding-inline-start: var(--web-app-size-xs); + padding-inline-end: var(--web-app-size-xs); } .logoMobile { diff --git a/pwa/src/templates/templateParts/header/HeaderTemplate.tsx b/pwa/src/templates/templateParts/header/HeaderTemplate.tsx index f3db4cd66..0524a9bcd 100644 --- a/pwa/src/templates/templateParts/header/HeaderTemplate.tsx +++ b/pwa/src/templates/templateParts/header/HeaderTemplate.tsx @@ -4,7 +4,7 @@ import clsx from "clsx"; import LogoRotterdam from "../../../assets/svgs/LogoRotterdam.svg"; import { useTranslation } from "react-i18next"; import { navigate } from "gatsby"; -import { Container, Jumbotron, PrimaryTopNav, SecondaryTopNav } from "@conduction/components"; +import { Container, Jumbotron, Logo, PrimaryTopNav, SecondaryTopNav } from "@conduction/components"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faCircleUser } from "@fortawesome/free-solid-svg-icons"; import { useGatsbyContext } from "../../../context/gatsby"; @@ -48,7 +48,7 @@ export const HeaderTemplate: React.FC = ({ layoutClassName type: "external", current: pathname === "/login", handleClick: () => { - open(process.env.ADMIN_DASHBOARD_URL ?? "#"); + open(window.sessionStorage.getItem("ADMIN_DASHBOARD_URL") ?? "#"); }, icon: , }, @@ -60,7 +60,7 @@ export const HeaderTemplate: React.FC = ({ layoutClassName type: "external", current: pathname === "/login", handleClick: () => { - open(process.env.ADMIN_DASHBOARD_URL ?? "#"); + open(window.sessionStorage.getItem("ADMIN_DASHBOARD_URL") ?? "#"); }, icon: , }, @@ -72,14 +72,14 @@ export const HeaderTemplate: React.FC = ({ layoutClassName return; } - process.env.GATSBY_HEADER_SHOW_LOGIN === "true" + window.sessionStorage.getItem("HEADER_SHOW_LOGIN") === "true" ? setTopNavItems([...headerTopNavItems, ...secondaryTopNavItemsMobile]) : setTopNavItems(headerTopNavItems); }, [screenSize, pathname, crumbs, filters, getHeaderContent.isSuccess]); return ( - {process.env.GATSBY_HEADER_SHOW_LOGIN === "true" && ( + {window.sessionStorage.getItem("HEADER_SHOW_LOGIN") === "true" && (
@@ -89,12 +89,26 @@ export const HeaderTemplate: React.FC = ({ layoutClassName
- navigate("/")} src={process.env.GATSBY_HEADER_LOGO_URL ?? LogoRotterdam} /> + {window.sessionStorage.getItem("HEADER_LOGO_URL") ? ( + navigate("/")} + src={window.sessionStorage.getItem("HEADER_LOGO_URL") ?? LogoRotterdam} + /> + ) : ( + + )}
- navigate("/")} src={process.env.GATSBY_HEADER_LOGO_URL ?? LogoRotterdam} /> + {window.sessionStorage.getItem("HEADER_LOGO_URL") ? ( + navigate("/")} + src={window.sessionStorage.getItem("HEADER_LOGO_URL") ?? LogoRotterdam} + /> + ) : ( + + )}
} layoutClassName={styles.textColor} @@ -105,49 +119,28 @@ export const HeaderTemplate: React.FC = ({ layoutClassName {isHomepage(pathname) && ( , - show: - process.env.GATSBY_JUMBOTRON_SEARCHFORM && process.env.GATSBY_JUMBOTRON_SEARCHFORM !== "" - ? process.env.GATSBY_JUMBOTRON_SEARCHFORM === "true" && true - : false, + show: window.sessionStorage.getItem("JUMBOTRON_SEARCHFORM") === "true", }} image={{ placement: - process.env.GATSBY_JUMBOTRON_IMAGE_PLACEMENT && process.env.GATSBY_JUMBOTRON_IMAGE_PLACEMENT !== "" - ? process.env.GATSBY_JUMBOTRON_IMAGE_PLACEMENT === "background" - ? "background" - : process.env.GATSBY_JUMBOTRON_IMAGE_PLACEMENT === "right" + window.sessionStorage.getItem("JUMBOTRON_IMAGE_PLACEMENT") === "background" + ? "background" + : window.sessionStorage.getItem("JUMBOTRON_IMAGE_PLACEMENT") === "right" ? "right" - : "false" - : "false", - url: - process.env.GATSBY_JUMBOTRON_IMAGE_URL && process.env.GATSBY_JUMBOTRON_IMAGE_URL !== "" - ? process.env.GATSBY_JUMBOTRON_IMAGE_URL - : "", + : "false", + url: window.sessionStorage.getItem("JUMBOTRON_IMAGE_URL") ?? "", }} /> )} diff --git a/pwa/src/templates/templateParts/resultsTemplates/table/TableResultTemplate.module.css b/pwa/src/templates/templateParts/resultsTemplates/table/TableResultTemplate.module.css index a9d0c4f3d..46fae5df0 100644 --- a/pwa/src/templates/templateParts/resultsTemplates/table/TableResultTemplate.module.css +++ b/pwa/src/templates/templateParts/resultsTemplates/table/TableResultTemplate.module.css @@ -67,48 +67,60 @@ .interactionLayer, .interfaceLayer { --utrecht-badge-background-color: var(--web-app-layer-color-interaction); + --utrecht-badge-color: #ffffff; } .interactionCategory, .interfaceCategory { --utrecht-badge-background-color: var(--web-app-layer-category-color-interaction); + --utrecht-badge-color: #000000; } .processLayer, .processsLayer { --utrecht-badge-background-color: var(--web-app-layer-color-process); + --utrecht-badge-color: #ffffff; } .procesCategory, .processCategory { --utrecht-badge-background-color: var(--web-app-layer-category-color-process); + --utrecht-badge-color: #000000; } .integrationLayer { --utrecht-badge-background-color: var(--web-app-layer-color-integration); + --utrecht-badge-color: #ffffff; } .integrationCategory { --utrecht-badge-background-color: var(--web-app-layer-category-color-integration); + --utrecht-badge-color: #000000; } .servicesLayer, .serviceLayer { --utrecht-badge-background-color: var(--web-app-layer-color-services); + --utrecht-badge-color: #ffffff; } .servicesCategory, .serviceCategory { --utrecht-badge-background-color: var(--web-app-layer-category-color-services); + --utrecht-badge-color: #000000; } .dataLayer { --utrecht-badge-background-color: var(--web-app-layer-color-data); + --utrecht-badge-color: #ffffff; } .dataCategory { --utrecht-badge-background-color: var(--web-app-layer-category-color-data); + --utrecht-badge-color: #000000; } .unknownLayer { --utrecht-badge-background-color: var(--web-app-layer-color-unknown); + --utrecht-badge-color: #ffffff; } .unknownCategory { --utrecht-badge-background-color: var(--web-app-layer-color-unknown); + --utrecht-badge-color: #000000; } diff --git a/pwa/src/templates/templateParts/themeSwitcherTopBar/ThemeSwitcherTopBar.module.css b/pwa/src/templates/templateParts/themeSwitcherTopBar/ThemeSwitcherTopBar.module.css new file mode 100644 index 000000000..44e80d740 --- /dev/null +++ b/pwa/src/templates/templateParts/themeSwitcherTopBar/ThemeSwitcherTopBar.module.css @@ -0,0 +1,22 @@ +.container { + top: 12px; + width: 80%; + z-index: 100; + padding: 12px 32px; + display: flex; + position: sticky; + border-radius: 5px; + align-items: center; + margin: 0 auto 24px; + background-color: white; + justify-content: space-between; + box-shadow: rgb(0, 0, 0, 0.1) 0px 0px 11px 0px; +} + +.container > * { + flex: 1; +} + +.label { + font-weight: 700 !important; +} diff --git a/pwa/src/templates/templateParts/themeSwitcherTopBar/ThemeSwitcherTopBar.tsx b/pwa/src/templates/templateParts/themeSwitcherTopBar/ThemeSwitcherTopBar.tsx new file mode 100644 index 000000000..497fd4a7b --- /dev/null +++ b/pwa/src/templates/templateParts/themeSwitcherTopBar/ThemeSwitcherTopBar.tsx @@ -0,0 +1,68 @@ +import * as React from "react"; +import * as styles from "./ThemeSwitcherTopBar.module.css"; +import { SelectSingle } from "@conduction/components"; +import { useForm } from "react-hook-form"; +import { availableThemes } from "../../../services/getConfig"; +import { useEnvironment } from "../../../hooks/useEnvironment"; +import { navigate } from "gatsby"; +import clsx from "clsx"; +import { Heading3, Paragraph } from "@utrecht/component-library-react"; +import { TSelectOption } from "@conduction/components/lib/components/formFields/select/select"; + +export const ThemeSwitcherTopBar: React.FC = () => { + const { initiateFromJSON } = useEnvironment(); + + const { + control, + register, + formState: { errors }, + watch, + setValue, + } = useForm(); + + const watchTheme = watch("theme"); + + React.useEffect(() => { + if (watchTheme) return; + + const themeOptions: TSelectOption[] = availableThemes.flatMap((group) => group.options); + + setValue( + "theme", + themeOptions.find((theme) => theme.value === window.sessionStorage.getItem("NL_DESIGN_THEME_CLASSNAME")), + ); // init select field based on domain name + }, []); + + React.useEffect(() => { + if (!watchTheme) return; + + navigate("/"); + + initiateFromJSON(watchTheme.value); + }, [watchTheme]); + + if (window.sessionStorage.getItem("SHOW_THEME_SWITCHER") === "true") { + return ( +
+
+ Open Catalogi organisatie switcher + + Verander van overheidsorganisatie om andere catalogi te bekijken +
+ +
+ Selecteer een overheidsorganisatie + + +
+
+ ); + } + + return <>; +}; diff --git a/pwa/static/.env.development b/pwa/static/.env.development index 83554c202..357dbd326 100644 --- a/pwa/static/.env.development +++ b/pwa/static/.env.development @@ -1,18 +1,16 @@ +GATSBY_SHOW_THEME_SWITCHER="false" + GATSBY_GITHUB_REPOSITORY_NAME=web-app # options: "true" | "false" GATSBY_USE_GITHUB_REPOSITORY_NAME_AS_PATH_PREFIX=false # Backend-config -GATSBY_ME_URL=https://api.opencatalogi.nl/api/users/me GATSBY_API_URL=https://api.opencatalogi.nl/api -GATSBY_ADMIN_URL=https://api.opencatalogi.nl/admin GATSBY_BASE_URL=https://api.opencatalogi.nl -GATSBY_FRONTEND_URL=https://api.opencatalogi.nl -GATSBY_LOGIN_REDIRECT=vault -GATSBY_ADMIN_DASHBOARD_URL=https://admin.opencatalogi.nl # Config GATSBY_NL_DESIGN_THEME_CLASSNAME=rotterdam-theme + # GATSBY_GITHUB_ORGANIZATION_URL="https://github.com/ConductionNL" GATSBY_FAVICON_URL="https://dev.opencatalogi.nl/static/logo_OpenCatalogi-8b1b0a001c3f37dae4d3f69b5964ec72.png" GATSBY_PAGE_TITLE= @@ -47,3 +45,6 @@ GATSBY_FOOTER_CONTENT_HEADER="" # Home GATSBY_OPTIONAL_START_PAGE= + +# Deployment option, if you're using this .env file DO NOT REMOVE OR EDIT THIS +GATSBY_ENV_VARS_SET="true" \ No newline at end of file diff --git a/pwa/static/configFiles/common-ground.json b/pwa/static/configFiles/common-ground.json new file mode 100644 index 000000000..458fe3f3d --- /dev/null +++ b/pwa/static/configFiles/common-ground.json @@ -0,0 +1,35 @@ +{ + "GATSBY_SHOW_THEME_SWITCHER": "false", + + "GATSBY_GITHUB_REPOSITORY_NAME": "web-app", + "GATSBY_USE_GITHUB_REPOSITORY_NAME_AS_PATH_PREFIX": "false", + + "GATSBY_API_URL": "https://api.opencatalogi.nl/api", + "GATSBY_BASE_URL": "https://api.opencatalogi.nl", + + "GATSBY_NL_DESIGN_THEME_CLASSNAME": "commonground-theme", + + "GATSBY_FAVICON_URL": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALQAAAC0CAYAAAA9zQYyAAAgy0lEQVR4nO2deZwdV3Xnv+dW1dt6l1qbJWuxZEm2MXgHY8AQfzCBkBCIPzgeSNhhhmRC+MxMgBAHAiTDhPCBmUwYYIAJBAgTMBgwYQ2bwYBXjI1kSZYsS9bSWnrv1++9qrp3/rhVr1ubpe5Xr5ea+/18nlrd77169ap+dercc8+5R6LvXHJQFAWjcTgWLaLAaBo+sEJ5olDzvUsORwsIxNpoHwh1ZArGzPceORyzRwSA0AdEBJnf3XE4WkMEjEGco+HIFU7QjlzhBO3IFU7QjlzhBO3IFU7QjlzhBO3IFU7QjlzhBO3IFU7QjlzhBO3IFU7QjlzhBO3IFU7QjlzhBO3IFU7QjlzhBO3IFU7QjlzhBO3IFU7QjlzhBO3IFU7QjlzhBO3IF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rP3TzC8y8eZGX/JDQUYWTdjLS71jcfWM4Hvr2GSEMp0HY9PSPUIsET4U9vOMDvXj1AVPNa7iy78AUNNAVnYpsjYWIoLLfZdEuuRXovh46NrTf8DEehdgAz9ggMP4AZecCmn0ZjNtHIr9D05xcgqegCX0NBQ6Q4NFTkV0908uD+TnYeKTMwGjBW84i0NDPoUot74rasJU31oBSUfE1fJWbtkhpPWV3lynVjtiNsKYJQESbri0y/GLSxnWkffrybf/rZSnYOlGnEQqWg2bKiysuvPspT141m1tZ5kQh6GqnvrMMkxzmypV6Ffiifj1TWQnkNFFdYgXsVkELSRjieel80nixHcAxqhzG1g1A7bH+Pq5AsmIMq0WwtN9+D0nMkFbYSg+cb8O1+x3Wfo2MBB4eLHBopcGSswOBEwHhdaERW5CrxiYtBTDkwdJcilnRELO9usKqnwcruhi0K8HWzZ7d936lWPUWndw9gcKTIZOjRVYro7rT9eKKkA0EWLD5BN5nmNxttha0b9ucJyfnqNGmlqe9tpl4nfpL870/znRePiM9EKm6wK/6LZ8DTJxbwJL41zZYUSWrv9GGJAbRALMSxzcJLB4TngjY2euF5BpQBLUSx/YAsF1mfmwT/tmA4IYFXfPADTh0YPlld0em2ZxasSzEbRMBLBGMAHQkm8k88dImIkyorUiWfbNwkscLTt3mupKKNY3tR0Jx4aY8FXYSCPpmTBO44LWl94RlrfZv/O/NrWv38uWD+J1YcjgxxgnbkCidoR65wgnbkCidoR65wgnbkCidoR65wgnbkCidoR65wgnbkCidoR65wgnbkCidoR65wgnbkCidoR65wgnbkCidoR65wgnbkCidoR65wgnbkCidoR65wgnbkCidoR65wgnbkCidoR65wgnbkCidoR65wgnbkCidoR65wgnbkCidoR65wgnbkCidoR65wgnbkCidoR65wgnbkCidoR65wgnbkCidoR65wgnbkCidoR65wgnbkCidoR65wgnbkCidoR65wgnbkCidoR67wAWMMxpj53hWHo2WMDwTKF8EJ2rGYEYhDE/jAgI5Nwej53iOHY/aIdZ4b/w8myviBwn627wAAAABJRU5ErkJggg==", + + "GATSBY_PAGE_TITLE": "Common Ground's Catalogi", + + "GATSBY_HEADER_LOGO_URL": "", + "GATSBY_HEADER_SHOW_LOGIN": "false", + "GATSBY_HEADER_CONTENT": "https://raw.githubusercontent.com/OpenCatalogi/web-app/main/pwa/src/templates/templateParts/header/HeaderContent.json", + + "GATSBY_JUMBOTRON_TITLE": "", + "GATSBY_JUMBOTRON_SUBTITLE": "", + "GATSBY_JUMBOTRON_IMAGE_PLACEMENT": "false", + "GATSBY_JUMBOTRON_IMAGE_URL": "", + "GATSBY_JUMBOTRON_DESCRIPTION": "", + "GATSBY_JUMBOTRON_ISCARD": "false", + "GATSBY_JUMBOTRON_SEARCHFORM": "true", + "GATSBY_JUMBOTRON_CONTAINER": "true", + + "GATSBY_FOOTER_SHOW_CREATOR": "false", + "GATSBY_FOOTER_LOGO_URL": "false", + "GATSBY_FOOTER_CONTENT": "https://raw.githubusercontent.com/OpenCatalogi/web-app/25995205e1dbb043822d1c58c5c23f8e6f77ff7e/pwa/src/templates/templateParts/footer/FooterContent.json", + "GATSBY_FOOTER_CONTENT_HEADER": "", + + "GATSBY_OPTIONAL_START_PAGE": "" +} diff --git a/pwa/static/configFiles/conduction.json b/pwa/static/configFiles/conduction.json new file mode 100644 index 000000000..a83887a85 --- /dev/null +++ b/pwa/static/configFiles/conduction.json @@ -0,0 +1,35 @@ +{ + "GATSBY_SHOW_THEME_SWITCHER": "false", + + "GATSBY_GITHUB_REPOSITORY_NAME": "web-app", + "GATSBY_USE_GITHUB_REPOSITORY_NAME_AS_PATH_PREFIX": "false", + + "GATSBY_API_URL": "https://api.opencatalogi.nl/api", + "GATSBY_BASE_URL": "https://api.opencatalogi.nl", + + "GATSBY_NL_DESIGN_THEME_CLASSNAME": "conduction-theme", + + "GATSBY_FAVICON_URL": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAACqVBMVEX////+/v/2+P/p7//q8P/3+f/+///5+//n7v++0P6Jqf2OrP3E0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ozWjomNi4f6LiExSV4/mTMlItU5Ld3f0yMjIjMrO0c+NzsS6kAbr7yYfBs1iYLAgMKi4pLSsnIpqYrKEu0qdYSC6prauvrYGHn5BmF5bcPGJlYfzmYUBY4Fai3+isUNrYJt6e36jU2sph06aAo6uwy7e3r7mPsneE4sV5PEqqBo0mRTRkbW8E4+BgasCoqnJMDDBruCqaqMDAyM7Hy4FEybHpdiyjpj5iwJPiwKpGZXT0uaM3ce5/wFdkGZfBgKFrL6LlqcVNy+REe4WGTpMinT5agKmlskImxWVK2UnzZNO2dVXIpZuMZqhII1/tOi165LUHNfv2Fju9KUTbM6pWxWbDbQttsC9VLK1hxtA52t27ZH1M3bsbOGP2LX7j36iorNe+tgyaV83345eeH0AwcPHXbhZwo/cnROrraS8opj8CTDd+j4iZOn5HtOnznbKXHu/IUG+YuXLk9GTrpsZtuvXG02SFp97brKDUvt6Gqumyy86FnmVv2N29rROZYGSXd0794zxcw+bp33z19oKCruefCwAiPVQ4Br+JGj6RsfHczgw5n3avudBbab4c29prVolgMAwXbN77JRtJ0AAAAASUVORK5CYII=", + + "GATSBY_PAGE_TITLE": "Conduction's Catalogi", + + "GATSBY_HEADER_LOGO_URL": "", + "GATSBY_HEADER_SHOW_LOGIN": "false", + "GATSBY_HEADER_CONTENT": "https://raw.githubusercontent.com/OpenCatalogi/web-app/main/pwa/src/templates/templateParts/header/HeaderContent.json", + + "GATSBY_JUMBOTRON_TITLE": "", + "GATSBY_JUMBOTRON_SUBTITLE": "", + "GATSBY_JUMBOTRON_IMAGE_PLACEMENT": "false", + "GATSBY_JUMBOTRON_IMAGE_URL": "", + "GATSBY_JUMBOTRON_DESCRIPTION": "", + "GATSBY_JUMBOTRON_ISCARD": "false", + "GATSBY_JUMBOTRON_SEARCHFORM": "true", + "GATSBY_JUMBOTRON_CONTAINER": "true", + + "GATSBY_FOOTER_SHOW_CREATOR": "true", + "GATSBY_FOOTER_LOGO_URL": "false", + "GATSBY_FOOTER_CONTENT": "https://raw.githubusercontent.com/OpenCatalogi/web-app/25995205e1dbb043822d1c58c5c23f8e6f77ff7e/pwa/src/templates/templateParts/footer/FooterContent.json", + "GATSBY_FOOTER_CONTENT_HEADER": "", + + "GATSBY_OPTIONAL_START_PAGE": "" +} diff --git a/pwa/static/configFiles/dimpact.json b/pwa/static/configFiles/dimpact.json new file mode 100644 index 000000000..3fa06d982 --- /dev/null +++ b/pwa/static/configFiles/dimpact.json @@ -0,0 +1,35 @@ +{ + "GATSBY_SHOW_THEME_SWITCHER": "false", + + "GATSBY_GITHUB_REPOSITORY_NAME": "web-app", + "GATSBY_USE_GITHUB_REPOSITORY_NAME_AS_PATH_PREFIX": "false", + + "GATSBY_API_URL": "https://api.opencatalogi.nl/api", + "GATSBY_BASE_URL": "https://api.opencatalogi.nl", + + "GATSBY_NL_DESIGN_THEME_CLASSNAME": "dimpact-theme", + + "GATSBY_FAVICON_URL": "https://openwebconcept.nl/wp-content/uploads/2019/07/cropped-Favicon-32x32.png", + + "GATSBY_PAGE_TITLE": "Leiden's Catalogi", + + "GATSBY_HEADER_LOGO_URL": "", + "GATSBY_HEADER_SHOW_LOGIN": "false", + "GATSBY_HEADER_CONTENT": "https://raw.githubusercontent.com/OpenCatalogi/web-app/main/pwa/src/templates/templateParts/header/HeaderContent.json", + + "GATSBY_JUMBOTRON_TITLE": "", + "GATSBY_JUMBOTRON_SUBTITLE": "", + "GATSBY_JUMBOTRON_IMAGE_PLACEMENT": "false", + "GATSBY_JUMBOTRON_IMAGE_URL": "", + "GATSBY_JUMBOTRON_DESCRIPTION": "", + "GATSBY_JUMBOTRON_ISCARD": "false", + "GATSBY_JUMBOTRON_SEARCHFORM": "true", + "GATSBY_JUMBOTRON_CONTAINER": "true", + + "GATSBY_FOOTER_SHOW_CREATOR": "false", + "GATSBY_FOOTER_LOGO_URL": "false", + "GATSBY_FOOTER_CONTENT": "https://raw.githubusercontent.com/OpenCatalogi/web-app/25995205e1dbb043822d1c58c5c23f8e6f77ff7e/pwa/src/templates/templateParts/footer/FooterContent.json", + "GATSBY_FOOTER_CONTENT_HEADER": "heading-3", + + "GATSBY_OPTIONAL_START_PAGE": "" +} diff --git a/pwa/static/configFiles/epe.json b/pwa/static/configFiles/epe.json new file mode 100644 index 000000000..e26e81bff --- /dev/null +++ b/pwa/static/configFiles/epe.json @@ -0,0 +1,36 @@ +{ + "GATSBY_SHOW_THEME_SWITCHER": "false", + + "GATSBY_GITHUB_REPOSITORY_NAME": "web-app", + "GATSBY_USE_GITHUB_REPOSITORY_NAME_AS_PATH_PREFIX": "false", + + "GATSBY_API_URL": "https://api.opencatalogi.nl/api", + "GATSBY_BASE_URL": "https://api.opencatalogi.nl", + + "GATSBY_NL_DESIGN_THEME_CLASSNAME": "epe-theme", + + "GATSBY_FAVICON_URL": "https://www.epe.nl/sites/default/themes/custom/toptasks_sub_theme/favicon/favicon-32x32.png", + + "GATSBY_PAGE_TITLE": "Epe's Catalogi", + + "GATSBY_HEADER_LOGO_URL": "", + "GATSBY_HEADER_SHOW_LOGIN": "false", + "GATSBY_HEADER_CONTENT": "https://raw.githubusercontent.com/OpenCatalogi/web-app/main/pwa/src/templates/templateParts/header/HeaderContent.json", + + "GATSBY_JUMBOTRON_TITLE": "", + "GATSBY_JUMBOTRON_SUBTITLE": "", + "GATSBY_JUMBOTRON_IMAGE_PLACEMENT": "false", + "GATSBY_JUMBOTRON_IMAGE_URL": "", + "GATSBY_JUMBOTRON_DESCRIPTION": "", + "GATSBY_JUMBOTRON_ISCARD": "false", + "GATSBY_JUMBOTRON_SEARCHFORM": "true", + "GATSBY_JUMBOTRON_CONTAINER": "true", + + "GATSBY_FOOTER_SHOW_CREATOR": "false", + "GATSBY_FOOTER_LOGO_URL": "false", + "GATSBY_FOOTER_CONTENT": "https://raw.githubusercontent.com/OpenCatalogi/web-app/25995205e1dbb043822d1c58c5c23f8e6f77ff7e/pwa/src/templates/templateParts/footer/FooterContent.json", + "GATSBY_FOOTER_CONTENT_HEADER": "heading-3", + + "GATSBY_OPTIONAL_START_PAGE": "" + } + \ No newline at end of file diff --git a/pwa/static/configFiles/leiden.json b/pwa/static/configFiles/leiden.json new file mode 100644 index 000000000..5eaf69f3a --- /dev/null +++ b/pwa/static/configFiles/leiden.json @@ -0,0 +1,35 @@ +{ + "GATSBY_SHOW_THEME_SWITCHER": "false", + + "GATSBY_GITHUB_REPOSITORY_NAME": "web-app", + "GATSBY_USE_GITHUB_REPOSITORY_NAME_AS_PATH_PREFIX": "false", + + "GATSBY_API_URL": "https://api.opencatalogi.nl/api", + "GATSBY_BASE_URL": "https://api.opencatalogi.nl", + + "GATSBY_NL_DESIGN_THEME_CLASSNAME": "leiden-theme", + + "GATSBY_FAVICON_URL": "https://gemeente.leiden.nl/typo3conf/ext/leiden_template/Resources/Public/Images/favicon/favicon-96x96.png", + + "GATSBY_PAGE_TITLE": "Leiden's Catalogi", + + "GATSBY_HEADER_LOGO_URL": "", + "GATSBY_HEADER_SHOW_LOGIN": "false", + "GATSBY_HEADER_CONTENT": "https://raw.githubusercontent.com/OpenCatalogi/web-app/main/pwa/src/templates/templateParts/header/HeaderContent.json", + + "GATSBY_JUMBOTRON_TITLE": "", + "GATSBY_JUMBOTRON_SUBTITLE": "", + "GATSBY_JUMBOTRON_IMAGE_PLACEMENT": "false", + "GATSBY_JUMBOTRON_IMAGE_URL": "", + "GATSBY_JUMBOTRON_DESCRIPTION": "", + "GATSBY_JUMBOTRON_ISCARD": "false", + "GATSBY_JUMBOTRON_SEARCHFORM": "true", + "GATSBY_JUMBOTRON_CONTAINER": "true", + + "GATSBY_FOOTER_SHOW_CREATOR": "false", + "GATSBY_FOOTER_LOGO_URL": "false", + "GATSBY_FOOTER_CONTENT": "https://raw.githubusercontent.com/OpenCatalogi/web-app/25995205e1dbb043822d1c58c5c23f8e6f77ff7e/pwa/src/templates/templateParts/footer/FooterContent.json", + "GATSBY_FOOTER_CONTENT_HEADER": "heading-3", + + "GATSBY_OPTIONAL_START_PAGE": "" +} diff --git a/pwa/static/configFiles/noordwijk.json b/pwa/static/configFiles/noordwijk.json new file mode 100644 index 000000000..26cc2cf32 --- /dev/null +++ b/pwa/static/configFiles/noordwijk.json @@ -0,0 +1,35 @@ +{ + "GATSBY_SHOW_THEME_SWITCHER": "false", + + "GATSBY_GITHUB_REPOSITORY_NAME": "web-app", + "GATSBY_USE_GITHUB_REPOSITORY_NAME_AS_PATH_PREFIX": "false", + + "GATSBY_API_URL": "https://api.opencatalogi.nl/api", + "GATSBY_BASE_URL": "https://api.opencatalogi.nl", + + "GATSBY_NL_DESIGN_THEME_CLASSNAME": "noordwijk-theme", + + "GATSBY_FAVICON_URL": "https://www.noordwijk.nl/wp-content/uploads/2023/02/cropped-favicon-32x32.png", + + "GATSBY_PAGE_TITLE": "Noordwijk's Catalogi", + + "GATSBY_HEADER_LOGO_URL": "", + "GATSBY_HEADER_SHOW_LOGIN": "false", + "GATSBY_HEADER_CONTENT": "https://raw.githubusercontent.com/OpenCatalogi/web-app/main/pwa/src/templates/templateParts/header/HeaderContent.json", + + "GATSBY_JUMBOTRON_TITLE": "", + "GATSBY_JUMBOTRON_SUBTITLE": "", + "GATSBY_JUMBOTRON_IMAGE_PLACEMENT": "false", + "GATSBY_JUMBOTRON_IMAGE_URL": "", + "GATSBY_JUMBOTRON_DESCRIPTION": "", + "GATSBY_JUMBOTRON_ISCARD": "false", + "GATSBY_JUMBOTRON_SEARCHFORM": "true", + "GATSBY_JUMBOTRON_CONTAINER": "true", + + "GATSBY_FOOTER_SHOW_CREATOR": "false", + "GATSBY_FOOTER_LOGO_URL": "false", + "GATSBY_FOOTER_CONTENT": "https://raw.githubusercontent.com/OpenCatalogi/web-app/25995205e1dbb043822d1c58c5c23f8e6f77ff7e/pwa/src/templates/templateParts/footer/FooterContent.json", + "GATSBY_FOOTER_CONTENT_HEADER": "heading-2", + + "GATSBY_OPTIONAL_START_PAGE": "" +} diff --git a/pwa/static/configFiles/open-webconcept.json b/pwa/static/configFiles/open-webconcept.json new file mode 100644 index 000000000..996c0c1e3 --- /dev/null +++ b/pwa/static/configFiles/open-webconcept.json @@ -0,0 +1,35 @@ +{ + "GATSBY_SHOW_THEME_SWITCHER": "false", + + "GATSBY_GITHUB_REPOSITORY_NAME": "web-app", + "GATSBY_USE_GITHUB_REPOSITORY_NAME_AS_PATH_PREFIX": "false", + + "GATSBY_API_URL": "https://api.opencatalogi.nl/api", + "GATSBY_BASE_URL": "https://api.opencatalogi.nl", + + "GATSBY_NL_DESIGN_THEME_CLASSNAME": "open-webconcept-theme", + + "GATSBY_FAVICON_URL": "https://openwebconcept.nl/wp-content/uploads/2019/07/cropped-Favicon-32x32.png", + + "GATSBY_PAGE_TITLE": "Open-Webconcept's Catalogi", + + "GATSBY_HEADER_LOGO_URL": "", + "GATSBY_HEADER_SHOW_LOGIN": "false", + "GATSBY_HEADER_CONTENT": "https://raw.githubusercontent.com/OpenCatalogi/web-app/main/pwa/src/templates/templateParts/header/HeaderContent.json", + + "GATSBY_JUMBOTRON_TITLE": "", + "GATSBY_JUMBOTRON_SUBTITLE": "", + "GATSBY_JUMBOTRON_IMAGE_PLACEMENT": "false", + "GATSBY_JUMBOTRON_IMAGE_URL": "", + "GATSBY_JUMBOTRON_DESCRIPTION": "", + "GATSBY_JUMBOTRON_ISCARD": "false", + "GATSBY_JUMBOTRON_SEARCHFORM": "true", + "GATSBY_JUMBOTRON_CONTAINER": "true", + + "GATSBY_FOOTER_SHOW_CREATOR": "false", + "GATSBY_FOOTER_LOGO_URL": "false", + "GATSBY_FOOTER_CONTENT": "https://raw.githubusercontent.com/OpenCatalogi/web-app/25995205e1dbb043822d1c58c5c23f8e6f77ff7e/pwa/src/templates/templateParts/footer/FooterContent.json", + "GATSBY_FOOTER_CONTENT_HEADER": "heading-2", + + "GATSBY_OPTIONAL_START_PAGE": "" +} diff --git a/pwa/static/configFiles/rotterdam.json b/pwa/static/configFiles/rotterdam.json new file mode 100644 index 000000000..29b106964 --- /dev/null +++ b/pwa/static/configFiles/rotterdam.json @@ -0,0 +1,35 @@ +{ + "GATSBY_SHOW_THEME_SWITCHER": "false", + + "GATSBY_GITHUB_REPOSITORY_NAME": "web-app", + "GATSBY_USE_GITHUB_REPOSITORY_NAME_AS_PATH_PREFIX": "false", + + "GATSBY_API_URL": "https://api.opencatalogi.nl/api", + "GATSBY_BASE_URL": "https://api.opencatalogi.nl", + + "GATSBY_NL_DESIGN_THEME_CLASSNAME": "rotterdam-theme", + + "GATSBY_FAVICON_URL": "https://dev.opencatalogi.nl/static/logo_OpenCatalogi-8b1b0a001c3f37dae4d3f69b5964ec72.png", + + "GATSBY_PAGE_TITLE": "Rotterdam's Catalogi", + + "GATSBY_HEADER_LOGO_URL": "", + "GATSBY_HEADER_SHOW_LOGIN": "false", + "GATSBY_HEADER_CONTENT": "https://raw.githubusercontent.com/OpenCatalogi/web-app/main/pwa/src/templates/templateParts/header/HeaderContent.json", + + "GATSBY_JUMBOTRON_TITLE": "", + "GATSBY_JUMBOTRON_SUBTITLE": "", + "GATSBY_JUMBOTRON_IMAGE_PLACEMENT": "false", + "GATSBY_JUMBOTRON_IMAGE_URL": "", + "GATSBY_JUMBOTRON_DESCRIPTION": "", + "GATSBY_JUMBOTRON_ISCARD": "false", + "GATSBY_JUMBOTRON_SEARCHFORM": "true", + "GATSBY_JUMBOTRON_CONTAINER": "true", + + "GATSBY_FOOTER_SHOW_CREATOR": "false", + "GATSBY_FOOTER_LOGO_URL": "false", + "GATSBY_FOOTER_CONTENT": "https://raw.githubusercontent.com/OpenCatalogi/web-app/25995205e1dbb043822d1c58c5c23f8e6f77ff7e/pwa/src/templates/templateParts/footer/FooterContent.json", + "GATSBY_FOOTER_CONTENT_HEADER": "", + + "GATSBY_OPTIONAL_START_PAGE": "" +} diff --git a/pwa/tsconfig.json b/pwa/tsconfig.json index 08214f8e7..fa9e3c446 100644 --- a/pwa/tsconfig.json +++ b/pwa/tsconfig.json @@ -8,6 +8,7 @@ "moduleResolution": "node", "esModuleInterop": true, "forceConsistentCasingInFileNames": true, + "resolveJsonModule": true, "strict": true, "skipLibCheck": true },