Skip to content

Commit cab35ac

Browse files
committed
adjust bouncing ball bottom scroll text
1 parent 8c49c04 commit cab35ac

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

src/components/ImageLink.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default function ImageLink({ path, text, imagePath }: ImageLinkType) {
1717
style={{ backgroundImage: `url(${imagePath})`}}
1818
></div>
1919

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">
20+
<p className="w-full h-[4em] p-4 m-2 font-mono tracking-wider 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">
2121
{text}
2222
</p>
2323
</Link>

src/pages/BouncingBall.tsx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@ export default function BouncingBall() {
88

99
useEffect(() => {
1010
const main = mainRef.current;
11-
1211
if (!main) return;
13-
14-
console.log('width:', main.clientWidth);
1512

1613
const observer = new ResizeObserver(() => {
1714
const w = main.clientWidth;
@@ -79,13 +76,17 @@ export default function BouncingBall() {
7976
/>
8077
</svg>
8178

82-
<div className="h-20">
79+
<div className="h-20 w-full">
8380
<motion.p
8481
key={mainWidth}
85-
initial={{ x: '150%' }}
86-
animate={{ x: '-150%' }}
87-
transition={{ duration: (mainWidth / 50), repeat: Infinity }}
88-
className="h-full mt-10 text-xl"
82+
initial={{ x: '100%', }}
83+
animate={{ x: '-33%', }}
84+
transition={{
85+
duration: mainWidth / 100,
86+
repeat: Infinity,
87+
ease: 'linear'
88+
}}
89+
className="p-2 w-full mt-10 text-lg font-stretch-120%"
8990
>
9091
Thanks for visiting ☺︎
9192
</motion.p>

src/pages/Home.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import ImageLink from "../components/ImageLink";
33
export default function Home() {
44
return (
55
<main className="p-4">
6-
<div className="grid grid-cols-1 gap-6 xs:grid-cols-2 xs:gap-4 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5">
6+
<div className="grid grid-cols-1 gap-6 min-[35rem]:grid-cols-2 min-[35rem]:gap-4 min-[52rem]:grid-cols-3 min-[68rem]:grid-cols-4 min-[86rem]:grid-cols-5">
77
<ImageLink
88
path="/falling-spheres"
99
text="Falling Spheres"

0 commit comments

Comments
 (0)