Skip to content

Commit c7ddf2c

Browse files
Merge pull request #6 from UjjwalSaini07/B5-AfterPreRelease
Enhancement After PreRelease
2 parents 9ba377a + eded931 commit c7ddf2c

File tree

3 files changed

+208
-155
lines changed

3 files changed

+208
-155
lines changed

src/App.jsx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import Spline from "@splinetool/react-spline";
33
import Swal from "sweetalert2";
44
import { BsVolumeUpFill, BsVolumeMuteFill } from "react-icons/bs";
55

6+
import MouseStealing from './MouseStealer.jsx';
67
import lovesvg from "./assets/All You Need Is Love SVG Cut File.svg";
78
import Lovegif from "./assets/GifData/main_temp.gif";
89
import heartGif from "./assets/GifData/happy.gif";
@@ -290,12 +291,33 @@ export default function Page() {
290291
}
291292
}, [yesPressed, noCount, yespopupShown]);
292293

294+
useEffect(() => {
295+
if (noCount == 25) {
296+
Swal.fire({
297+
title: "My love for you is endless, like the stars in the sky—shining for you every night, even if you don’t always notice. 🌟 I’ll wait patiently, proving every day that you’re my everything. ❤️ Please press ‘Yes’ and let’s make this a forever story. 🥰✨<br/>'True love never gives up; it grows stronger with time.'",
298+
width: 850,
299+
padding: "2em",
300+
color: "#716add",
301+
background: `#fff url(${swalbg})`,
302+
backdrop: `
303+
rgba(0, 104, 123, 0.7)
304+
url(${nogif1})
305+
right
306+
no-repeat
307+
`,
308+
});
309+
}
310+
}, [noCount]);
311+
293312
return (
294313
<>
295314
<div className="fixed top-0 left-0 w-screen h-screen -z-10">
296315
<Spline scene="https://prod.spline.design/oSxVDduGPlsuUIvT/scene.splinecode" />
297316
{/* <Spline scene="https://prod.spline.design/ZU2qkrU9Eyt1PHBx/scene.splinecode" /> */}
298317
</div>
318+
319+
{noCount > 16 && noCount < 25 && yesPressed == false && <MouseStealing />}
320+
299321
<div className="overflow-hidden flex flex-col items-center justify-center pt-4 h-screen -mt-16 selection:bg-rose-600 selection:text-white text-zinc-900">
300322
{yesPressed && noCount>3 ? (
301323
<>

src/MouseStealer.css

Lines changed: 106 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,108 @@
1-
.container {
1+
.grab-zone {
2+
position: fixed;
3+
bottom: -280px;
4+
left: 65.5%;
5+
width: 240px;
6+
height: 300px;
7+
transition: bottom 2s cubic-bezier(0.42, 0, 0.58, 1), transform 1s ease-in-out;
8+
z-index: 10;
9+
pointer-events: none;
10+
}
11+
12+
.grabber {
13+
position: relative;
14+
width: 105px;
15+
height: 140px;
16+
pointer-events: auto;
17+
transform: translateX(-50%);
18+
transition: transform 0.8s ease, bottom 2s cubic-bezier(0.42, 0, 0.58, 1);
19+
}
20+
21+
.grab-zone--peek {
22+
bottom: -150px;
23+
}
24+
25+
.grab-zone--active {
26+
bottom: 50px;
27+
}
28+
29+
.grabber__face {
30+
position: absolute;
31+
width: 110px;
32+
height: 110px;
33+
z-index: 5;
34+
}
35+
36+
.grabber__eyes {
37+
position: absolute;
38+
top: 25px;
39+
left: 25px;
40+
width: 50px;
41+
height: 20px;
42+
display: flex;
43+
justify-content: space-between;
44+
}
45+
46+
.grabber__eye {
47+
width: 20px;
48+
height: 20px;
49+
background: #000;
50+
border-radius: 50%;
51+
transform-origin: center;
52+
}
53+
54+
.grabber__eye--left {
55+
transform: translate(20px, 0);
56+
}
57+
58+
.grabber__eye--right {
59+
transform: translate(-20px, 0);
60+
}
61+
62+
.grabber--near .grabber__face {
63+
animation: peek 1.2s ease-in-out infinite;
64+
}
65+
66+
.grabber__hand {
67+
position: absolute;
68+
bottom: -15px;
69+
width: 55px;
70+
height: 75px;
71+
transform: translateX(-50%);
72+
}
73+
74+
.grabber--grabbed {
75+
transform: translateY(-50px);
76+
}
77+
78+
.grabber--stealing {
79+
bottom: -300px !important;
80+
animation: descend 2s cubic-bezier(0.42, 0, 0.58, 1);
81+
}
82+
83+
@keyframes peek {
84+
0%, 100% {
85+
transform: translateY(10px);
86+
}
87+
50% {
88+
transform: translateY(0);
89+
}
90+
}
91+
92+
@keyframes descend {
93+
from {
94+
bottom: 10px;
95+
transform: scale(1.1);
96+
}
97+
to {
98+
bottom: -300px;
99+
transform: scale(1);
100+
}
101+
}
102+
103+
104+
/* Todo: Main Styled Code */
105+
/* .container {
2106
max-width: 520px;
3107
margin: 0 auto;
4108
padding: 0 1rem 100px 1rem;
@@ -179,4 +283,4 @@
179283
100% {
180284
transform: scale(2.5) translateY(0%) rotate(20deg);
181285
}
182-
}
286+
} */

0 commit comments

Comments
 (0)