Skip to content

Commit c1fbbc1

Browse files
author
graceyuen
committed
feat: UI enhancements
1 parent 939721a commit c1fbbc1

File tree

3 files changed

+67
-11
lines changed

3 files changed

+67
-11
lines changed

app/globals.css

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,24 @@
7373
animation: spin 20s linear infinite;
7474
}
7575

76-
.line-clamp-2 {
77-
display: -webkit-box;
78-
-webkit-line-clamp: 2;
79-
-webkit-box-orient: vertical;
80-
overflow: hidden;
76+
.animate-wave {
77+
animation: wave-hand 2s infinite;
78+
transform-origin: 70% 70%;
79+
display: inline-block;
8180
}
8281
}
8382

83+
@keyframes wave-hand {
84+
0% { transform: rotate(0deg); }
85+
10% { transform: rotate(14deg); }
86+
20% { transform: rotate(-8deg); }
87+
30% { transform: rotate(14deg); }
88+
40% { transform: rotate(-4deg); }
89+
50% { transform: rotate(10deg); }
90+
60% { transform: rotate(0deg); }
91+
100% { transform: rotate(0deg); }
92+
}
93+
8494
html {
8595
scroll-behavior: smooth;
8696
}

app/page.tsx

Lines changed: 52 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,14 @@ export default function Portfolio() {
180180
whiteSpace: "pre-line",
181181
}}
182182
>
183-
Hey👋, I'm{" "}
183+
Hey
184+
<span
185+
className="inline-block origin-[70%_70%] animate-wave"
186+
role="img"
187+
aria-label="waving hand"
188+
>
189+
👋
190+
</span>, I'm{" "}
184191
<span className="relative inline-block">
185192
<span className="text-primary">Grace Yuen</span>
186193
</span>
@@ -192,6 +199,7 @@ export default function Portfolio() {
192199
transition={{ duration: 0.8, delay: 0.3 }}
193200
className="flex flex-col sm:flex-row gap-4 items-center justify-center mb-2"
194201
>
202+
195203
<Button
196204
size="lg"
197205
className="hero-btn min-w-[160px] dark:bg-primary/95 dark:hover:bg-primary/100"
@@ -206,7 +214,7 @@ export default function Portfolio() {
206214
<Button
207215
variant="outline"
208216
size="lg"
209-
className="hero-btn min-w-[160px] flex items-center justify-center group border-2 border-primary dark:border-primary/80 dark:bg-gray-900/95"
217+
className="hero-btn min-w-[160px] flex items-center justify-center group border-2 border-primary dark:border-primary/80 dark:bg-gray-900/95 dark:hover:bg-gray-800"
210218
onClick={async (e) => {
211219
if (isMobile) {
212220
// Animate the arrow rotation before scrolling
@@ -247,6 +255,48 @@ export default function Portfolio() {
247255
</div>
248256
</motion.div> */}
249257
</motion.div>
258+
259+
{/* Animated Scroll Down Hint */}
260+
<AnimatePresence>
261+
{!showBackToTop && (
262+
<motion.div
263+
initial={{ opacity: 0, y: 10 }}
264+
animate={{ opacity: 1, y: 0 }}
265+
exit={{ opacity: 0, y: 10 }}
266+
transition={{ duration: 0.8, delay: 1 }}
267+
className="absolute inset-x-0 mx-auto bottom-2 sm:bottom-8 md:bottom-12 flex flex-col items-center z-20 select-none w-full max-w-xs sm:max-w-sm md:max-w-md lg:max-w-lg px-2"
268+
style={{ left: '0', right: '0', pointerEvents: 'auto', cursor: 'pointer' }}
269+
onClick={() => {
270+
const aboutSection = document.getElementById('about');
271+
if (aboutSection) {
272+
aboutSection.scrollIntoView({ behavior: 'smooth' });
273+
}
274+
}}
275+
tabIndex={0}
276+
aria-label="Scroll down to About section"
277+
role="button"
278+
>
279+
<span className="text-muted-foreground text-sm mb-2 animate-bounce bg-background/80 px-2 rounded">
280+
Scroll down
281+
</span>
282+
<svg
283+
className="w-6 h-6 text-muted-foreground animate-bounce"
284+
fill="none"
285+
stroke="currentColor"
286+
strokeWidth="2"
287+
viewBox="0 0 24 24"
288+
aria-hidden="true"
289+
>
290+
<path
291+
strokeLinecap="round"
292+
strokeLinejoin="round"
293+
d="M19 9l-7 7-7-7"
294+
/>
295+
</svg>
296+
</motion.div>
297+
)}
298+
</AnimatePresence>
299+
{/* End Animated Scroll Down Hint */}
250300
</motion.section>
251301

252302
{/* About Section */}
@@ -381,7 +431,6 @@ export default function Portfolio() {
381431
>
382432
Let's Get in Touch
383433
</motion.h2>
384-
385434
<ContactCard />
386435
</section>
387436

styles/globals.css

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,16 +94,13 @@ body {
9494
}
9595

9696
.hero-btn, button.hero-btn {
97-
/* Stronger font and size for hero buttons */
9897
font-size: 1.15rem !important;
9998
font-weight: 700 !important;
10099
letter-spacing: 0.01em !important;
101100
box-shadow: 0 2px 16px 0 rgba(0,0,0,0.06) !important;
102101
border-width: 2px !important;
103102
border-radius: 0.75rem !important;
104103
transition: background 0.2s, color 0.2s, border 0.2s, box-shadow 0.2s !important;
105-
}
106-
.hero-btn, button.hero-btn {
107104
background: linear-gradient(90deg, hsl(var(--primary) / 0.92), hsl(var(--primary) / 0.80)) !important;
108105
color: hsl(var(--primary-foreground)) !important;
109106
border-color: hsl(var(--primary)) !important;

0 commit comments

Comments
 (0)