Skip to content

Commit adf4413

Browse files
committed
feat: Add features section
1 parent b506303 commit adf4413

File tree

12 files changed

+71
-502
lines changed

12 files changed

+71
-502
lines changed

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"scripts": {
1212
"start": "react-scripts start",
1313
"build": "react-scripts build",
14-
"build:prod": "react-scripts build && react-snap",
14+
"build:prod": "react-scripts build",
1515
"test": "react-scripts test",
1616
"eject": "react-scripts eject"
1717
},
@@ -34,7 +34,6 @@
3434
"@testing-library/jest-dom": "^4.2.4",
3535
"@testing-library/react": "^9.3.2",
3636
"@testing-library/user-event": "^7.1.2",
37-
"react-scripts": "3.4.3",
38-
"react-snap": "^1.23.0"
37+
"react-scripts": "3.4.3"
3938
}
4039
}

src/App.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import styled from 'styled-components';
44
import BackgroundImage from './components/BackgroundImage';
55
import Header from './components/Header';
66
import AboutProduct from './components/AboutProduct';
7-
// import Features from './components/Features';
7+
import Features from './components/Features';
88
import DemoContainer from './containers/DemoContainer';
99
import Footer from './components/Footer';
1010

@@ -27,7 +27,7 @@ function App() {
2727
<Header />
2828
<AboutProduct />
2929
<DemoContainer />
30-
{/* <Features /> */}
30+
<Features />
3131
<Footer />
3232
</Container>
3333
</Wrapper>

src/assets/branding-insights.png

462 KB
Loading

src/assets/similar-videos.png

583 KB
Loading

src/assets/twitter-integration.png

329 KB
Loading

src/components/FeatureCard.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@ const StyledDiv = styled.div`
1616
`;
1717

1818
const StyledImgDiv = styled.div`
19-
background: #121212;
20-
border: 1px solid #29FFBF;
2119
box-sizing: border-box;
22-
box-shadow: 0px 12px 30px #081B15;
2320
border-radius: 8px;
2421
overflow: hidden;
2522
`;
@@ -30,11 +27,22 @@ const StyledImg = styled.img`
3027
`;
3128

3229
const StyledTitle = styled.h3`
33-
margin-top: 40px;
30+
margin-top: 12px;
31+
padding: 0 12px;
32+
33+
@media(min-width: 768px) {
34+
margin-top: 40px;
35+
padding: 0 24px;
36+
}
3437
`;
3538

3639
const StyledText = styled.div`
3740
font-size: 0.9rem;
41+
padding: 0 12px;
42+
43+
@media(min-width: 768px) {
44+
padding: 0 24px;
45+
}
3846
`;
3947

4048
function FeatureCard({ feature: { url, title, text } }) {

src/components/Features.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ import React from 'react';
22
import styled from 'styled-components';
33

44
import FeatureCard from './FeatureCard';
5+
import brandingInsightsImg from '../assets/branding-insights.png';
6+
import twitterIntegrationImg from '../assets/twitter-integration.png';
7+
import similarVideosImg from '../assets/similar-videos.png';
58

69
const StyledH1 = styled.h1`
710
text-align: center;
@@ -19,20 +22,19 @@ const StyledH4 = styled.h4`
1922
font-weight: 400;
2023
`;
2124

22-
2325
const features = [
2426
{
25-
url: "https://static.fotor.com.cn/assets/projects/pages/0eeff7e0-7528-11e9-9443-e356e0129bd6_2e592a62-4a05-44f5-8483-2b31549c98fe_thumb.jpg",
27+
url: brandingInsightsImg,
2628
title: "Branding Insights",
2729
text: "Track your brand in stadiums, trailers, videos to gain their duration time on screen"
2830
},
2931
{
30-
url: "https://static.fotor.com.cn/assets/projects/pages/0eeff7e0-7528-11e9-9443-e356e0129bd6_2e592a62-4a05-44f5-8483-2b31549c98fe_thumb.jpg",
32+
url: twitterIntegrationImg,
3133
title: "Twitter Integration",
3234
text: "Edit and trim your favourite part of the video and share via twitter"
3335
},
3436
{
35-
url: "https://static.fotor.com.cn/assets/projects/pages/0eeff7e0-7528-11e9-9443-e356e0129bd6_2e592a62-4a05-44f5-8483-2b31549c98fe_thumb.jpg",
37+
url: similarVideosImg,
3638
title: "Similar Videos",
3739
text: "Watch visually similar videos within the platform"
3840
}
@@ -50,7 +52,7 @@ function Features() {
5052
<StyledH1>Smart AI Assistance</StyledH1>
5153
<StyledH4>We help creators, marketers and social media enthusiasts to gain insights through our machine learning platform</StyledH4>
5254
<StyledDiv>
53-
{features.map(feature => <FeatureCard feature={feature} />)}
55+
{features.map(feature => <FeatureCard feature={feature} key={feature.title} />)}
5456
</StyledDiv>
5557
</>
5658
);

src/components/VideoCard.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ import playIcon from '../assets/play.svg';
66
const StyledDiv = styled.div`
77
border: 2px solid ${props => props.selected ? "#A129FF" : "#434343"};
88
border-radius: 8px;
9-
width: 220px;
10-
height: 125px;
9+
width: 320px;
1110
overflow: hidden;
1211
display: flex;
1312
position: relative;

src/components/VideoMetadata.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const VideoMetadata = React.memo(
3030
function ({ video: { url } }) {
3131
return (
3232
<StyledDiv>
33-
<StyledVideo src={url} controls />
33+
<StyledVideo src={url} controls autoPlay muted />
3434
<Metadata />
3535
</StyledDiv>
3636
);

src/components/VideoModal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function VideoModal({ url, isOpen, close }) {
4646
}
4747
}, [isOpen]);
4848

49-
const video = isOpen ? <StyledVideo controls src={url} onClick={onVideoClick}></StyledVideo> : null;
49+
const video = isOpen ? <StyledVideo controls autoPlay muted src={url} onClick={onVideoClick}></StyledVideo> : null;
5050
return <StyledDiv onClick={close} isOpen={isOpen}>{video}</StyledDiv>;
5151
}
5252

0 commit comments

Comments
 (0)