diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 42b3b7172..1219b455a 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -83,6 +83,7 @@ module.exports = { // TODO - enable these new recommended rules, a first step would be to switch from "off" to "warn" '@typescript-eslint/explicit-module-boundary-types': 'off', '@typescript-eslint/no-floating-promises': 'off', + '@typescript-eslint/no-misused-promises': 'off', '@typescript-eslint/no-extra-semi': 'off', '@typescript-eslint/no-unsafe-assignment': 'off', '@typescript-eslint/no-unsafe-call': 'off', diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 339b600ae..c0ec057b3 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -65,8 +65,8 @@ jobs: yarn workspace site build:ssr yarn workspace site build:prerender - name: Replace site placeholders in netlify.toml redirection file - run: sed -i "s|:SITE_FR|$FR_BASE_URL|g" netlify.toml; - sed -i "s|:SITE_EN|$EN_BASE_URL|g" netlify.toml; + run: sed -i "s|:SITE_FR|$FR_BASE_URL|g" site/netlify.toml; + sed -i "s|:SITE_EN|$EN_BASE_URL|g" site/netlify.toml; - name: Update Algolia index run: yarn workspace site algolia:update env: @@ -79,7 +79,7 @@ jobs: name: static-site path: | site/dist/** - netlify.toml + site/netlify.toml if-no-files-found: error deploy-preview: @@ -97,7 +97,7 @@ jobs: - id: deploy-netlify uses: nwtgck/actions-netlify@v1.1 with: - publish-dir: './site/dist' + publish-dir: '.' netlify-config-path: ./netlify.toml production-deploy: false github-token: ${{ secrets.GITHUB_TOKEN }} @@ -126,7 +126,7 @@ jobs: - id: deploy-netlify uses: nwtgck/actions-netlify@v1.1 with: - publish-dir: './site/dist' + publish-dir: '.' netlify-config-path: ./netlify.toml production-deploy: true github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/babel.config.json b/babel.config.json deleted file mode 100644 index 130fee74c..000000000 --- a/babel.config.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "presets": [ - [ - "@babel/preset-env", - { - "targets": { - "node": "current" - } - } - ], - [ - "@babel/preset-react", - { - "runtime": "automatic" - } - ], - "@babel/preset-typescript" - ], - "plugins": [ - "babel-plugin-styled-components", - "@babel/plugin-proposal-class-properties", - "@babel/plugin-proposal-optional-chaining", - "@babel/plugin-proposal-nullish-coalescing-operator", - "@babel/plugin-proposal-object-rest-spread", - "@babel/plugin-syntax-dynamic-import" - ] -} diff --git a/netlify.toml b/site/netlify.toml similarity index 60% rename from netlify.toml rename to site/netlify.toml index e7a1c58ff..b439aa2f2 100644 --- a/netlify.toml +++ b/site/netlify.toml @@ -96,70 +96,70 @@ Content-Security-Policy = "default-src 'self' mon-entreprise.fr; style-src 'self to = "/sitemap.fr.txt" status = 200 -[[redirects]] - from = ":SITE_FR" - to = "/prerender/mon-entreprise/index.html" - status = 200 +# [[redirects]] +# from = ":SITE_FR" +# to = "/prerender/mon-entreprise/index.html" +# status = 200 -[[redirects]] - from = ":SITE_FR/cr%C3%A9er" - to = "/prerender/mon-entreprise/cr%C3%A9er/index.html" - status = 200 +# [[redirects]] +# from = ":SITE_FR/cr%C3%A9er" +# to = "/prerender/mon-entreprise/cr%C3%A9er/index.html" +# status = 200 -[[redirects]] - from = ":SITE_FR/g%C3%A9rer" - to = "/prerender/mon-entreprise/g%C3%A9rer/index.html" - status = 200 +# [[redirects]] +# from = ":SITE_FR/g%C3%A9rer" +# to = "/prerender/mon-entreprise/g%C3%A9rer/index.html" +# status = 200 -[[redirects]] - from = ":SITE_FR/simulateurs" - to = "/prerender/mon-entreprise/simulateurs/index.html" - status = 200 +# [[redirects]] +# from = ":SITE_FR/simulateurs" +# to = "/prerender/mon-entreprise/simulateurs/index.html" +# status = 200 -[[redirects]] - from = ":SITE_FR/simulateurs/ch%C3%B4mage-partiel" - to = "/prerender/mon-entreprise/simulateurs/ch%C3%B4mage-partiel/index.html" - status = 200 +# [[redirects]] +# from = ":SITE_FR/simulateurs/ch%C3%B4mage-partiel" +# to = "/prerender/mon-entreprise/simulateurs/ch%C3%B4mage-partiel/index.html" +# status = 200 -[[redirects]] - from = ":SITE_FR/simulateurs/salaire-brut-net" - to = "/prerender/mon-entreprise/simulateurs/salaire-brut-net/index.html" - status = 200 +# [[redirects]] +# from = ":SITE_FR/simulateurs/salaire-brut-net" +# to = "/prerender/mon-entreprise/simulateurs/salaire-brut-net/index.html" +# status = 200 -[[redirects]] - from = ":SITE_FR/simulateurs/auto-entrepreneur" - to = "/prerender/mon-entreprise/simulateurs/auto-entrepreneur/index.html" - status = 200 +# [[redirects]] +# from = ":SITE_FR/simulateurs/auto-entrepreneur" +# to = "/prerender/mon-entreprise/simulateurs/auto-entrepreneur/index.html" +# status = 200 -[[redirects]] - from = ":SITE_FR/simulateurs/ind%C3%A9pendant" - to = "/prerender/mon-entreprise/simulateurs/ind%C3%A9pendant/index.html" - status = 200 +# [[redirects]] +# from = ":SITE_FR/simulateurs/ind%C3%A9pendant" +# to = "/prerender/mon-entreprise/simulateurs/ind%C3%A9pendant/index.html" +# status = 200 -[[redirects]] - from = ":SITE_FR/simulateurs/dirigeant-sasu" - to = "/prerender/mon-entreprise/simulateurs/dirigeant-sasu/index.html" - status = 200 +# [[redirects]] +# from = ":SITE_FR/simulateurs/dirigeant-sasu" +# to = "/prerender/mon-entreprise/simulateurs/dirigeant-sasu/index.html" +# status = 200 -[[redirects]] - from = ":SITE_FR/simulateurs/artiste-auteur" - to = "/prerender/mon-entreprise/simulateurs/artiste-auteur/index.html" - status = 200 +# [[redirects]] +# from = ":SITE_FR/simulateurs/artiste-auteur" +# to = "/prerender/mon-entreprise/simulateurs/artiste-auteur/index.html" +# status = 200 -[[redirects]] - from = ":SITE_FR/iframes/simulateur-embauche" - to = "/prerender/mon-entreprise/iframes/simulateur-embauche/index.html" - status = 200 +# [[redirects]] +# from = ":SITE_FR/iframes/simulateur-embauche" +# to = "/prerender/mon-entreprise/iframes/simulateur-embauche/index.html" +# status = 200 -[[redirects]] - from = ":SITE_FR/iframes/simulateur-chomage-partiel" - to = "/prerender/mon-entreprise/iframes/simulateur-chomage-partiel/index.html" - status = 200 +# [[redirects]] +# from = ":SITE_FR/iframes/simulateur-chomage-partiel" +# to = "/prerender/mon-entreprise/iframes/simulateur-chomage-partiel/index.html" +# status = 200 -[[redirects]] - from = ":SITE_FR/iframes/pamc" - to = "/prerender/mon-entreprise/iframes/pamc/index.html" - status = 200 +# [[redirects]] +# from = ":SITE_FR/iframes/pamc" +# to = "/prerender/mon-entreprise/iframes/pamc/index.html" +# status = 200 [[redirects]] from = ":SITE_FR/*" @@ -180,20 +180,20 @@ Content-Security-Policy = "default-src 'self' mon-entreprise.fr; style-src 'self to = "/sitemap.en.txt" status = 200 -[[redirects]] - from = ":SITE_EN" - to = "/prerender/infrance/index.html" - status = 200 +# [[redirects]] +# from = ":SITE_EN" +# to = "/prerender/infrance/index.html" +# status = 200 -[[redirects]] - from = ":SITE_EN/calculators/salary" - to = "/prerender/infrance/calculators/salary/index.html" - status = 200 +# [[redirects]] +# from = ":SITE_EN/calculators/salary" +# to = "/prerender/infrance/calculators/salary/index.html" +# status = 200 -[[redirects]] - from = ":SITE_EN/iframes/simulateur-embauche" - to = "/prerender/infrance/iframes/simulateur-embauche/index.html" - status = 200 +# [[redirects]] +# from = ":SITE_EN/iframes/simulateur-embauche" +# to = "/prerender/infrance/iframes/simulateur-embauche/index.html" +# status = 200 [[redirects]] from = ":SITE_EN/*" diff --git a/site/package.json b/site/package.json index 5cc759c68..2664945b3 100644 --- a/site/package.json +++ b/site/package.json @@ -19,17 +19,18 @@ ], "scripts": { "prepare": "node scripts/prepare.js", + "start": "vite dev", "build": "vite build", + "serve:dev": "concurrently -k \"yarn run serve:dev:mon-entreprise\" \"yarn run serve:dev:infrance\"", + "serve:dev:mon-entreprise": "PORT=5000 serve --config serve.mon-entreprise.json --no-clipboard", + "serve:dev:infrance": "PORT=5001 serve --config serve.infrance.json --no-clipboard", "typecheck:watch": "tsc --skipLibCheck --noEmit --watch", "test": "vitest", "test:dev-e2e:mon-entreprise": "cypress open --browser chromium", "test:dev-e2e:mycompanyinfrance": "cypress open --browser chromium --config baseUrl=http://localhost:8080/infrance,integrationFolder=cypress/integration/mon-entreprise/english --env language=en", "test:record-http-calls:mon-entreprise": "cypress run --env record_http=", - "start": "WATCH_MODELE_SOCIAL=1 vite", - "serve:dev:mycompanyinfrance": "PORT=5001 serve --config serve.infrance.json --no-clipboard", "algolia:update": "node scripts/search/update-data.js", - "algolia:clean": "node scripts/search/clean.js", - "preview": "vite preview" + "algolia:clean": "node scripts/search/clean.js" }, "resolutions": { "@mui/styled-engine": "npm:@mui/styled-engine-sc@latest" @@ -68,7 +69,7 @@ "ramda": "^0.27.0", "react": "^17.0.0", "react-color": "^2.14.0", - "react-dom": "npm:@hot-loader/react-dom", + "react-dom": "^17.0.0", "react-easy-emoji": "^1.2.0", "react-helmet-async": "^1.1.2", "react-i18next": "^11.0.0", @@ -93,15 +94,6 @@ "yaml": "^1.9.2" }, "devDependencies": { - "@babel/core": "^7.9.0", - "@babel/plugin-proposal-class-properties": "^7.8.3", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-proposal-object-rest-spread": "^7.9.5", - "@babel/plugin-proposal-optional-chaining": "^7.9.0", - "@babel/plugin-syntax-dynamic-import": "^7.8.3", - "@babel/preset-env": "^7.9.5", - "@babel/preset-react": "^7.9.4", - "@babel/preset-typescript": "^7.9.0", "@react-types/numberfield": "^3.1.0", "@react-types/searchfield": "^3.1.2", "@rollup/plugin-yaml": "^3.1.0", @@ -137,9 +129,9 @@ "prettier": "^2.3.2", "rimraf": "^3.0.2", "rollup-plugin-toml": "^1.0.0", + "serve": "^13.0.2", "typescript": "^4.3.2", "vite": "^2.7.7", - "vite-plugin-html": "2.1.1", "vitest": "^0.0.116", "xml2js": "^0.4.23" } diff --git a/site/serve.infrance.json b/site/serve.infrance.json new file mode 100644 index 000000000..c546aef83 --- /dev/null +++ b/site/serve.infrance.json @@ -0,0 +1,4 @@ +{ + "rewrites": [{ "source": "**", "destination": "infrance.html" }], + "public": "dist" +} diff --git a/site/serve.mon-entreprise.json b/site/serve.mon-entreprise.json new file mode 100644 index 000000000..a0077af85 --- /dev/null +++ b/site/serve.mon-entreprise.json @@ -0,0 +1,4 @@ +{ + "rewrites": [{ "source": "**", "destination": "mon-entreprise.html" }], + "public": "dist" +} diff --git a/site/source/Provider.tsx b/site/source/Provider.tsx index 48e68beb7..e44b02cf3 100644 --- a/site/source/Provider.tsx +++ b/site/source/Provider.tsx @@ -30,7 +30,7 @@ import { // ATInternet Tracking import { TrackingContext } from './ATInternetTracking' import { createTracker } from './ATInternetTracking/Tracker' -import logo from './static/images/logo-monentreprise.svg' +import logo from 'Images/logo-monentreprise.svg' import safeLocalStorage from './storage/safeLocalStorage' import { inIframe } from './utils' diff --git a/site/source/components/conversation/select/SelectTauxRisque.jsx b/site/source/components/conversation/select/SelectTauxRisque.jsx index ad1ed551d..ef42ec576 100644 --- a/site/source/components/conversation/select/SelectTauxRisque.jsx +++ b/site/source/components/conversation/select/SelectTauxRisque.jsx @@ -4,6 +4,8 @@ import { Trans, useTranslation } from 'react-i18next' import Worker from './SelectTauxRisque.worker.js?worker' const worker = new Worker() +console.log(worker) + function SelectComponent({ onChange, onSubmit, options, autoFocus }) { const [searchResults, setSearchResults] = useState() let submitOnChange = (option) => { diff --git a/site/source/entry.en.tsx b/site/source/entry.en.tsx index 7cface1ca..5d663b80d 100644 --- a/site/source/entry.en.tsx +++ b/site/source/entry.en.tsx @@ -1,3 +1,4 @@ +import { I18nProvider } from '@react-aria/i18n' import rules from 'modele-social' import { render } from 'react-dom' import 'regenerator-runtime/runtime' @@ -7,18 +8,17 @@ import ruleTranslations from './locales/rules-en.yaml' import translateRules from './locales/translateRules' import translations from './locales/ui-en.yaml' import './sentry' -import { I18nProvider } from '@react-aria/i18n' i18next.addResourceBundle('en', 'translation', translations) i18next.changeLanguage('en') -const anchor = document.querySelector('#js') -render( +const AppEn = () => ( - , - anchor + ) + +render(, document.querySelector('#js')) diff --git a/site/source/entry.fr.tsx b/site/source/entry.fr.tsx index b9378bb2d..d60628d4b 100644 --- a/site/source/entry.fr.tsx +++ b/site/source/entry.fr.tsx @@ -1,18 +1,17 @@ +import { I18nProvider } from '@react-aria/i18n' import rules from 'modele-social' import { render } from 'react-dom' import 'regenerator-runtime/runtime' import App from './App' import i18next from './locales/i18n' -import { I18nProvider } from '@react-aria/i18n' - import './sentry' i18next.changeLanguage('fr') -const anchor = document.querySelector('#js') -render( +const AppFr = () => ( - , - anchor + ) + +render(, document.querySelector('#js')) diff --git a/site/source/static/images/Urssaf.svg b/site/source/images/Urssaf.svg similarity index 100% rename from site/source/static/images/Urssaf.svg rename to site/source/images/Urssaf.svg diff --git a/site/source/static/images/assurance-maladie.svg b/site/source/images/assurance-maladie.svg similarity index 100% rename from site/source/static/images/assurance-maladie.svg rename to site/source/images/assurance-maladie.svg diff --git a/site/source/static/images/banner-share.png b/site/source/images/banner-share.png similarity index 100% rename from site/source/static/images/banner-share.png rename to site/source/images/banner-share.png diff --git a/site/source/static/images/banner-share.svg b/site/source/images/banner-share.svg similarity index 100% rename from site/source/static/images/banner-share.svg rename to site/source/images/banner-share.svg diff --git a/site/source/static/images/company.svg b/site/source/images/company.svg similarity index 100% rename from site/source/static/images/company.svg rename to site/source/images/company.svg diff --git a/site/source/static/images/destinataires/Urssaf.png b/site/source/images/destinataires/Urssaf.png similarity index 100% rename from site/source/static/images/destinataires/Urssaf.png rename to site/source/images/destinataires/Urssaf.png diff --git a/site/source/static/images/destinataires/Urssaf.svg b/site/source/images/destinataires/Urssaf.svg similarity index 100% rename from site/source/static/images/destinataires/Urssaf.svg rename to site/source/images/destinataires/Urssaf.svg diff --git a/site/source/static/images/destinataires/agff.png b/site/source/images/destinataires/agff.png similarity index 100% rename from site/source/static/images/destinataires/agff.png rename to site/source/images/destinataires/agff.png diff --git a/site/source/static/images/destinataires/agirc.png b/site/source/images/destinataires/agirc.png similarity index 100% rename from site/source/static/images/destinataires/agirc.png rename to site/source/images/destinataires/agirc.png diff --git a/site/source/static/images/destinataires/cnav.png b/site/source/images/destinataires/cnav.png similarity index 100% rename from site/source/static/images/destinataires/cnav.png rename to site/source/images/destinataires/cnav.png diff --git a/site/source/static/images/destinataires/destinataires.yaml b/site/source/images/destinataires/destinataires.yaml similarity index 100% rename from site/source/static/images/destinataires/destinataires.yaml rename to site/source/images/destinataires/destinataires.yaml diff --git a/site/source/static/images/destinataires/salarié.png b/site/source/images/destinataires/salarié.png similarity index 100% rename from site/source/static/images/destinataires/salarié.png rename to site/source/images/destinataires/salarié.png diff --git a/site/source/static/images/estimate.svg b/site/source/images/estimate.svg similarity index 100% rename from site/source/static/images/estimate.svg rename to site/source/images/estimate.svg diff --git a/site/source/static/images/hiring.svg b/site/source/images/hiring.svg similarity index 100% rename from site/source/static/images/hiring.svg rename to site/source/images/hiring.svg diff --git a/site/source/static/images/logo-backup.svg b/site/source/images/logo-backup.svg similarity index 100% rename from site/source/static/images/logo-backup.svg rename to site/source/images/logo-backup.svg diff --git a/site/source/static/images/logo-dgfip.svg b/site/source/images/logo-dgfip.svg similarity index 100% rename from site/source/static/images/logo-dgfip.svg rename to site/source/images/logo-dgfip.svg diff --git a/site/source/static/images/logo-monentreprise.svg b/site/source/images/logo-monentreprise.svg similarity index 100% rename from site/source/static/images/logo-monentreprise.svg rename to site/source/images/logo-monentreprise.svg diff --git a/site/source/static/images/logo-mycompany-share.png b/site/source/images/logo-mycompany-share.png similarity index 100% rename from site/source/static/images/logo-mycompany-share.png rename to site/source/images/logo-mycompany-share.png diff --git a/site/source/static/images/logo-mycompany.svg b/site/source/images/logo-mycompany.svg similarity index 100% rename from site/source/static/images/logo-mycompany.svg rename to site/source/images/logo-mycompany.svg diff --git a/site/source/static/images/logo-share.png b/site/source/images/logo-share.png similarity index 100% rename from site/source/static/images/logo-share.png rename to site/source/images/logo-share.png diff --git a/site/source/static/images/logo.svg b/site/source/images/logo.svg similarity index 100% rename from site/source/static/images/logo.svg rename to site/source/images/logo.svg diff --git a/site/source/static/images/logos-caisses-retraite/carcdsf.jpg b/site/source/images/logos-caisses-retraite/carcdsf.jpg similarity index 100% rename from site/source/static/images/logos-caisses-retraite/carcdsf.jpg rename to site/source/images/logos-caisses-retraite/carcdsf.jpg diff --git a/site/source/static/images/logos-caisses-retraite/carmf.png b/site/source/images/logos-caisses-retraite/carmf.png similarity index 100% rename from site/source/static/images/logos-caisses-retraite/carmf.png rename to site/source/images/logos-caisses-retraite/carmf.png diff --git a/site/source/static/images/logos-caisses-retraite/carpimko.png b/site/source/images/logos-caisses-retraite/carpimko.png similarity index 100% rename from site/source/static/images/logos-caisses-retraite/carpimko.png rename to site/source/images/logos-caisses-retraite/carpimko.png diff --git a/site/source/static/images/logos-caisses-retraite/cavec.jpg b/site/source/images/logos-caisses-retraite/cavec.jpg similarity index 100% rename from site/source/static/images/logos-caisses-retraite/cavec.jpg rename to site/source/images/logos-caisses-retraite/cavec.jpg diff --git a/site/source/static/images/logos-caisses-retraite/cavp.svg b/site/source/images/logos-caisses-retraite/cavp.svg similarity index 100% rename from site/source/static/images/logos-caisses-retraite/cavp.svg rename to site/source/images/logos-caisses-retraite/cavp.svg diff --git a/site/source/static/images/logos-caisses-retraite/cipav.png b/site/source/images/logos-caisses-retraite/cipav.png similarity index 100% rename from site/source/static/images/logos-caisses-retraite/cipav.png rename to site/source/images/logos-caisses-retraite/cipav.png diff --git a/site/source/static/images/logos-caisses-retraite/cnbf.png b/site/source/images/logos-caisses-retraite/cnbf.png similarity index 100% rename from site/source/static/images/logos-caisses-retraite/cnbf.png rename to site/source/images/logos-caisses-retraite/cnbf.png diff --git a/site/source/static/images/logos-caisses-retraite/index.tsx b/site/source/images/logos-caisses-retraite/index.tsx similarity index 100% rename from site/source/static/images/logos-caisses-retraite/index.tsx rename to site/source/images/logos-caisses-retraite/index.tsx diff --git a/site/source/static/images/logos-caisses-retraite/ircec.jpg b/site/source/images/logos-caisses-retraite/ircec.jpg similarity index 100% rename from site/source/static/images/logos-caisses-retraite/ircec.jpg rename to site/source/images/logos-caisses-retraite/ircec.jpg diff --git a/site/source/static/images/map-directions.png b/site/source/images/map-directions.png similarity index 100% rename from site/source/static/images/map-directions.png rename to site/source/images/map-directions.png diff --git a/site/source/static/images/marianne.svg b/site/source/images/marianne.svg similarity index 100% rename from site/source/static/images/marianne.svg rename to site/source/images/marianne.svg diff --git a/site/source/static/images/mycompany-logo-partage.png b/site/source/images/mycompany-logo-partage.png similarity index 100% rename from site/source/static/images/mycompany-logo-partage.png rename to site/source/images/mycompany-logo-partage.png diff --git a/site/source/static/images/publicodes.png b/site/source/images/publicodes.png similarity index 100% rename from site/source/static/images/publicodes.png rename to site/source/images/publicodes.png diff --git a/site/source/static/images/revenus.svg b/site/source/images/revenus.svg similarity index 100% rename from site/source/static/images/revenus.svg rename to site/source/images/revenus.svg diff --git a/site/source/static/images/références/Urssaf.svg b/site/source/images/références/Urssaf.svg similarity index 100% rename from site/source/static/images/références/Urssaf.svg rename to site/source/images/références/Urssaf.svg diff --git a/site/source/static/images/références/agirc-arrco.png b/site/source/images/références/agirc-arrco.png similarity index 100% rename from site/source/static/images/références/agirc-arrco.png rename to site/source/images/références/agirc-arrco.png diff --git a/site/source/static/images/références/ameli.png b/site/source/images/références/ameli.png similarity index 100% rename from site/source/static/images/références/ameli.png rename to site/source/images/références/ameli.png diff --git a/site/source/static/images/références/bpi-création.png b/site/source/images/références/bpi-création.png similarity index 100% rename from site/source/static/images/références/bpi-création.png rename to site/source/images/références/bpi-création.png diff --git a/site/source/static/images/références/ladocumentationfrançaise.png b/site/source/images/références/ladocumentationfrançaise.png similarity index 100% rename from site/source/static/images/références/ladocumentationfrançaise.png rename to site/source/images/références/ladocumentationfrançaise.png diff --git a/site/source/static/images/références/marianne.png b/site/source/images/références/marianne.png similarity index 100% rename from site/source/static/images/références/marianne.png rename to site/source/images/références/marianne.png diff --git a/site/source/static/images/références/pole-emploi.png b/site/source/images/références/pole-emploi.png similarity index 100% rename from site/source/static/images/références/pole-emploi.png rename to site/source/images/références/pole-emploi.png diff --git a/site/source/static/images/références/senat.png b/site/source/images/références/senat.png similarity index 100% rename from site/source/static/images/références/senat.png rename to site/source/images/références/senat.png diff --git a/site/source/pages/Gerer/AideDéclarationIndépendant/FormulaireRésultatComplet.tsx b/site/source/pages/Gerer/AideDéclarationIndépendant/FormulaireRésultatComplet.tsx deleted file mode 100644 index e69de29bb..000000000 diff --git a/site/source/static/favicon/android-chrome-192x192.png b/site/source/public/favicon/android-chrome-192x192.png similarity index 100% rename from site/source/static/favicon/android-chrome-192x192.png rename to site/source/public/favicon/android-chrome-192x192.png diff --git a/site/source/static/favicon/android-chrome-512x512.png b/site/source/public/favicon/android-chrome-512x512.png similarity index 100% rename from site/source/static/favicon/android-chrome-512x512.png rename to site/source/public/favicon/android-chrome-512x512.png diff --git a/site/source/static/favicon/apple-touch-icon.png b/site/source/public/favicon/apple-touch-icon.png similarity index 100% rename from site/source/static/favicon/apple-touch-icon.png rename to site/source/public/favicon/apple-touch-icon.png diff --git a/site/source/static/favicon/favicon-16x16.png b/site/source/public/favicon/favicon-16x16.png similarity index 100% rename from site/source/static/favicon/favicon-16x16.png rename to site/source/public/favicon/favicon-16x16.png diff --git a/site/source/static/favicon/favicon-32x32.png b/site/source/public/favicon/favicon-32x32.png similarity index 100% rename from site/source/static/favicon/favicon-32x32.png rename to site/source/public/favicon/favicon-32x32.png diff --git a/site/source/static/favicon/favicon.ico b/site/source/public/favicon/favicon.ico similarity index 100% rename from site/source/static/favicon/favicon.ico rename to site/source/public/favicon/favicon.ico diff --git a/site/source/static/favicon/site.webmanifest b/site/source/public/favicon/site.webmanifest similarity index 100% rename from site/source/static/favicon/site.webmanifest rename to site/source/public/favicon/site.webmanifest diff --git a/site/source/static/fonts/montserrat-v18-latin-700.woff b/site/source/public/fonts/montserrat-v18-latin-700.woff similarity index 100% rename from site/source/static/fonts/montserrat-v18-latin-700.woff rename to site/source/public/fonts/montserrat-v18-latin-700.woff diff --git a/site/source/static/fonts/montserrat-v18-latin-700.woff2 b/site/source/public/fonts/montserrat-v18-latin-700.woff2 similarity index 100% rename from site/source/static/fonts/montserrat-v18-latin-700.woff2 rename to site/source/public/fonts/montserrat-v18-latin-700.woff2 diff --git a/site/source/static/fonts/roboto-v29-latin-500.woff b/site/source/public/fonts/roboto-v29-latin-500.woff similarity index 100% rename from site/source/static/fonts/roboto-v29-latin-500.woff rename to site/source/public/fonts/roboto-v29-latin-500.woff diff --git a/site/source/static/fonts/roboto-v29-latin-500.woff2 b/site/source/public/fonts/roboto-v29-latin-500.woff2 similarity index 100% rename from site/source/static/fonts/roboto-v29-latin-500.woff2 rename to site/source/public/fonts/roboto-v29-latin-500.woff2 diff --git a/site/source/static/fonts/roboto-v29-latin-500italic.woff b/site/source/public/fonts/roboto-v29-latin-500italic.woff similarity index 100% rename from site/source/static/fonts/roboto-v29-latin-500italic.woff rename to site/source/public/fonts/roboto-v29-latin-500italic.woff diff --git a/site/source/static/fonts/roboto-v29-latin-500italic.woff2 b/site/source/public/fonts/roboto-v29-latin-500italic.woff2 similarity index 100% rename from site/source/static/fonts/roboto-v29-latin-500italic.woff2 rename to site/source/public/fonts/roboto-v29-latin-500italic.woff2 diff --git a/site/source/static/fonts/roboto-v29-latin-700.woff b/site/source/public/fonts/roboto-v29-latin-700.woff similarity index 100% rename from site/source/static/fonts/roboto-v29-latin-700.woff rename to site/source/public/fonts/roboto-v29-latin-700.woff diff --git a/site/source/static/fonts/roboto-v29-latin-700.woff2 b/site/source/public/fonts/roboto-v29-latin-700.woff2 similarity index 100% rename from site/source/static/fonts/roboto-v29-latin-700.woff2 rename to site/source/public/fonts/roboto-v29-latin-700.woff2 diff --git a/site/source/static/fonts/roboto-v29-latin-700italic.woff b/site/source/public/fonts/roboto-v29-latin-700italic.woff similarity index 100% rename from site/source/static/fonts/roboto-v29-latin-700italic.woff rename to site/source/public/fonts/roboto-v29-latin-700italic.woff diff --git a/site/source/static/fonts/roboto-v29-latin-700italic.woff2 b/site/source/public/fonts/roboto-v29-latin-700italic.woff2 similarity index 100% rename from site/source/static/fonts/roboto-v29-latin-700italic.woff2 rename to site/source/public/fonts/roboto-v29-latin-700italic.woff2 diff --git a/site/source/static/fonts/roboto-v29-latin-italic.woff b/site/source/public/fonts/roboto-v29-latin-italic.woff similarity index 100% rename from site/source/static/fonts/roboto-v29-latin-italic.woff rename to site/source/public/fonts/roboto-v29-latin-italic.woff diff --git a/site/source/static/fonts/roboto-v29-latin-italic.woff2 b/site/source/public/fonts/roboto-v29-latin-italic.woff2 similarity index 100% rename from site/source/static/fonts/roboto-v29-latin-italic.woff2 rename to site/source/public/fonts/roboto-v29-latin-italic.woff2 diff --git a/site/source/static/fonts/roboto-v29-latin-regular.woff b/site/source/public/fonts/roboto-v29-latin-regular.woff similarity index 100% rename from site/source/static/fonts/roboto-v29-latin-regular.woff rename to site/source/public/fonts/roboto-v29-latin-regular.woff diff --git a/site/source/static/fonts/roboto-v29-latin-regular.woff2 b/site/source/public/fonts/roboto-v29-latin-regular.woff2 similarity index 100% rename from site/source/static/fonts/roboto-v29-latin-regular.woff2 rename to site/source/public/fonts/roboto-v29-latin-regular.woff2 diff --git a/site/source/static/google12806d2f3452e656.html b/site/source/public/google12806d2f3452e656.html similarity index 100% rename from site/source/static/google12806d2f3452e656.html rename to site/source/public/google12806d2f3452e656.html diff --git a/site/source/static/manifest.webmanifest b/site/source/public/manifest.webmanifest similarity index 100% rename from site/source/static/manifest.webmanifest rename to site/source/public/manifest.webmanifest diff --git a/site/source/static/robots.en.txt b/site/source/public/robots.en.txt similarity index 100% rename from site/source/static/robots.en.txt rename to site/source/public/robots.en.txt diff --git a/site/source/static/robots.fr.txt b/site/source/public/robots.fr.txt similarity index 100% rename from site/source/static/robots.fr.txt rename to site/source/public/robots.fr.txt diff --git a/site/source/static/sitemap.en.txt b/site/source/public/sitemap.en.txt similarity index 100% rename from site/source/static/sitemap.en.txt rename to site/source/public/sitemap.en.txt diff --git a/site/source/static/sitemap.fr.txt b/site/source/public/sitemap.fr.txt similarity index 100% rename from site/source/static/sitemap.fr.txt rename to site/source/public/sitemap.fr.txt diff --git a/site/source/redirects.jsx b/site/source/redirects.jsx index 060e67406..410f97bbd 100644 --- a/site/source/redirects.jsx +++ b/site/source/redirects.jsx @@ -1,5 +1,5 @@ import { Redirect } from 'react-router-dom' -import netlifyToml from '../../netlify.toml' +import netlifyToml from '../netlify.toml' export default netlifyToml.redirects .filter(({ from, status }) => status === 301 && !from.startsWith('https')) diff --git a/site/source/sitePaths.ts b/site/source/sitePaths.ts index e47b8cb2b..5a259699c 100644 --- a/site/source/sitePaths.ts +++ b/site/source/sitePaths.ts @@ -197,11 +197,19 @@ export const generateSiteMap = (sitePaths: SitePathsType): SiteMap => sitePaths ) +// TODO: HACKY, find a better way to expose this information +const basePathFr = import.meta.env.PROD + ? import.meta.env.VITE_FR_BASE_URL + : '/mon-entreprise' +const basePathEn = import.meta.env.PROD + ? import.meta.env.VITE_EN_BASE_URL + : '/infrance' + const enSiteMap = generateSiteMap(constructLocalizedSitePath('en')).map( - (path) => import.meta.env.VITE_EN_BASE_URL + path + (path) => 'http://' + window.location.host + basePathEn + path ) const frSiteMap = generateSiteMap(constructLocalizedSitePath('fr')).map( - (path) => import.meta.env.VITE_FR_BASE_URL + path + (path) => 'http://' + window.location.host + basePathFr + path ) export const hrefLangLink = { diff --git a/site/index.html b/site/source/template.html similarity index 92% rename from site/index.html rename to site/source/template.html index f00f7ccee..2871a0158 100644 --- a/site/index.html +++ b/site/source/template.html @@ -31,9 +31,26 @@ name="google-site-verification" content="lO4OheVzHWfvwcoUC-1VKN_GTWtA5vEM-uPZqb2PORs" /> - + + + + + + @@ -155,6 +172,7 @@
+