Skip to content

Commit d024bd7

Browse files
authored
Merge pull request #178 from HackMerced/feat/contribute-component
Created 'Contribute!' Component & added Hover Animation
2 parents 3c3573a + a805bb5 commit d024bd7

File tree

3 files changed

+71
-0
lines changed

3 files changed

+71
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import React, { FC } from "react";
2+
3+
import "./styles.scss";
4+
5+
const Contribute: FC = (): JSX.Element => {
6+
return (
7+
<div className="grid-container">
8+
<a href="https://forms.gle/9HP7qPGiLNWDG3C4A" target="_blank">
9+
<div className="grid-item">Mentor</div>
10+
</a>
11+
<a href="https://forms.gle/jLqbvgyAdwnJR3XU7" target="_blank">
12+
<div className="grid-item">Volunteer</div>
13+
</a>
14+
</div>
15+
);
16+
};
17+
18+
export default Contribute;
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
.grid-container {
2+
display: grid;
3+
color: var(--text-color);
4+
padding: 0px 2px 90px 0px;
5+
grid-template-columns: auto auto;
6+
grid-gap: 0px 50px;
7+
justify-content: center;
8+
9+
@media only screen and (max-width: 900px) {
10+
grid-template-columns: auto;
11+
grid-gap: 50px 0px;
12+
padding-top: 20px;
13+
}
14+
15+
.grid-item {
16+
text-align: center;
17+
width: 400px;
18+
height: 40px;
19+
padding-top: 6px;
20+
font-size: 28px;
21+
background-color: var(--orange);
22+
23+
@media only screen and (max-width: 700px) {
24+
font-size: 25px;
25+
}
26+
@media only screen and (max-width: 450px) {
27+
width: 200px;
28+
height: 30px;
29+
padding-top: 8px;
30+
font-size: 20px;
31+
}
32+
}
33+
34+
/* Hover Effect: https://dev.to/webdeasy/top-20-css-buttons-animations-f41 */
35+
.grid-item:hover {
36+
background: linear-gradient(45deg, #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000);
37+
background-size: 400%;
38+
animation: glowing 20s linear infinite;
39+
transition: opacity .3s ease-in-out;
40+
}
41+
@keyframes glowing {
42+
0% { background-position: 0 0; }
43+
50% { background-position: 400% 0; }
44+
100% { background-position: 0 0; }
45+
}
46+
}
47+

src/pages/Home/index.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { IconDefinition } from "@fortawesome/free-solid-svg-icons";
44

55
import Navbar from "../../components/NavBar";
66
import Footer from "../../components/Footer";
7+
import Contribute from "../../components/Contribute";
78
import useWindowDimensions from "../../components/WindowDimensions";
89

910
import HACKMERCED_TITLE from "../../assets/images/placeholder-title.png";
@@ -157,6 +158,11 @@ const Home: FC = (): JSX.Element => {
157158
{generateSectionHeading("Our Team")}
158159
<div className="home__team-pictures__grid clear">{generateTeamPics(team)}</div>
159160
</section>
161+
{/* Contribute */}
162+
<section className="home__contribute">
163+
{generateSectionHeading("Contribute!")}
164+
<Contribute />
165+
</section>
160166
<Footer />
161167
</main>
162168
);

0 commit comments

Comments
 (0)