-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApproach.tsx
129 lines (123 loc) · 5.09 KB
/
Approach.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
"use client";
import React from "react";
import { AnimatePresence, motion } from "framer-motion";
import { CanvasRevealEffect } from "@/components/ui/CanvasRevealEffect";
const Approach = () => {
return (
<section className="w-full py-20 ">
<h1 className="heading">My <span className="dark:text-purple text-violet-700">Approach</span></h1>
<div className="my-20 flex flex-col lg:flex-row items-center justify-center gap-4">
<Card title="Planning & Strategy"
icon={<AceternityIcon order="Phase-1" />}
description="We'll collaborate to map out your website's goals, target audience, and key functionalities. We'll discuss things like site structure, navigation, and content requirements."
>
<CanvasRevealEffect
animationSpeed={3}
containerClassName="bg-emerald-900"
/>
</Card>
<Card title="Development & Progress Updates"
icon={<AceternityIcon order="Phase-2" />}
description="Once we agree on the plan, I cue my lofi playlist and dive into coding. From initial sketches to polished code, I keep you updated every step of the way."
>
<CanvasRevealEffect
animationSpeed={3}
containerClassName="bg-black"
colors={[
[236, 72, 153],
[232, 121, 249],
]}
dotSize={3}
/>
</Card>
<Card title="Development & Launch" icon={<AceternityIcon order="Phase-3" />}
description="This is where the magic happens! Based on the approved design, I'll translate everything into functional code, building your website from the ground up."
>
<CanvasRevealEffect
animationSpeed={3}
containerClassName="bg-sky-600"
colors={[[125, 211, 252]]}
/>
</Card>
</div>
</section>
);
}
const Card = ({
title,
icon,
children,
description,
}: {
title: string;
icon: React.ReactNode;
children?: React.ReactNode;
description?: string;
}) => {
const [hovered, setHovered] = React.useState(false);
return (
<div
onMouseEnter={() => setHovered(true)}
onMouseLeave={() => setHovered(false)}
className="border border-black/[0.2] group/canvas-card flex items-center justify-center dark:border-white/[0.2] max-w-sm w-full mx-auto p-4 relative h-[35rem] rounded-3xl"
>
<Icon className="absolute h-6 w-6 -top-3 -left-3 dark:text-white text-black" />
<Icon className="absolute h-6 w-6 -bottom-3 -left-3 dark:text-white text-black" />
<Icon className="absolute h-6 w-6 -top-3 -right-3 dark:text-white text-black" />
<Icon className="absolute h-6 w-6 -bottom-3 -right-3 dark:text-white text-black" />
<AnimatePresence>
{hovered && (
<motion.div
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
className="h-full w-full absolute inset-0"
>
{children}
</motion.div>
)}
</AnimatePresence>
<div className="relative z-20">
<div className="text-center group-hover/canvas-card:-translate-y-4 absolute top-[50%] left-[50%] -translate-x-[50%] -translate-y-[50%] group-hover/canvas-card:opacity-0 transition duration-200 w-full mx-auto flex items-center justify-center flex-col gap-y-6">
<div>
{icon}
</div>
<div className="text-lg text-white z-50">Hover to reveal</div>
</div>
<h2 className="dark:text-white text-3xl opacity-0 group-hover/canvas-card:opacity-100 relative z-10 text-black mt-4 font-bold group-hover/canvas-card:text-white group-hover/canvas-card:-translate-y-2 transition duration-200 text-center">
{title}
</h2>
<h2 className="text-sm dark:text-white opacity-0 group-hover/canvas-card:opacity-100 relative z-10 text-black mt-4 font-bold group-hover/canvas-card:text-white group-hover/canvas-card:-translate-y-2 transition duration-200 text-center" style={{ color: "#e4ecff" }}>
{description}
</h2>
</div>
</div>
);
};
const AceternityIcon = ({ order }: { order: string }) => {
return (
<div>
<button className="relative inline-flex h-12 overflow-hidden rounded-full p-[1px] focus:outline-none focus:ring-2 focus:ring-slate-400 focus:ring-offset-2 focus:ring-offset-slate-50">
<span className="absolute inset-[-1000%] animate-[spin_2s_linear_infinite] bg-[conic-gradient(from_90deg_at_50%_50%,#E2CBFF_0%,#393BB2_50%,#E2CBFF_100%)]" />
<span className="inline-flex h-full w-full cursor-pointer items-center justify-center rounded-full bg-slate-950 px-5 py-2 font-bold text-white backdrop-blur-3xl text-2xl">
{order}
</span>
</button>
</div>
);
};
export const Icon = ({ className, ...rest }: any) => {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
strokeWidth="1.5"
stroke="currentColor"
className={className}
{...rest}
>
<path strokeLinecap="round" strokeLinejoin="round" d="M12 6v12m6-6H6" />
</svg>
);
};
export default Approach