Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@ import Hero from './components/Hero.jsx'
import Productviewer from './components/Productviewer.jsx'
import gsap from 'gsap'
import {ScrollTrigger} from 'gsap/all'
import Showcase from './components/Showcase.jsx'
gsap.registerPlugin(ScrollTrigger);

const App = () => {
return (
<main>
<NavBar/>
<NavBar/>1
<Hero/>
<Productviewer/>

<Showcase/>
</main>
)
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/NavBar.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import { navlinks } from '../constants'
import { navLinks } from '../constants'



Expand All @@ -11,7 +11,7 @@ const Navbar = () => {
<nav>
<img src="./logo.svg" alt="Apple logo" />
<ul>
{navlinks.map(({lable}) => (
{navLinks.map(({lable}) => (
<li key={lable}>
<a href={lable}>{lable}</a>
</li>
Expand Down
76 changes: 76 additions & 0 deletions src/components/Showcase.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
import {useMediaQuery} from "react-responsive";
import {useGSAP} from "@gsap/react";
import gsap from 'gsap';

const Showcase = () => {
const isTablet = useMediaQuery({ query: '(max-width: 1024px)'});

useGSAP(() => {
if(!isTablet) {
const timeline = gsap.timeline({
scrollTrigger: {
trigger: '#showcase',
start: 'top top',
end: 'bottom top',
scrub: true,
pin: true,
}
});

timeline
.to('.mask img', {
transform: 'scale(1.1)'
}).to('.content', { opacity: 1, y: 0, ease: 'power1.in' });
}
}, [isTablet])

return (
<section id="showcase">
<div className="media">
<video src="/videos/game.mp4" loop muted autoPlay playsInline />
<div className="mask">
<img src="/mask-logo.svg" />
</div>
</div>

<div className="content">
<div className="wrapper">
<div className="lg:max-w-md">
<h2>Rocket Chip</h2>

<div className="space-y-5 mt-7 pe-10">
<p>
Introducing {" "}
<span className="text-white">
M4, the next generation of Apple silicon
</span>
. M4 powers
</p>
<p>
It drives Apple Intelligence on iPad Pro, so you can write, create, and accomplish more with ease. All in a design that’s unbelievably thin, light, and powerful.
</p>
<p>
A brand-new display engine delivers breathtaking precision, color accuracy, and brightness. And a next-gen GPU with hardware-accelerated ray tracing brings console-level graphics to your fingertips.
</p>
<p className="text-primary">Learn more about Apple Intelligence</p>
</div>
</div>

<div className="max-w-3xs space-y-14">
<div className="space-y-2">
<p>Up to</p>
<h3>4x faster</h3>
<p>pro rendering performance than M2</p>
</div>
<div className="space-y-2">
<p>Up to</p>
<h3>1.5x faster</h3>
<p>CPU performance than M2</p>
</div>
</div>
</div>
</div>
</section>
)
}
export default Showcase
1 change: 1 addition & 0 deletions src/constants/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const navLinks = [
{ label: "AirPods" },
];


const noChangeParts = [
"Object_84",
"Object_37",
Expand Down