Skip to content

Commit 8e88f1d

Browse files
committed
Fix TypeScript lint errors and add special animation for View All Projects button
- Remove unused Spring import from animejs - Replace 'any' type with proper TypeScript interface for global anime object - Add AnimeGlobal interface for better type safety - Create special pulse glow animation for View All Projects button - Add arrow bounce animation on hover - Update button CSS to exclude View All Projects from rotating glow effect
1 parent 5c9452e commit 8e88f1d

3 files changed

Lines changed: 78 additions & 8 deletions

File tree

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ <h3>The Premier League Oracle</h3>
284284
<!-- View All Projects Button -->
285285
<div style="text-align: center; margin-top: 2.5rem;">
286286
<p style="color: var(--text-secondary); margin-bottom: 1.5rem;">Explore my complete portfolio with 12+ projects across web development, ML/AI, and games</p>
287-
<a href="projects.html" class="cta-button" style="padding: 1.2rem 2.5rem; font-size: 1.2rem;">
287+
<a href="projects.html" class="cta-button view-all-projects-btn" style="padding: 1.2rem 2.5rem; font-size: 1.2rem;">
288288
<span class="btn-text">View All Projects</span>
289289
<i class="fas fa-arrow-right" style="margin-left: 0.5rem;"></i>
290290
</a>

src/css/components/_buttons.css

Lines changed: 68 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
}
3535

3636
/* CTA Button Arrow */
37-
.cta-button::before {
37+
.cta-button:not(.view-all-projects-btn)::before {
3838
content: "\2192";
3939
margin-left: var(--space-md);
4040
transition: all var(--duration-base) var(--ease-out);
@@ -44,8 +44,8 @@
4444
Matrix Glow Effect
4545
========================================================================== */
4646

47-
/* Rotating glow effect - Only for CTA buttons */
48-
.cta-button::after {
47+
/* Rotating glow effect - Only for regular CTA buttons */
48+
.cta-button:not(.view-all-projects-btn)::after {
4949
content: '';
5050
position: absolute;
5151
inset: -50%;
@@ -84,11 +84,11 @@
8484
text-shadow: var(--matrix-glow);
8585
}
8686

87-
.cta-button:hover::after {
87+
.cta-button:not(.view-all-projects-btn):hover::after {
8888
opacity: 0.5;
8989
}
9090

91-
.cta-button:hover::before {
91+
.cta-button:not(.view-all-projects-btn):hover::before {
9292
transform: translateX(5px);
9393
}
9494

@@ -354,4 +354,67 @@
354354
@keyframes spin {
355355
0% { transform: rotate(0deg); }
356356
100% { transform: rotate(360deg); }
357+
}
358+
359+
/* ==========================================================================
360+
View All Projects Special Button
361+
========================================================================== */
362+
363+
.view-all-projects-btn {
364+
position: relative;
365+
overflow: visible;
366+
}
367+
368+
/* Pulse animation for View All Projects button */
369+
.view-all-projects-btn::before {
370+
content: '';
371+
position: absolute;
372+
inset: -3px;
373+
background: var(--matrix-green);
374+
border-radius: var(--radius-md);
375+
opacity: 0;
376+
animation: pulse-glow 2s ease-in-out infinite;
377+
z-index: -1;
378+
filter: blur(8px);
379+
}
380+
381+
@keyframes pulse-glow {
382+
0%, 100% {
383+
opacity: 0;
384+
transform: scale(0.95);
385+
}
386+
50% {
387+
opacity: 0.3;
388+
transform: scale(1.05);
389+
}
390+
}
391+
392+
/* Enhanced hover for View All Projects */
393+
.view-all-projects-btn:hover::before {
394+
animation: pulse-glow-hover 0.8s ease-in-out infinite;
395+
}
396+
397+
@keyframes pulse-glow-hover {
398+
0%, 100% {
399+
opacity: 0.2;
400+
transform: scale(1);
401+
}
402+
50% {
403+
opacity: 0.5;
404+
transform: scale(1.08);
405+
}
406+
}
407+
408+
/* Arrow animation on hover */
409+
.view-all-projects-btn:hover i {
410+
animation: arrow-bounce 0.5s ease-in-out infinite alternate;
411+
}
412+
413+
@keyframes arrow-bounce {
414+
0% {
415+
transform: translateX(0);
416+
}
417+
100% {
418+
transform: translateX(5px);
419+
}
357420
}

src/js/scripts.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,17 @@
44
* @version 2.0.0 - TypeScript Migration
55
*/
66

7-
import { animate, stagger, createTimeline, Spring } from 'animejs';
7+
import { animate, stagger, createTimeline } from 'animejs';
8+
9+
// Define global anime interface
10+
interface AnimeGlobal {
11+
animate: typeof animate;
12+
stagger: typeof stagger;
13+
createTimeline: typeof createTimeline;
14+
}
815

916
// Make animate available globally for compatibility
10-
(window as any).anime = {
17+
(window as Window & { anime: AnimeGlobal }).anime = {
1118
animate,
1219
stagger,
1320
createTimeline

0 commit comments

Comments
 (0)