Skip to content

Commit e7532e4

Browse files
author
amoludage
committed
Merge branch 'website-in-react' into homepage-styles
2 parents f26dd63 + 26d4a01 commit e7532e4

File tree

14 files changed

+342
-178
lines changed

14 files changed

+342
-178
lines changed
-167 KB
Binary file not shown.
-77.1 KB
Binary file not shown.
183 KB
Loading
66.4 KB
Loading
13.5 KB
Loading
10.9 KB
Loading

src/components/home/domainExpertise.js

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@ import React, { Fragment } from 'react'
22
import { Row, Col } from 'reactstrap';
33
import { Link } from "react-router-dom";
44

5-
import { Heading1, ParallaxImg, DomainText } from "./homeStyledComponents.js";
5+
import { Heading1, DomainText } from "./homeStyledComponents.js";
66
import previousSvg from "../../assets/images/previous.svg";
77
import nextSvg from "../../assets/images/next.svg";
8-
import redArrowSvg from "../../assets/images/arrow-red.svg"
98
import JoshCarousel from './carousel.js';
109

1110
import * as routes from "../../routeConstants.js";
@@ -15,7 +14,7 @@ const DomainExpertise = (props) => {
1514
const carouselItems = domainsData.map(domain => {
1615
return (
1716
<div style={{ borderRight: '1px solid #ececec' }}>
18-
<img src={require(`../../assets/images/technologies/${domain.logo}`)} alt={domain.name} key={domain.name} />
17+
<img className="img-fluid" src={require(`../../assets/images/technologies/${domain.logo}`)} alt={domain.name} key={domain.name} />
1918
</div>
2019
)
2120
})
@@ -55,9 +54,10 @@ const DomainExpertise = (props) => {
5554
slidesToScroll: 6,
5655
centerPadding: "15px",
5756
adaptiveHeight: true,
57+
initialSlide: 0,
5858
dotsClass: "slick-dots slick-thumb bottom-50",
59-
nextArrow: <NextArrow />,
6059
prevArrow: <PreviousArrow />,
60+
nextArrow: <NextArrow />,
6161
customPaging: () => <div className="rounded-circle orange-color" />,
6262
responsive: [
6363
{
@@ -123,13 +123,15 @@ const DomainExpertise = (props) => {
123123
{industriesData.map(industry => {
124124
return <Col sm={6} md={4} xs={6} className="pb-14" key={industry.name}>
125125
<Link to={`${routes.DOMAIN_EXPERTISE}/${industry.name.toLowerCase()}`} className="text-decoration-none">
126-
<ParallaxImg logo={require(`../../assets/images/home/${industry.bgImg}`)} height="120px">
127-
<div className="text-center pt-md-3">
128-
<img src={require(`../../assets/images/home/${industry.logo}`)} alt={industry.name} /> <br />
126+
127+
<div className="img-container text-center pt-md-3">
128+
<img alt={industry.name} src={require(`../../assets/images/home/${industry.bgImg}`)} className="img-fluid" />
129+
<div className="img-centered-text">
130+
<img className="img-fluid" src={require(`../../assets/images/home/${industry.logo}`)} alt={industry.name} /> <br />
129131
<DomainText>{industry.name}</DomainText>
130-
<img src={redArrowSvg} alt={industry.name} />
131132
</div>
132-
</ParallaxImg>
133+
</div>
134+
133135
</Link>
134136
</Col>
135137
})}

src/components/home/homePage.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
1-
import React, { Fragment } from 'react'
1+
import React, { Fragment, useState } from 'react'
22
import Media from 'react-media';
33
import { Link } from 'react-router-dom';
44
import { Button, Row, Col } from "reactstrap";
55

6-
import mainImg from '../../assets/images/black-bulb-image.png';
7-
import logoM from '../../assets/images/bulb-image-mobile.png';
6+
import mainImg from '../../assets/images/home/black-bulb-image.png';
7+
import logoM from '../../assets/images/home/bulb-image-mobile.png';
88

99
import { ParallaxImg, BannerSubText, BannerText, ConctactUsRightText } from "./homeStyledComponents.js"
1010
import * as routeConstants from "../../routeConstants.js";
1111
import whatsNewLogo from "../../assets/images/home/whats_new.svg";
1212
import whatsTrendingMb from "../../assets/images/home/whats_trending_mb.svg";
13+
import whatsTrendingHover from "../../assets/images/home/whats_trending_hover.png"
1314

1415
const HomePage = (props) => {
1516
const { setOpenTrending } = props;
17+
const [hoverState, setHoverState] = useState(false);
1618

1719
return (
1820
<>
1921
<div style={{ backgroundColor: "#333333", }}>
2022
<div className="row">
21-
2223
<div className="col-md-6 col-xs-12">
2324
<Media query="(max-width: 500px)">
2425
{matches =>
@@ -51,8 +52,11 @@ const HomePage = (props) => {
5152
}
5253
</Media>
5354
<div className="col-md-2 d-xs-none ">
54-
<div onClick={setOpenTrending} className="img-container cursor-pointer">
55-
<img src={whatsNewLogo} alt="What's Trending?" />
55+
<div onClick={setOpenTrending} className="img-container cursor-pointer"
56+
onMouseOver={() => setHoverState(true)}
57+
onMouseOut={() => setHoverState(false)}
58+
>
59+
<img src={hoverState ? whatsTrendingHover : whatsNewLogo} alt="What's Trending?" />
5660
<span className="img-centered-text">What's <br /> Trending?</span>
5761
</div>
5862
</div>

src/components/home/successStories.js

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ import successStoriesBg from "../../assets/images/home/successStoryBg.png";
77
import mobileSuccessStoriesBg from "../../assets/images/home/mob_sucess_stories.png";
88
import { ParallaxImg, Heading1Orange } from './homeStyledComponents';
99

10-
const SuccessStories = () => {
10+
const SuccessStories = (props) => {
11+
const { stories } = props;
1112

1213
return <Media query="(max-width: 900px)">
1314
{matches =>
@@ -23,11 +24,15 @@ const SuccessStories = () => {
2324
</Row>
2425
</ParallaxImg>
2526
<ul className="succss-stories">
26-
<li className="bullet font-weight-bold"><Link to="success_stories">Freedom from Diabetes</Link></li>
27-
{/* <li className="bullet font-weight-bold"><Link to="success_stories">Freedom from Diabetes</Link></li>
28-
<li className="bullet font-weight-bold"><Link to="success_stories">Freedom from Diabetes</Link></li>
29-
<li className="bullet font-weight-bold"><Link to="success_stories">Freedom from Diabetes</Link></li>
30-
<li className="bullet font-weight-bold"><Link to="success_stories">Freedom from Diabetes</Link></li> */}
27+
{
28+
stories.map(story => {
29+
return (
30+
<li className="bullet font-weight-bold" key={story.name}>
31+
<Link to={`/success_stories/${story.slug}`} >{story.name}</Link>
32+
</li>
33+
)
34+
})
35+
}
3136
</ul>
3237
</Fragment>
3338
) : (
@@ -38,11 +43,15 @@ const SuccessStories = () => {
3843
</Col>
3944
<Col md={6} className="d-flex justify-content-start align-items-center">
4045
<ul className="w-100 text-white">
41-
<li className="bullet font-weight-bold"><Link to="/success_stories" >Freedom from Diabetes</Link></li>
42-
{/* <li className="bullet font-weight-bold"><Link to="" >Freedom from Diabetes</Link></li>
43-
<li className="bullet font-weight-bold"><Link to="" >Freedom from Diabetes</Link></li>
44-
<li className="bullet font-weight-bold"><Link to="" >Freedom from Diabetes</Link></li>
45-
<li className="bullet font-weight-bold"><Link to="" >Freedom from Diabetes</Link></li> */}
46+
{
47+
stories.map(story => {
48+
return (
49+
<li className="bullet font-weight-bold" key={story.name}>
50+
<Link to={`/success_stories/${story.slug}`} >{story.name}</Link>
51+
</li>
52+
)
53+
})
54+
}
4655
</ul>
4756
</Col>
4857
</Row>
@@ -52,4 +61,12 @@ const SuccessStories = () => {
5261
</Media>
5362
}
5463

64+
SuccessStories.defaultProps = {
65+
stories: [
66+
{ name: "Freedom from Diabetes", slug: "ffd" },
67+
{ name: "BrandScope", slug: "brandscope" },
68+
{ name: "Star Network", slug: "star" }
69+
]
70+
}
71+
5572
export default SuccessStories;
Lines changed: 10 additions & 151 deletions
Original file line numberDiff line numberDiff line change
@@ -1,157 +1,16 @@
1-
import React, { Fragment } from "react";
2-
import Media from "react-media";
3-
import { Row, Col } from "reactstrap";
4-
import { Link } from "react-router-dom";
1+
import React from "react";
2+
import { Route, Redirect } from 'react-router-dom';
53

6-
import { PinkDiv, H3Text } from './successStoriesStyledComponents';
7-
import TextImage from './textImage';
8-
import ImageText from './imageText';
9-
import MobileStoryView from './mobileStoryView';
10-
import JoshCarousel from '../home/carousel';
11-
import previousSvg from "../../assets/images/previous.svg";
12-
import nextSvg from "../../assets/images/next.svg";
13-
14-
const FFD = (props) => {
15-
let storyTitles = ["Freedom from Diabetes"]
16-
17-
const carouseItems = storyTitles.map(item => {
18-
return (
19-
<div class="border-right border-muted text-center">
20-
<Col>
21-
<Link to="success_stories" className="text-dark"> {item} </Link>
22-
</Col>
23-
</div>
24-
)
25-
})
26-
27-
const NextArrow = (props) => {
28-
const { className, onClick } = props;
29-
return (
30-
<img
31-
src={nextSvg}
32-
className={className}
33-
onClick={onClick}
34-
alt="Next"
35-
/>
36-
);
37-
}
38-
39-
const PrevArrow = (props) => {
40-
const { className, onClick } = props;
41-
return (
42-
<img
43-
src={previousSvg}
44-
className={className}
45-
onClick={onClick}
46-
alt="Previous"
47-
/>
48-
);
49-
}
50-
51-
const settings = {
52-
dots: false,
53-
slidesToShow: 1,
54-
slidesToScroll: 1,
55-
arrows: true,
56-
nextArrow: <NextArrow />,
57-
prevArrow: <PrevArrow />,
58-
responsive: [{
59-
breakpoint: 600,
60-
settings: {
61-
slidesToShow: 1,
62-
slidesToScroll: 1,
63-
initialSlide: 0,
64-
arrows: false,
65-
dots: true
66-
}
67-
},
68-
{
69-
breakpoint: 330,
70-
settings: {
71-
slidesToShow: 1,
72-
slidesToScroll: 1,
73-
initialSlide: 0,
74-
arrows: false,
75-
dots: true
76-
77-
}
78-
}]
79-
}
80-
81-
const carouselMobile = <Row className="w-80 m-auto justify-content-around text-danger pt-2">
82-
<Col>
83-
<JoshCarousel items={carouseItems} settings={settings} />
84-
</Col>
85-
</Row>
86-
87-
const carouselWeb = <Row className="w-75 m-auto justify-content-around text-danger pt-2">
88-
<Col>
89-
<JoshCarousel items={carouseItems} settings={settings} />
90-
</Col>
91-
</Row>
4+
import * as routes from '../../routeConstants';
5+
import SuccessStoriesLayout from "./successStoriesLayout.js";
926

7+
const SuccessStories = (props) => {
938
return (
94-
<Media query="(max-width: 900px)">
95-
{matches =>
96-
matches ? (
97-
<Fragment>
98-
<PinkDiv />
99-
{carouselMobile}
100-
<H3Text className="mt-5 text-center mb-5" color="#0F0F0F"> {props.title} </H3Text>
101-
{props.contentKeys.map((key) => {
102-
return <MobileStoryView text={props[key].text} subHeading={props[key].subHeading} image={props[key].image} />
103-
})}
104-
</Fragment>
105-
) : (
106-
<Fragment>
107-
<PinkDiv />
108-
{carouselWeb}
109-
<H3Text className="mt-5 text-center mb-5" color="#CF4338"> {props.title} </H3Text>
110-
{props.contentKeys.map((key, index) => {
111-
if (index % 2 === 0) {
112-
return <TextImage text={props[key].text} subHeading={props[key].subHeading} image={props[key].image} />
113-
}
114-
else
115-
return <ImageText text={props[key].text} subHeading={props[key].subHeading} image={props[key].image} />
116-
})}
117-
</Fragment>
118-
)
119-
}
120-
</Media>
9+
<>
10+
<Route path={`${routes.SUCCESS_STORIES_URL}/:story`} component={SuccessStoriesLayout} />
11+
{props.location.pathname === routes.SUCCESS_STORIES_URL && <Redirect to={`${routes.SUCCESS_STORIES_URL}/ffd`} from={routes.SUCCESS_STORIES_URL} />}
12+
</>
12113
)
12214
}
12315

124-
FFD.defaultProps = {
125-
title: 'ENABLING STORIES OF FREEDOM',
126-
contentKeys: ['summary', 'challenge', 'insight', 'joshEdge', 'impact'],
127-
summary: {
128-
subHeading: 'SUMMARY',
129-
image: 'summary',
130-
text: <><p><strong>The International Diabetes Federation projects that the number of diabetes patients in the South East Asian region will double by 2045. Currently, 8.8% of the Indian adult population suffers from diabetes. This is cause for extreme concern.</strong></p><p>Traditionally incurable, diabetes is a deeply rooted health concern making millions miserable. But when the best of tech and medicine come together, there&#39;s hope for radical improvement. Freedom From Diabetes (FFD), launched in 2013 by Dr. Pramod Tripathi has a singular aim: not just cure diabetes, but eliminate it completely. The program has 18,000 diabetes-free success stories to its credit and this number is only growing with each passing year. With a steadily increasing number of medical practitioners on board, FFD, headquartered in Pune, now has a network in more than 10 Indian cities. </p> </>
131-
},
132-
133-
challenge: {
134-
subHeading: 'CHALLENGE',
135-
image: 'challenge',
136-
text: <p>The number of patients grew incrementally in the first two years of the program, and by 2015 there were a few thousand knocking on FFD’s door. The biggest challenge was maintaining patient records offline, and the need for digitisation meant only one thing: tech intervention. The first version of the CRM and mobile application was built, but it failed at scale. Both doctors and patients were using this app, at the cost of a high turnaround time, major performance lags and extremely poor customer experience.</p>
137-
},
138-
insight: {
139-
subHeading: 'INSIGHT',
140-
image: 'insight',
141-
text: <p>Revamping the initial applications was not possible, since it had been built on a legacy tech stack that was not connected to FFD’s other digital systems. A new version of the app backed by new age tech was the need of the hour. </p>
142-
},
143-
144-
joshEdge: {
145-
subHeading: 'THE JOSH EDGE',
146-
image: 'joshEdge',
147-
text: <p>Keeping the rescue mission philosophy in mind, the Josh team started building the app from scratch. We built the CRM system on the backs of Trailblazer, Ruby on Rails, Mongo and ElasticSearch, along with Android and iOS compatibility. The foundation of the application was implemented one step at a time. A centrally accessible database was also created to enable seamless integration of patient records with the existing website & marketing systems. The team also introduced a call tracker for the in house marketing teams to stay updated in real time. A chat module was also rolled out to enable round the clock communication between doctors and patients. The app ensured that patients could upload blood test reports every 3 to 4 hours. The doctors were also notified about patient behaviour in real time, ensuring a transparent, efficient treatment program. Designed to scale up with the program, the app is a huge success with all stakeholders, new and old! </p>
148-
},
149-
150-
impact: {
151-
subHeading: 'IMPACT',
152-
image: 'impact',
153-
text: <><p>Reduced turnaround time. Doctor-patient interactions in seconds, not hours. </p> <p>No wait time for patients, with a provision to share reports and readings digitally.</p> <p>More than 18,000 active users.</p><p>Real time mapping of blood sugar and insulin levels.</p><p>Improved end customer experience with maximum operational efficiency and no performance lags.</p></>
154-
}
155-
}
156-
157-
export default FFD;
16+
export default SuccessStories;

0 commit comments

Comments
 (0)