Skip to content

Commit

Permalink
Merge pull request #1417 from digitalgreenorg/moa_images
Browse files Browse the repository at this point in the history
eth_moa new instance added and relative images in home updated
  • Loading branch information
sohit-dg authored Sep 16, 2024
2 parents f6aa627 + dea0fb8 commit d102e40
Show file tree
Hide file tree
Showing 15 changed files with 298 additions and 18 deletions.
9 changes: 9 additions & 0 deletions src/common/utils/MetaData.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@ export const getMetaData = (instance) => {
Get involved in Ethiopia's agriculture revolution. FarmStack's Data Sharing Platform connects stakeholders for data-driven farming success`;
faviconImage = eadpFavicon;
}
if (instance === "ETH_MOA") {
title = instance?.browser_title ? instance?.browser_title : "FarmStack";
description = `Explore MoA's Data Sharing Tool (FarmStack), powered by FarmStack. Collaborate, analyze, and innovate in agriculture.
Join the future of Ethiopian agriculture with our Data Sharing Platform, supported by FarmStack. Access, share, and transform agri data today.
FarmStack's MoA's Data sharing Tool (FarmStack) - the hub for sharing, discovering, and leveraging agricultural insights and knowledge.
Discover the power of data collaboration in Ethiopian agriculture. Join FarmStack's Data Sharing Platform to drive growth and sustainability.
Get involved in Ethiopia's agriculture revolution. FarmStack's Data Sharing Platform connects stakeholders for data-driven farming success`;
faviconImage = eadpFavicon;
}

if (instance === "DEFAULT") {
title = "FarmStack : Powered by Digital Green";
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions src/features/default/src/Layout/Datahub.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,9 @@ function Datahub(props) {
{globalConfig?.navBar === "DEFAULT" ? (
<DefaultNavbar loginType={"admin"} />
) : null}
{globalConfig?.navBar === "EADP" && (
<EadpNavbar loginType={"admin"} />
)}
{(globalConfig?.navBar === "EADP" || globalConfig?.navBar === "ETH_MOA") && (
<EadpNavbar loginType={"admin"} />
)}
{globalConfig?.navBar === "VISTAAR" && (
<VistaarNavbar loginType={"admin"} />
)}
Expand Down Expand Up @@ -604,7 +604,7 @@ function Datahub(props) {
{globalConfig?.footer === "DEFAULT" && (
<DefaultFooter loginType={"admin"} />
)}
{globalConfig?.footer === "EADP" && !footerMatch && (
{(globalConfig?.footer === "EADP" || globalConfig?.footer === "ETH_MOA") && !footerMatch && (
<EadpFooter loginType={"admin"} />
)}
{globalConfig?.footer === "KADP" && (
Expand Down
4 changes: 2 additions & 2 deletions src/features/default/src/Layout/GuestRoutes.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ const GuestRoutes = () => {
}
/>
) : null}
{globalConfig?.navBar === "EADP" && (
{(globalConfig?.navBar === "EADP" || globalConfig?.navBar === "ETH_MOA") && (
<EadpNavbar
loginType={
isLoggedInUserAdmin() || (isLoggedInUserCoSteward() && isVerified)
Expand Down Expand Up @@ -255,7 +255,7 @@ const GuestRoutes = () => {
}
/>
)}
{globalConfig?.footer === "EADP" && (
{(globalConfig?.footer === "EADP" || globalConfig?.footer === "ETH_MOA") && (
<EadpFooter
loginType={
isLoggedInUserAdmin() || (isLoggedInUserCoSteward() && isVerified)
Expand Down
4 changes: 2 additions & 2 deletions src/features/default/src/Layout/Participant.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ function Participant(props) {
{globalConfig?.navBar === "DEFAULT" ? (
<DefaultNavbar loginType={"participant"} />
) : null}
{globalConfig?.navBar === "EADP" && (
{(globalConfig?.navBar === "EADP" || globalConfig?.navBar === "ETH_MOA") && (
<EadpNavbar loginType={"participant"} />
)}
{globalConfig?.navBar === "VISTAAR" && (
Expand Down Expand Up @@ -395,7 +395,7 @@ function Participant(props) {
{globalConfig?.footer === "DEFAULT" && (
<DefaultFooter loginType={"participant"} />
)}
{globalConfig?.footer === "EADP" &&
{(globalConfig?.footer === "EADP" || globalConfig?.footer === "ETH_MOA") &&
!footerMatch(<EadpFooter loginType={"participant"} />)}
{globalConfig?.footer === "KADP" && (
<KadpFooter loginType={"participant"} />
Expand Down
3 changes: 2 additions & 1 deletion src/features/default/src/Views/Dashboard/DashboardNew.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@ function DashboardNew() {
Track and optimize network activities effortlessly. Gain valuable
insights for efficient operations.
</div>
{process.env.REACT_APP_INSTANCE === "EADP" && (
{(process.env.REACT_APP_INSTANCE === "EADP" ||
process.env.REACT_APP_INSTANCE === "ETH_MOA") && (
<Button
variant="contained"
sx={{ marginTop: "25px" }}
Expand Down
9 changes: 8 additions & 1 deletion src/features/default/src/Views/GuestUser/GuestUserHomeNew.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import DefaultFirstSection from "../../common/sections/first/default/FirstSectio
import EadpFirstSection from "../../common/sections/first/eadp/FirstSection";
import KadpFirstSection from "../../common/sections/first/kadp/FirstSection";
import VistaarFirstSection from "../../common/sections/first/vistaar/FirstSection";
import ETHMoAFirstSection from "../../common/sections/first/ethmoa/FirstSection"
import ETHfourth_image from "../../../../../features/default/src/Assets/Img/ethmoa/MoA_3.jpg"

import globalConfig from "globalConfig";
import SecondSection from "../../common/sections/second/Section";
Expand Down Expand Up @@ -51,6 +53,9 @@ const GuestUserHome = () => {
{globalConfig?.enableBanner && globalConfig?.banner === "VISTAAR" && (
<VistaarFirstSection />
)}
{globalConfig?.enableBanner && globalConfig?.banner === "ETH_MOA" && (
<ETHMoAFirstSection />
)}
{globalConfig?.enableSections?.datasets && (
<Box
className={
Expand Down Expand Up @@ -268,7 +273,9 @@ const GuestUserHome = () => {
: process.env.REACT_APP_INSTANCE === "KADP"
? fourth_home
: process.env.REACT_APP_INSTANCE === "VISTAAR"
? micro3
? micro3
: process.env.REACT_APP_INSTANCE === "ETH_MOA"
? ETHfourth_image
: micro3
}
width={"100%"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,45 @@
width: 100vw;
}

.top_row_in_home_mobile_eadp {
background: linear-gradient(to right,
rgba(0, 0, 0, 0) 0%,
rgba(0, 0, 0, 0.6) 50%),
url("../../Assets/Img/eadp/image_1.jpg");
background-repeat: no-repeat;
background-size: cover;
color: white !important;
position: sticky;
width: 100vw;
background-size: contain;
}
/* ETHMOA */
.top_row_in_home_ethmoa{
background: linear-gradient(to right,
rgba(0, 0, 0, 0) 0%,
rgba(0, 0, 0, 0.6) 50%),
url("../../Assets/Img/ethmoa/MoA_0.jpeg");
background-repeat: no-repeat;
background-size: cover;
color: white !important;
position: sticky;
width: 100vw;
}

.top_row_in_home_mobile_ethmoa {
background: linear-gradient(to right,
rgba(0, 0, 0, 0) 0%,
rgba(0, 0, 0, 0.6) 50%),
url("../../Assets/Img/ethmoa/MoA_0.jpeg");
background-repeat: no-repeat;
background-size: cover;
color: white !important;
position: sticky;
width: 100vw;
background-size: contain;
}


.top_row_in_home_mobile_eadp {
background: linear-gradient(to right,
rgba(0, 0, 0, 0) 0%,
Expand Down
215 changes: 215 additions & 0 deletions src/features/default/src/common/sections/first/ethmoa/FirstSection.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,215 @@
import React from "react";
import LocalStyle from "../../../../Views/GuestUser/GuestUserHomeNew.module.css";
import microsite_point4 from "../../../../Assets/Img/microsite_point4.svg";
import microsite_point3 from "../../../../Assets/Img/microsite_point3.svg";
import microsite_point2 from "../../../../Assets/Img/microsite_point2.svg";
import microsite_point1 from "../../../../Assets/Img/microsite_point1.svg";
import {
Box,
Button,
Typography,
useMediaQuery,
useTheme,
} from "@mui/material";
import { Col, Row } from "react-bootstrap";
import GlobalStyles from "../../../../Assets/CSS/global.module.css";
import { useHistory } from "react-router-dom";
import { TypeAnimation } from "react-type-animation";

const FirstSection = () => {
const history = useHistory();
const theme = useTheme();
const mobile = useMediaQuery(theme.breakpoints.down("sm"));
const tablet = useMediaQuery(theme.breakpoints.down("md"));
const desktop = useMediaQuery(theme.breakpoints.up("xl"));

const responsive_top_row = {
padding: mobile || tablet ? "0px 10px" : "0px 144px",
};
return (
<>
<Box
sx={{ width: "100%" }}
className={
(mobile
? LocalStyle.container_mobile
: tablet
? LocalStyle.container_tablet
: desktop
? LocalStyle.container_desktop
: LocalStyle.container_large) + " mainBoxForGuestHome"
}
>
<Row
className={
mobile && tablet
? LocalStyle.top_row_in_home_mobile_ethmoa
: LocalStyle.top_row_in_home_ethmoa
}
style={responsive_top_row}
>
<Col xs={12} sm={12} md={12} xl={6}>
<div
className={`${
mobile
? LocalStyle.titleContainer_mobile
: tablet
? LocalStyle.titleContainer_tablet
: LocalStyle.titleContainer
}`}
>
<Typography
className={`${LocalStyle.title} ${GlobalStyles.bold300} ${
mobile ? GlobalStyles.size20 : GlobalStyles.size45
} ${GlobalStyles.highlighted_text_in_home} ${
mobile ? "" : LocalStyle.lineheight_50
}`}
>
Ethiopia Agricultural Data Sharing Platform
</Typography>
<Typography
className={`${
mobile || tablet
? LocalStyle.textDescription_mobile
: LocalStyle.textDescription
} ${GlobalStyles.bold400} ${
mobile ? GlobalStyles.size14 : GlobalStyles.size22
} ${GlobalStyles.highlighted_text_in_home}`}
>
<b style={{ fontWeight: "bold" }}></b>
<TypeAnimation
sequence={[
`Revolutionary approach to data exchange in agriculture by
fostering collaboration between organisations and harnessing the
power of collective data.`, // Types 'Three' without deleting 'Two'
]}
wrapper="span"
cursor={true}
repeat={true}
style={{
// fontSize: mobile ? "14px" : "20px",
display: "inline-block",
color: "white",
minHeight: mobile ? "110px" : "80px",
}}
className={`${
mobile || tablet
? LocalStyle.text_with_typing_mobile
: LocalStyle.text_with_typing
}`}
// className={ LocalStyle.text_with_typing}
/>
<b style={{ fontWeight: "bold" }}></b>
</Typography>
</div>
<Row
className={
mobile
? LocalStyle.buttonContainer_mobile
: tablet
? LocalStyle.buttonContainer_tablet
: LocalStyle.buttonContainer
}
>
<Button
onClick={() => history.push("/home/get-started")}
id="home-get-started-btn"
data-testid={"home-get-started-btn-test"}
className={`${
mobile || tablet
? LocalStyle.primaryButton_mobile
: LocalStyle.primaryButton
} ${GlobalStyles.primary_button}`}
>
Get Started
</Button>
</Row>
<Row>
<Col
className={`${
mobile || tablet
? LocalStyle.pointContainer_mobile
: LocalStyle.pointContainer
}`}
xl={6}
>
<span className={LocalStyle.greenBox}>
<img src={microsite_point1} />
</span>
<span
style={{
color: mobile ? "black" : tablet ? "white" : "white",
}}
>
Connect, Share, Discover{" "}
</span>
</Col>
<Col
className={`${
mobile || tablet
? LocalStyle.pointContainer_mobile
: LocalStyle.pointContainer
}`}
xl={6}
>
<span className={LocalStyle.greenBox}>
<img src={microsite_point2} />
</span>
<span
style={{
color: mobile ? "black" : tablet ? "white" : "white",
}}
>
Unlock data insights
</span>
</Col>
</Row>
<Row>
<Col
className={`${
mobile || tablet
? LocalStyle.pointContainer_mobile
: LocalStyle.pointContainer
}`}
xl={6}
>
<span className={LocalStyle.greenBox}>
<img src={microsite_point3} />
</span>
<span
style={{
color: mobile ? "black" : tablet ? "white" : "white",
}}
>
Derive value from data
</span>
</Col>
<Col
className={`${
mobile || tablet
? LocalStyle.pointContainer_mobile
: LocalStyle.pointContainer
}`}
xl={6}
>
<span className={LocalStyle.greenBox}>
<img src={microsite_point4} />
</span>
<span
style={{
color: mobile ? "black" : tablet ? "white" : "white",
}}
>
Secured data exchange
</span>
</Col>
</Row>
</Col>
<Col xs={12} sm={12} md={12} xl={6}></Col>
</Row>
</Box>
</>
);
};

export default FirstSection;
Loading

0 comments on commit d102e40

Please sign in to comment.