Skip to content

Commit

Permalink
framer done
Browse files Browse the repository at this point in the history
  • Loading branch information
Nirmal-Kharal committed Dec 27, 2024
1 parent 9616828 commit 5762634
Show file tree
Hide file tree
Showing 7 changed files with 195 additions and 10 deletions.
84 changes: 83 additions & 1 deletion framer/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion framer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
"preview": "vite preview"
},
"dependencies": {
"motion": "^11.15.0",
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react-dom": "^18.3.1",
"react-icons": "^5.4.0"
},
"devDependencies": {
"@eslint/js": "^9.15.0",
Expand Down
17 changes: 10 additions & 7 deletions framer/src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import React from 'react'
import React from "react";
import Background from "./components/Background";
import Forground from "./components/Forground";

const App = () => {
return (
<div>

</div>
)
}
<div className="relative w-full h-screen bg-zinc-800">
<Background />
<Forground />

export default App
</div>
);
};

export default App;
14 changes: 14 additions & 0 deletions framer/src/components/Background.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from 'react'

const Background = () => {
return (
<div className='h-screen fixed w-full z-[2]'>
<div className="text-zinc-600 w-full absolute top-[10%] flex justify-center text-xl font-semibold leading-none">Document</div>
<h1 className=" absolute text-[10vw] font-semibold leading-none tracking-tight text-zinc-700 top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2">
DOCS.
</h1>
</div>
)
}

export default Background
33 changes: 33 additions & 0 deletions framer/src/components/Card.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import React from "react";
import { MdContactPage } from "react-icons/md";
import { LuDownload } from "react-icons/lu";
import { LuEyeClosed } from "react-icons/lu";
import { motion } from "motion/react"

const Card = ({data , reference})=> {
return (
<motion.div drag dragConstraints={reference} whileDrag={{scale:1.2}} className="relative w-60 h-72 bg-zinc-900/90 px-5 py-10 text-white rounded-[30px] overflow-hidden">
<MdContactPage className="text-xl " />
<p className="text-sm mt-5 font-semibold leading-tight">
{data.desc}
</p>
<div className="footer absolute bottom-0 w-full left-0 ">
<div className="flex items-center justify-between py-4 px-8 mb-1">
<h5 className="text-xs">{data.size}</h5>
<span className="bg-zinc-200 px-2 py-2 rounded-full flex items-center justify-center ">
{data.close? <LuDownload className="text-sm text-[#000]" />:< LuEyeClosed className="text-sm text-[#000]" />}

</span>
</div>
{
data.tag.isOpened&& <div className={`"w-full ${data.tag.tagColor === "teal" ? "bg-teal-600":"bg-blue-700"} px-4 py-4 flex justify-center items-center"`}>
<h1 className="font-semibold text-sm ">{data.tag.tagTitle}</h1>
</div>
}

</div>
</motion.div>
);
};

export default Card;
42 changes: 42 additions & 0 deletions framer/src/components/Forground.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import React, { useRef } from 'react'
import Card from './Card'


const Forground = () => {
const ref = useRef(null)

const data = [
{
desc:" Lorem ipsum dolor sit, amet consectetur adipisicing elit. Repellendusillum ut voluptates sequi?",
size:"0.4mb",
close : false,
tag :{isOpened:true , tagTitle:"Download Now " , tagColor:"green" },

},
{
desc:" Lorem ipsum dolor sit, amet consectetur adipisicing elit. Repellendusillum ut voluptates sequi?",
size:"0.4mb",
close : false,
tag :{isOpened:false , tagTitle:"Download Now " , tagColor:"green" },

},
{
desc:" Lorem ipsum dolor sit, amet consectetur adipisicing elit. Repellendusillum ut voluptates sequi?",
size:"0.4mb",
close : true,
tag :{isOpened:true , tagTitle:"Submit Now" , tagColor:"teal" },

}
]
return (
<div ref={ref} className=" fixed inset-0 w-full h-full top-0 left-0 p-5 flex gap-5 z-[3] flex-wrap overflow-hidden">

{data.map((item,index)=>(
<Card reference={ref} data={item}/>
))}

</div>
)
}

export default Forground
11 changes: 10 additions & 1 deletion framer/src/index.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@tailwind utilities;


*{
font-family: "Poppins", sans-serif;
}

::selection{
color: aquamarine;
}

0 comments on commit 5762634

Please sign in to comment.