Skip to content

Commit 4effd61

Browse files
Add OCA package announcement banner
1 parent e13e4dd commit 4effd61

File tree

4 files changed

+94
-22
lines changed

4 files changed

+94
-22
lines changed

public/locales/en/translation.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -295,5 +295,6 @@
295295
"Include catalogue information in markdown readme": "Include catalogue information in markdown readme",
296296
"Note: Downloading two files": "Note: Downloading two files",
297297
"1) Schema in .txt format, readable and archivable.": "1) Schema in .txt format, readable and archivable.",
298-
"2) Schema in .zip format. Must be kept zipped. Can be used by computers including tools on the Semantic Engine.": "2) Schema in .zip format. Must be kept zipped. Can be used by computers including tools on the Semantic Engine."
298+
"2) Schema in .zip format. Must be kept zipped. Can be used by computers including tools on the Semantic Engine.": "2) Schema in .zip format. Must be kept zipped. Can be used by computers including tools on the Semantic Engine.",
299+
"Early March, OCA package is coming to the Semantic Engine. All tools still work the same way, but you will download your OCA schema as a .json instead of .zip.": "Early March, OCA package is coming to the Semantic Engine. All tools still work the same way, but you will download your OCA schema as a .json instead of .zip."
299300
}

public/locales/fr/translation.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -294,5 +294,6 @@
294294
"Include catalogue information in markdown readme": "Inclure les informations du catalogue dans le fichier Lisez-moi Markdown",
295295
"Note: Downloading two files": "Remarque : Téléchargement de deux fichiers",
296296
"1) Schema in .txt format, readable and archivable.": "1) Schéma au format .txt, lisible et archivable.",
297-
"2) Schema in .zip format. Must be kept zipped. Can be used by computers including tools on the Semantic Engine.": "2) Schéma au format .zip. Doit être conservé zippé. Peut être utilisé par des ordinateurs, y compris des outils sur le moteur sémantique."
297+
"2) Schema in .zip format. Must be kept zipped. Can be used by computers including tools on the Semantic Engine.": "2) Schéma au format .zip. Doit être conservé zippé. Peut être utilisé par des ordinateurs, y compris des outils sur le moteur sémantique.",
298+
"Early March, OCA package is coming to the Semantic Engine. All tools still work the same way, but you will download your OCA schema as a .json instead of .zip.": "Début mars, le package OCA arrive sur le moteur sémantique. Tous les outils fonctionnent toujours de la même manière, mais vous téléchargerez votre schéma OCA au format .json au lieu de .zip."
298299
}

src/Landing/Landing.js

+55-20
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,78 @@
1-
import { Box } from '@mui/material';
2-
import React, { useContext, useEffect } from 'react';
3-
import { CustomPalette } from '../constants/customPalette';
4-
import QuickStart from './Quick_Start';
5-
import Introduction from './Introduction';
6-
import AccordionList from './AccordionList';
7-
import { useLocation } from 'react-router-dom';
8-
import { Context } from '../App';
9-
import Footer from '../Footer/Footer';
10-
import Header from '../Header/Header';
1+
import { Box } from "@mui/material";
2+
import React, { useContext, useEffect } from "react";
3+
import { useLocation } from "react-router-dom";
4+
import { CustomPalette } from "../constants/customPalette";
5+
import QuickStart from "./Quick_Start";
6+
import Introduction from "./Introduction";
7+
import AccordionList from "./AccordionList";
8+
import { Context } from "../App";
9+
import Footer from "../Footer/Footer";
10+
import Header from "../Header/Header";
11+
import OCAPackageAnnouncementBanner from "./OCAPackageAnnouncementBanner";
1112

1213
const Landing = () => {
1314
const path = useLocation();
1415
const { setCurrentPage } = useContext(Context);
1516

1617
useEffect(() => {
17-
if (path.pathname === '/') {
18-
setCurrentPage('Landing');
18+
if (path.pathname === "/") {
19+
setCurrentPage("Landing");
1920
}
2021
}, [path.pathname, setCurrentPage]);
2122

2223
return (
2324
<>
25+
<OCAPackageAnnouncementBanner />
2426
<Header currentPage="Landing" />
25-
<Box sx={{ display: 'flex', flexDirection: 'column', justifyContent: 'center', alignItems: 'center' }}>
26-
<Box sx={{ backgroundColor: CustomPalette.PRIMARY, width: '100%', height: '100%', paddingTop: 10, paddingBottom: 12, display: 'flex', flexDirection: 'column', justifyContent: 'center', alignItems: 'center' }}>
27+
<Box
28+
sx={{
29+
display: "flex",
30+
flexDirection: "column",
31+
justifyContent: "center",
32+
alignItems: "center"
33+
}}
34+
>
35+
<Box
36+
sx={{
37+
backgroundColor: CustomPalette.PRIMARY,
38+
width: "100%",
39+
height: "100%",
40+
paddingTop: 10,
41+
paddingBottom: 12,
42+
display: "flex",
43+
flexDirection: "column",
44+
justifyContent: "center",
45+
alignItems: "center"
46+
}}
47+
>
2748
<Introduction />
2849
</Box>
29-
<Box sx={{ display: 'flex', flexDirection: 'row', justifyContent: 'center', backgroundColor: '#ffefea', width: '100%' }}>
50+
<Box
51+
sx={{
52+
display: "flex",
53+
flexDirection: "row",
54+
justifyContent: "center",
55+
backgroundColor: "#ffefea",
56+
width: "100%"
57+
}}
58+
>
3059
<QuickStart />
3160
</Box>
32-
<Box sx={{ width: '100%', display: 'flex', flexDirection: 'row', justifyContent: 'center', marginTop: '30px' }}>
61+
<Box
62+
sx={{
63+
width: "100%",
64+
display: "flex",
65+
flexDirection: "row",
66+
justifyContent: "center",
67+
marginTop: "30px"
68+
}}
69+
>
3370
<AccordionList />
3471
</Box>
35-
</Box >
72+
</Box>
3673
<Footer currentPage="Landing" />
3774
</>
38-
3975
);
4076
};
4177

42-
43-
export default Landing;
78+
export default Landing;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import { Box, Link, Typography } from "@mui/material";
2+
import React from "react";
3+
import i18next from "i18next";
4+
import { useTranslation } from "react-i18next";
5+
6+
const OCAPackageAnnouncementBanner = () => {
7+
const { t } = useTranslation();
8+
9+
return (
10+
<Box
11+
sx={{
12+
backgroundColor: "#ffe880",
13+
padding: 2
14+
}}
15+
>
16+
<Typography>
17+
{t(
18+
"Early March, OCA package is coming to the Semantic Engine. All tools still work the same way, but you will download your OCA schema as a .json instead of .zip."
19+
)}{" "}
20+
<Link
21+
href={`https://agrifooddatacanada.github.io/OCA_Composer_help_pages/${i18next.language === "en-US" || i18next.language === "en-CA" ? "en" : i18next.language}/ChangeLog/`}
22+
target="_blank"
23+
rel="noopener noreferrer"
24+
sx={{
25+
cursor: "pointer"
26+
}}
27+
>
28+
{t("Learn more")}
29+
</Link>
30+
</Typography>
31+
</Box>
32+
);
33+
};
34+
35+
export default OCAPackageAnnouncementBanner;

0 commit comments

Comments
 (0)