Skip to content

Commit 10a3af9

Browse files
authored
Merge pull request #642 from areebniyas/fix-ux-in-homepage-buttons
fix: UX in Get Started and Courses Buttons on Homepage
2 parents f898707 + d15f52a commit 10a3af9

File tree

2 files changed

+33
-31
lines changed

2 files changed

+33
-31
lines changed

src/components/header/header.css

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -104,24 +104,14 @@ html.theme-dark .chh__header-content p {
104104
gap: 1rem;
105105
}
106106

107-
.chh__header-content__input--link {
107+
.chh__header-content__input--button {
108108
text-decoration: none;
109109
font-size: 20px;
110110
line-height: 28px;
111111
font-weight: 600;
112112
color: black;
113-
}
114-
115-
.chh__header-content__input--link:hover {
116-
text-decoration: none;
117-
color:#121212;
118-
}
119-
120-
.chh__header-content__input button {
121-
flex: 1;
113+
width: 100%;
122114
min-height: 56px;
123-
font-weight: 600;
124-
font-size: 18px;
125115
border: none;
126116
cursor: pointer;
127117
outline: none;
@@ -131,9 +121,12 @@ html.theme-dark .chh__header-content p {
131121
position: relative;
132122
overflow: hidden;
133123
z-index: 1;
124+
display: flex;
125+
align-items: center;
126+
justify-content: center;
134127
}
135128

136-
.chh__header-content__input button::after {
129+
.chh__header-content__input--button::after {
137130
content: "";
138131
position: absolute;
139132
top: 0;
@@ -151,53 +144,62 @@ html.theme-dark .chh__header-content p {
151144
pointer-events: none;
152145
}
153146

154-
.chh__header-content__input button:hover::after {
147+
.chh__header-content__input--button:hover::after {
155148
left: 100%;
156149
}
157150

158-
.chh__header-content__input button:hover {
151+
.chh__header-content__input--button:hover {
159152
transform: scale(1.03); /* very subtle lift */
153+
text-decoration: none;
160154
}
161155

162-
.chh__header-content__input button:first-child {
156+
.chh__header-content__input div:first-child .chh__header-content__input--button {
163157
background: linear-gradient(135deg, #fda085 0%, #f6d365 100%);
164158
}
165159

166-
.chh__header-content__input button:first-child:hover {
160+
.chh__header-content__input div:first-child .chh__header-content__input--button:hover {
167161
background: linear-gradient(135deg, #f76b1c 0%, #fca65f 100%);
168162
transform: translateY(-2px);
169163
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
164+
text-decoration: none;
165+
color: black;
170166
}
171167

172-
[data-theme='dark'] .chh__header-content__input button:first-child {
168+
[data-theme='dark'] .chh__header-content__input div:first-child .chh__header-content__input--button {
173169
background: linear-gradient(135deg, #9b4d89 0%, #6b3a9c 100%);
174170
}
175171

176-
[data-theme='dark'] .chh__header-content__input button:first-child:hover {
172+
[data-theme='dark'] .chh__header-content__input div:first-child .chh__header-content__input--button:hover {
177173
background: linear-gradient(135deg, #b45ea5 0%, #8050c4 100%);
178174
transform: translateY(-2px) scale(1.02);
179175
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
176+
text-decoration: none;
177+
color: white;
180178
}
181179

182-
.chh__header-content__input button:last-child {
180+
.chh__header-content__input div:last-child .chh__header-content__input--button {
183181
background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
184182
}
185183

186-
.chh__header-content__input button:last-child:hover {
184+
.chh__header-content__input div:last-child .chh__header-content__input--button:hover {
187185
background: linear-gradient(135deg, #ae8dca 0%, #b3a7cb 100%);
188186
transform: translateY(-2px);
189187
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
188+
text-decoration: none;
189+
color: black;
190190
}
191191

192-
[data-theme='dark'] .chh__header-content__input button:last-child {
192+
[data-theme='dark'] .chh__header-content__input div:last-child .chh__header-content__input--button {
193193
background: linear-gradient(135deg, #2c2c36 0%, #3d3d4f 100%);
194194
color: #e0e0e0;
195195
}
196196

197-
[data-theme='dark'] .chh__header-content__input button:last-child:hover {
197+
[data-theme='dark'] .chh__header-content__input div:last-child .chh__header-content__input--button:hover {
198198
background: linear-gradient(135deg, #3d3d4f 0%, #50506b 100%);
199199
transform: translateY(-2px) scale(1.02);
200200
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
201+
text-decoration: none;
202+
color: #e0e0e0;
201203
}
202204

203205
.chh__header-image {

src/components/header/header.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const HeaderContent = () => {
4141
</motion.p>
4242

4343
<div className="chh__header-content__input">
44-
<motion.button
44+
<motion.div
4545
initial={{ opacity: 0, x: -10 }}
4646
whileInView={{ opacity: 1, x: 0 }}
4747
viewport={{ once: true }}
@@ -51,14 +51,14 @@ const HeaderContent = () => {
5151
stiffness: 100,
5252
delay: 0.3,
5353
}}
54-
type="button"
54+
style={{ flex: 1 }}
5555
>
56-
<Link to="/get-started/" className="chh__header-content__input--link">
56+
<Link to="/get-started/" className="chh__header-content__input--button">
5757
Get Started
5858
</Link>
59-
</motion.button>
59+
</motion.div>
6060

61-
<motion.button
61+
<motion.div
6262
initial={{ opacity: 0, x: 10 }}
6363
whileInView={{ opacity: 1, x: 0 }}
6464
viewport={{ once: true }}
@@ -68,12 +68,12 @@ const HeaderContent = () => {
6868
stiffness: 100,
6969
delay: 0.2,
7070
}}
71-
type="button"
71+
style={{ flex: 1 }}
7272
>
73-
<Link to="/courses" className="chh__header-content__input--link">
73+
<Link to="/courses" className="chh__header-content__input--button">
7474
Courses
7575
</Link>
76-
</motion.button>
76+
</motion.div>
7777
</div>
7878
</div>
7979
);

0 commit comments

Comments
 (0)