Skip to content

Commit 87d36ee

Browse files
committed
style: simplify link page animations by removing unnecessary transform effects and ripple effect code for cleaner visuals
1 parent ee290fd commit 87d36ee

1 file changed

Lines changed: 2 additions & 39 deletions

File tree

src/pages/link/index.astro

Lines changed: 2 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@
584584
@keyframes slideInUp {
585585
to {
586586
opacity: 1;
587-
transform: translateY(0);
587+
transform: none;
588588
}
589589
}
590590

@@ -597,10 +597,8 @@
597597
padding: 0.3rem 1.2rem;
598598
border-radius: 8px;
599599
transition:
600-
transform 0.25s ease,
601600
background 0.3s ease,
602601
box-shadow 0.3s ease;
603-
will-change: transform;
604602
}
605603

606604
/* Shimmer sweep */
@@ -627,16 +625,13 @@
627625
}
628626

629627
li a:hover {
630-
transform: translateY(-2px);
631628
background: rgba(255, 255, 255, 0.07);
632629
box-shadow: 0 0 18px rgba(255, 255, 255, 0.1);
633630
}
634631

635632
li h2 {
636633
padding: 0 0.6rem;
637-
transition:
638-
letter-spacing 0.3s ease,
639-
text-shadow 0.3s ease;
634+
transition: text-shadow 0.3s ease;
640635
}
641636

642637
li i {
@@ -645,31 +640,13 @@
645640
}
646641

647642
a:hover h2 {
648-
letter-spacing: 0.06em;
649643
text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
650644
}
651645

652646
a:hover i {
653647
text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
654648
}
655649

656-
/* Ripple */
657-
.ripple {
658-
position: absolute;
659-
border-radius: 9999px;
660-
background: rgba(255, 255, 255, 0.22);
661-
transform: scale(0);
662-
animation: ripple-expand 0.55s ease-out forwards;
663-
pointer-events: none;
664-
}
665-
666-
@keyframes ripple-expand {
667-
to {
668-
transform: scale(2.8);
669-
opacity: 0;
670-
}
671-
}
672-
673650
/* ── Footer ── */
674651
footer {
675652
text-align: center;
@@ -1071,20 +1048,6 @@
10711048
completeLoader();
10721049
};
10731050

1074-
// ── Ripple on link click ──
1075-
document.querySelectorAll('li a').forEach((link) => {
1076-
link.addEventListener('click', function (e) {
1077-
const ripple = document.createElement('span');
1078-
ripple.classList.add('ripple');
1079-
const rect = this.getBoundingClientRect();
1080-
const size = Math.max(rect.width, rect.height);
1081-
ripple.style.width = ripple.style.height = size + 'px';
1082-
ripple.style.left = e.clientX - rect.left - size / 2 + 'px';
1083-
ripple.style.top = e.clientY - rect.top - size / 2 + 'px';
1084-
this.appendChild(ripple);
1085-
ripple.addEventListener('animationend', () => ripple.remove());
1086-
});
1087-
});
10881051
</script>
10891052
</body>
10901053
</html>

0 commit comments

Comments
 (0)