Skip to content

Commit b12cbfc

Browse files
Merge pull request #5224 from layer5io/ritiksaxena124/new-section
[Section]New section for AWS and GCP on hompage
2 parents 4e392fc + 51d3f66 commit b12cbfc

File tree

8 files changed

+706
-20
lines changed

8 files changed

+706
-20
lines changed

src/components/Features/index.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,15 @@ const Features = (props) => {
9393
<ContentWrapper>
9494
<h2>{props.title}</h2>
9595
<p className="text">{props.desc}</p>
96-
<Link to={props.redirectLink}>Learn more &rarr;</Link>
96+
{props.redirectLink ? <Link to={props.redirectLink}>Learn more &rarr;</Link>
97+
: (<div className="small-card-container">
98+
{props.redirectLinkWithImage.map((item) => (
99+
<Link key={item.text} className="small-card" to={item.redirect}>
100+
<img src={item.image} width={40} />
101+
<span>{item.text}</span>
102+
</Link>
103+
))}
104+
</div>)}
97105
</ContentWrapper>
98106
{props.animationOne ? (
99107
<ImageWrapper ref={containerRef}>
@@ -117,7 +125,7 @@ const Features = (props) => {
117125
>
118126
<img src={getPerson(props.cursor * 2 + 1)} alt="" />
119127
</SvgRandomWrapper>
120-
<Link to={props.redirectLink}>
128+
<Link to={props.redirectLink ? props.redirectLink : props.redirectLinkWithImage[0].redirect}>
121129
<img src={props.imgLink} alt="image" />
122130
</Link>
123131
</ImageWrapper>
@@ -143,7 +151,7 @@ const Features = (props) => {
143151
>
144152
<img src={getPerson(props.cursor * 2 + 1)} alt="" />
145153
</SvgRandomWrapper>
146-
<Link to={props.redirectLink}>
154+
<Link to={props.redirectLink ? props.redirectLink : props.redirectLinkWithImage[0].redirect}>
147155
<img src={props.imgLink} alt="image" />
148156
</Link>
149157
</ImageWrapperTwo>

src/components/Features/style.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,30 @@ export const Container = styled.div`
3838
animation-timing-function: ease-in-out;
3939
-webkit-animation-timing-function: ease-in-out;
4040
}
41+
.small-card-container {
42+
display: flex;
43+
gap: 1rem;
44+
}
45+
.small-card {
46+
padding: 0.75rem 1.25rem;
47+
display: flex;
48+
gap: 0.75rem;
49+
align-items: center;
50+
width: fit-content;
51+
border-radius: 0.25rem;
52+
cursor: pointer;
53+
color: ${(props) => props.theme.text};
54+
border: 2px solid ${(props) => props.theme.whiteZeroEightToBlackZeroEight};
55+
&:hover {
56+
background-color: ${(props) => props.theme.whiteZeroEightToBlackZeroEight};
57+
}
58+
59+
@media screen and (max-width: 500px) {
60+
flex-direction: column;
61+
justify-content: center;
62+
text-align: center;
63+
}
64+
}
4165
`;
4266
export const SvgRandomWrapper = styled.div`
4367
position: absolute;

src/sections/Home/FeaturesContainer/images/aws-light.svg

Lines changed: 292 additions & 0 deletions
Loading
Lines changed: 12 additions & 0 deletions
Loading
Lines changed: 12 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)