about section parllex effect updated
This commit is contained in:
parent
92e2b8e210
commit
5bb4efd6b8
@ -15,7 +15,7 @@ export default function About() {
|
||||
// Parallax effect: Moving the image vertically as the user scrolls
|
||||
// The image height is significantly larger than the container
|
||||
// We move from 0% (top aligned) to a negative percentage to reveal the bottom
|
||||
const y = useTransform(scrollYProgress, [0, 1], ["0%", "-50%"]);
|
||||
const y = useTransform(scrollYProgress, [0, 1], ["0%", "-30%"]);
|
||||
|
||||
return (
|
||||
<section id="about" className="py-24 bg-white dark:bg-black relative overflow-hidden">
|
||||
@ -32,10 +32,10 @@ export default function About() {
|
||||
</div>
|
||||
|
||||
<div className="max-w-7xl mx-auto px-6 relative z-10">
|
||||
<div className="grid grid-cols-1 lg:grid-cols-2 gap-16 items-center">
|
||||
{/* Text Content */}
|
||||
<div className="grid grid-cols-1 lg:grid-cols-12 gap-12 items-center">
|
||||
{/* Text Content - Takes 5 columns */}
|
||||
<motion.div
|
||||
className="space-y-8 z-10"
|
||||
className="space-y-8 z-10 lg:col-span-5"
|
||||
initial={{ opacity: 0, y: 30 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true, margin: "-100px" }}
|
||||
@ -48,9 +48,7 @@ export default function About() {
|
||||
|
||||
<div className="space-y-6 text-lg text-gray-600 dark:text-gray-400 leading-relaxed">
|
||||
<p>
|
||||
At Sky and Soil, we curate exceptional living spaces that harmonize with nat
|
||||
|
||||
ure. As authorized sales partners for Godrej Properties, we bring you the finest homes in Bangalore's most sought-after locations.
|
||||
At Sky and Soil, we curate exceptional living spaces that harmonize with nature. As authorized sales partners for Godrej Properties, we bring you the finest homes in Bangalore's most sought-after locations.
|
||||
</p>
|
||||
<p>
|
||||
Our mission is to connect you with homes that offer not just a roof over your head, but a lifestyle grounded in luxury and elevated by nature. From North Bengaluru to Sarjapur, discover a life of abundance.
|
||||
@ -65,21 +63,23 @@ export default function About() {
|
||||
</Link>
|
||||
</motion.div>
|
||||
|
||||
{/* Parallax Image Container */}
|
||||
{/* Parallax Image Container - Takes 7 columns */}
|
||||
<div
|
||||
ref={containerRef}
|
||||
className="
|
||||
h-[400px]
|
||||
lg:h-[600px]
|
||||
md:h-[600px]
|
||||
w-full
|
||||
mx-auto
|
||||
rounded-2xl
|
||||
overflow-hidden
|
||||
relative
|
||||
lg:col-span-7
|
||||
"
|
||||
>
|
||||
<motion.div
|
||||
style={{ y }}
|
||||
className="absolute top-[-10%] left-0 w-full h-[160%] will-change-transform"
|
||||
className="absolute top-0 left-0 w-full h-[140%] will-change-transform"
|
||||
>
|
||||
<img
|
||||
src="/assets/images/home/where.webp"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user