Skip to content

Commit 8c49c04

Browse files
committed
add bouncing ball page; add home page link styling; fix some bugs in ImageSliders and FallingSpheres
1 parent 72399e0 commit 8c49c04

15 files changed

+285
-154
lines changed

public/bouncing-ball.gif

140 KB
Loading

public/falling-spheres.gif

5.91 MB
Loading

public/image-sliders.gif

87.8 MB
Loading

public/my-proficiencies.gif

11.6 MB
Loading

public/nature-slideshow.gif

47.4 MB
Loading

src/components/ExperimentLink.tsx

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/components/Header.tsx

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,25 @@ export default function Header() {
1919
case '/image-sliders':
2020
currentPage = 'Image Sliders';
2121
break;
22+
case '/bouncing-ball':
23+
currentPage = 'Bouncing Ball';
24+
break;
25+
case '/':
26+
currentPage = 'Home';
27+
break;
2228
default:
2329
break;
2430
}
2531

2632
return (
27-
<header className="z-100 sticky top-0 bg-white w-full flex items-center gap-4 p-2">
28-
<Link to='/' className="ml-2 text-2xl border border-black rounded-md bg-white">
29-
<IoHomeOutline className="m-2"/>
30-
</Link>
33+
<header className="z-100 sticky top-0 bg-white w-full flex items-center p-2 font-mono">
34+
{ currentPage !== 'Home' &&
35+
<Link to='/' className="ml-2 text-2xl border border-black rounded-md bg-white">
36+
<IoHomeOutline className="m-2"/>
37+
</Link>
38+
}
3139

32-
<div>
40+
<div className="pl-4">
3341
<h1 className="text-xl text-center">
3442
Animation Experimentation
3543
</h1>

src/components/ImageLink.tsx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { Link } from "react-router"
2+
3+
type ImageLinkType = {
4+
path: string;
5+
text: string;
6+
imagePath: string;
7+
}
8+
9+
export default function ImageLink({ path, text, imagePath }: ImageLinkType) {
10+
return (
11+
<Link
12+
to={path}
13+
className={`group relative flex items-center w-full max-w-100 aspect-square border rounded-lg hover:scale-105 transition-transform duration-100 overflow-hidden`}
14+
>
15+
<div
16+
className="absolute w-full h-full bg-cover bg-center rounded-lg brightness-75 group-hover:brightness-90 transition-all duration-300 blur-[1px] scale-105 group-hover:blur-[0px]"
17+
style={{ backgroundImage: `url(${imagePath})`}}
18+
></div>
19+
20+
<p className="w-full h-[4em] p-4 m-2 font-mono text-white text-2xl text-shadow-lg/100 bg-black/75 rounded-xl drop-shadow-lg/50 group-hover:drop-shadow-lg/75 transition-all duration-300">
21+
{text}
22+
</p>
23+
</Link>
24+
)
25+
}

src/index.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
@import 'tailwindcss';
22

3+
@theme {
4+
--breakpoint-xs: 34rem;
5+
}
36

47
.zalando-sans-expanded {
58
font-family: "Zalando Sans Expanded", sans-serif;

src/main.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import FallingSpheres from './pages/FallingSpheres.tsx';
99
import MyProficiencies from './pages/MyProficiencies.tsx';
1010
import NatureSlideshow from './pages/NatureSlideshow.tsx';
1111
import ImageSliders from './pages/ImageSliders.tsx';
12+
import BouncingBall from './pages/BouncingBall.tsx';
1213

1314
const router = createBrowserRouter([
1415
{
@@ -35,6 +36,10 @@ const router = createBrowserRouter([
3536
path: '/image-sliders',
3637
Component: ImageSliders,
3738
},
39+
{
40+
path: '/bouncing-ball',
41+
Component: BouncingBall,
42+
},
3843
]
3944
},
4045
]);

0 commit comments

Comments
 (0)