Skip to content

Commit d73dec8

Browse files
committed
style: redesign hero buttons
1 parent 1bb353c commit d73dec8

File tree

2 files changed

+79
-23
lines changed

2 files changed

+79
-23
lines changed

src/components/Hero.tsx

+5-3
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@ export const HeroComponent = () => {
1717
<h1>Kharagpur <span className='yellow-text'>Winter<br />of Code</span> 2024</h1>
1818
</div>
1919
<div className="hero-button-container">
20-
<a href={STUDENT_MANUAL_LINK} target="_blank"><button className='hero-button'>Student Manual</button> </a>
21-
<a href={MENTOR_MANUAL_LINK} target="_blank"><button className='hero-button'>Mentor Manual</button> </a>
22-
<a href={DISCORD_INVITE} target="_blank"><button className='discord-button'><FaDiscord className='discord-icon' /><p>Discord Server</p></button> </a>
20+
<div className='manual'>
21+
<a href={STUDENT_MANUAL_LINK} target="_blank"><button className='hero-button left-button'>Student Manual</button> </a>
22+
<a href={MENTOR_MANUAL_LINK} target="_blank"><button className='hero-button right-button'>Mentor Manual</button> </a>
23+
</div>
24+
<a href={DISCORD_INVITE} target="_blank"><button className='discord-button'><FaDiscord className='discord-icon' /><p>Join Our Discord Server</p></button> </a>
2325
</div>
2426
</div>
2527
<div className="hero-images">

src/styles/Hero.css

+74-20
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,27 @@
1515
flex-direction: column;
1616
justify-content: center;
1717
align-items: center;
18+
flex-wrap: wrap;
19+
20+
}
21+
22+
.hero-button-container {
23+
display: flex;
24+
gap: 1rem;
25+
flex-direction: column;
26+
justify-content: center;
27+
align-items: stretch;
28+
position: relative;
29+
width: auto;
30+
flex-wrap: wrap;
31+
}
32+
33+
.hero-button-container .manual {
34+
display: flex;
35+
gap: 0.4rem;
36+
flex-direction: column;
37+
justify-content: center;
38+
align-items: stretch;
1839
}
1940

2041
.hero-quote {
@@ -31,37 +52,75 @@
3152
margin-bottom: 4rem;
3253
}
3354

34-
@media (min-width: 768px) {
35-
.hero-title h1 {
36-
font-size: 5rem;
37-
}
38-
}
39-
4055
.yellow-text {
4156
color: #ffe336;
4257
}
4358

4459
.hero-button {
60+
display: inline;
61+
width: 100%;
4562
background: #fff;
4663
color: #0a0a19;
47-
box-shadow: 4px 4px #6a6a6a;
4864
transition: background-color 200ms;
65+
border: none;
4966
font-size: 1rem;
67+
font-weight: 500;
5068
padding: 1rem;
5169
border-radius: 0.5rem;
70+
cursor: pointer;
71+
transition: 0.1s;
5272
}
5373

5474
.discord-button {
5575
background-color: #272a2f;
56-
box-shadow: 4px 4px #6a6a6a;
76+
box-shadow: 0px 4px #3a3a3a;
77+
border: none;
5778
transition: background-color 200ms;
5879
font-size: 1rem;
59-
padding: 1rem;
60-
border-radius: 0.5rem;
80+
padding: 1rem 1.5rem;
81+
font-weight: bold;
82+
width: 100%;
6183
display: flex;
6284
justify-content: center;
6385
gap: 6px;
6486
align-items: center;
87+
cursor: pointer;
88+
transition: 0.1s;
89+
border-radius: 50px;
90+
}
91+
92+
.left-button {
93+
border-radius: 50px;
94+
box-shadow: 4px -6px 8px rgba(256, 256, 256, 0.2);
95+
}
96+
97+
.right-button {
98+
border-radius: 50px;
99+
box-shadow: -4px 6px 8px rgba(256, 256, 256, 0.2);
100+
}
101+
102+
@media (min-width: 768px) {
103+
.hero-title h1 {
104+
font-size: 5rem;
105+
}
106+
107+
.hero-button {
108+
padding: 1rem 1.5rem;
109+
}
110+
111+
.hero-button-container .manual {
112+
flex-direction: row;
113+
}
114+
115+
.left-button {
116+
border-radius: 50px 0 0 50px;
117+
box-shadow: -6px 4px 8px rgba(256, 256, 256, 0.2);
118+
}
119+
120+
.right-button {
121+
border-radius: 0 50px 50px 0;
122+
box-shadow: 6px 4px 8px rgba(256, 256, 256, 0.2);
123+
}
65124
}
66125

67126
.discord-button p {
@@ -72,16 +131,20 @@
72131
.discord-icon {
73132
color: #7289d7;
74133
transition: color 200ms;
134+
font-size: 1.5rem;
135+
margin-right: 0.5rem;
75136
}
76137

77138
.hero-button:hover {
78139
background-color: rgba(256, 256, 256, 0.8);
140+
transform: scale(1.04);
79141
cursor: pointer;
80142
}
81143

82144
.discord-button:hover {
83145
cursor: pointer;
84146
background-color: #7289d7;
147+
transform: scale(1.04);
85148
}
86149

87150
.discord-button:hover .discord-icon {
@@ -105,13 +168,4 @@
105168
max-width: 100%;
106169
height: auto;
107170
margin: 0;
108-
}
109-
110-
.hero-button-container {
111-
display: flex;
112-
flex-direction: row;
113-
justify-content: center;
114-
align-items: center;
115-
gap: 1rem;
116-
flex-wrap: wrap;
117-
}
171+
}

0 commit comments

Comments
 (0)