Skip to content

Commit 06093ad

Browse files
committed
fix: button hover effects
1 parent 7d6dcd3 commit 06093ad

File tree

1 file changed

+21
-37
lines changed

1 file changed

+21
-37
lines changed

site/src/Resources.js

Lines changed: 21 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ import React from "react";
22
import Button from "./reusecore/Button";
33
import styled from "styled-components";
44
// import AcademyIcon from './assets/images/academy-icon.svg';
5-
import CatalogIcon from './assets/images/catalog-icon.svg'
6-
import BookIcon from './assets/images/book-icon.svg'
5+
import CatalogIcon from "./assets/images/catalog-icon.svg";
6+
import BookIcon from "./assets/images/book-icon.svg";
7+
78
const Container = styled.div`
89
max-width: 1200px;
910
margin: 0 auto;
@@ -27,19 +28,18 @@ const Subheading = styled.p`
2728
margin: 0 auto;
2829
`;
2930

30-
3131
const CardGrid = styled.div`
3232
display: grid;
3333
grid-template-columns: 1fr;
3434
gap: 2rem;
35-
35+
3636
@media (min-width: 768px) {
3737
grid-template-columns: repeat(2, 1fr);
3838
}
3939
`;
4040

4141
const Card = styled.div`
42-
background-color: ${({ theme }) => theme.body};
42+
background-color: ${({ theme }) => theme.body};
4343
border-radius: 0.5rem;
4444
box-shadow: 0px 0px 2px;
4545
padding: 2rem;
@@ -48,9 +48,11 @@ const Card = styled.div`
4848
flex-direction: column;
4949
align-items: center;
5050
`;
51+
5152
const CardImageContainer = styled.div`
5253
max-width: 6rem;
5354
`;
55+
5456
const CardImage = styled.img`
5557
max-width: 6rem;
5658
object-fit: contain;
@@ -60,7 +62,7 @@ const CardImage = styled.img`
6062
const CardTitle = styled.h3`
6163
font-size: 1.5rem;
6264
font-weight: bold;
63-
color: ${props => props.theme.text};
65+
color: ${(props) => props.theme.text};
6466
margin-bottom: 1rem;
6567
`;
6668

@@ -72,25 +74,23 @@ const Spacer = styled.div`
7274
flex-grow: 1;
7375
`;
7476

75-
7677
const ResourcesSection = () => {
7778
return (
7879
<Container>
7980
<HeaderSection>
80-
<MainHeading>
81-
No setup required
82-
</MainHeading>
81+
<MainHeading>No setup required</MainHeading>
8382
<Subheading>
84-
Learn by doing: explore these hands-on resources using the playground right in your browser
83+
Learn by doing: explore these hands-on resources using the playground
84+
right in your browser
8585
</Subheading>
8686
</HeaderSection>
8787

8888
<CardGrid>
8989
<Card>
9090
<CardImageContainer>
91-
<CardImage
92-
src={BookIcon}
93-
alt="Hands-on tutorials"
91+
<CardImage
92+
src={BookIcon}
93+
alt="Hands-on tutorials"
9494
style={{ paddingTop: "1.2rem" }}
9595
/>
9696
</CardImageContainer>
@@ -99,38 +99,22 @@ const ResourcesSection = () => {
9999
Interactive tutorials to increase your cloud native knowledge.
100100
</CardDescription>
101101
<Spacer />
102-
<Button url="https://docs.meshery.io/guides/tutorials" style={{ color: "rgb(255,255,255)" }}> Tutorials</Button>
102+
{/* Use same markup as the Join button — let the Button component decide styling */}
103+
<Button url="https://docs.meshery.io/guides/tutorials">
104+
Tutorials
105+
</Button>
103106
</Card>
104107

105-
{/* <Card>
106-
<CardImageContainer>
107-
<CardImage
108-
src={AcademyIcon}
109-
alt="Academy Icon"
110-
/>
111-
</CardImageContainer>
112-
<CardTitle>Academy</CardTitle>
113-
<CardDescription>
114-
Learn how to use various cloud native tools with Meshery.
115-
</CardDescription>
116-
<Spacer />
117-
<Button url="https://docs.meshery.io/guides/tutorials" style={{ color: "rgb(255,255,255)"}}>Get Started</Button>
118-
</Card> */}
119-
120-
121108
<Card>
122109
<CardImageContainer>
123-
<CardImage
124-
src={CatalogIcon}
125-
alt="Catalog Icon"
126-
/>
110+
<CardImage src={CatalogIcon} alt="Catalog Icon" />
127111
</CardImageContainer>
128112
<CardTitle>Catalog</CardTitle>
129113
<CardDescription>
130-
Reusable designs and templates for Cloud Native Infrastructure.
114+
Reusable designs and templates for Cloud Native Infrastructure.
131115
</CardDescription>
132116
<Spacer />
133-
<Button url="https://meshery.io/catalog" style={{ color: "rgb(255,255,255)"}}>Learn More</Button>
117+
<Button url="https://meshery.io/catalog">Learn More</Button>
134118
</Card>
135119
</CardGrid>
136120
</Container>

0 commit comments

Comments
 (0)