Skip to content

Commit 101fb0a

Browse files
committed
card done
1 parent ca1bb39 commit 101fb0a

File tree

6 files changed

+43
-36
lines changed

6 files changed

+43
-36
lines changed

client/public/assets/promoted1.png

225 KB
Loading
-124 KB
Binary file not shown.
-15.9 KB
Binary file not shown.
-7.76 KB
Binary file not shown.

client/src/components/Home.jsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -86,24 +86,24 @@ export default function Home() {
8686

8787
const options = [
8888
{
89-
heading: "LeetCode Profiles is an application that enables users to display and share their LeetCode statistics and accomplishments globally",
90-
imgSrc: "/promoted1.webp",
89+
heading: "Could you drop a star on the GitHub repo? It helps a lot!👋",
90+
imgSrc: "/promoted1.png",
9191
},
9292
{
93-
heading: "Enjoying our project? Drop a star on our GitHub repo to show your support! This will help others to discover the project. 🌟",
94-
imgSrc: "/promoted2.webp",
93+
heading: "Drop a star on our GitHub repo to show your support!🌟",
94+
imgSrc: "/promoted1.png",
9595
},
9696
{
97-
heading: "Could you please consider dropping a star on our GitHub repository? 👻 ",
98-
imgSrc: "/promoted3.webp",
97+
heading: "Can you drop a star on the GitHub repo? It helps a lot!👋 ",
98+
imgSrc: "/promoted2.webp",
9999
},
100100
{
101-
heading: "Could you drop a star on the GitHub repo? It helps a lot! 👋 ",
102-
imgSrc: "/promoted4.webp",
101+
heading: "Could you drop a star on the GitHub repo? It helps a lot!👋 ",
102+
imgSrc: "/promoted2.webp",
103103
},
104104
{
105-
heading: "Can you please share this project with your friends and family? ",
106-
imgSrc: "/promoted4.webp",
105+
heading: "Can you please share this project with your friends and family? ",
106+
imgSrc: "/promoted2.webp",
107107
}
108108
];
109109
const [random, setRandom] = useState(Math.floor(Math.random() * options.length));
@@ -138,7 +138,7 @@ export default function Home() {
138138
<div className="min-h-screen flex flex-col mx-auto max-w-screen-xl px-2 sm:px-6 lg:px-8">
139139
<div className="grid grid-cols-1 gap-4 py-4 ">
140140
<div className="grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3">
141-
<PromotedCard />
141+
<PromotedCard option={options[random]} />
142142
{
143143
loading ? (
144144

client/src/components/PromotedCard.jsx

Lines changed: 32 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,47 @@
11

22

3-
export default function PromotedCard() {
3+
export default function PromotedCard({ option }) {
44

55
return (
6-
<a href="https://leetcode.com/contest/weekly-contest-259/" rel="noreferrer" target="_blank" className="hover:scale-105 transition-transform duration-300 " >
7-
<div className="flex justify-center flex-col items-center rounded-lg h-[280px] bg-[#292829]">
8-
<div>
9-
<div className="flex gap-1 xl:gap-4 items-center justify-between ">
10-
{/* Profile */}
11-
<div className="flex items-center text-white justify-center px-4 py-1 w-full gap-2 mb-2 rounded-md">
12-
<img
13-
alt="nextui logo"
14-
className="rounded-full"
15-
height={26}
16-
radius="sm"
17-
src={`/assets/leetcode.png`}
18-
width={26}
19-
/>
20-
<h4 className="font-bold text-large SourceCodePro">LeetCode Profiles</h4>
21-
</div>
22-
6+
<a href="https://github.com/druvkotwani/leetcode-profiles" rel="noreferrer" target="_blank" className="hover:scale-105 transition-transform duration-300 " >
7+
<div className="flex justify-betwen flex-col items-center rounded-lg h-[280px] bg-[#292829] ">
8+
9+
10+
{/* Heading and Logo */}
11+
<div className="flex gap-1 xl:gap-4 items-center justify-between ">
12+
<div className="flex items-center text-white justify-center px-4 py-2 w-full gap-2 rounded-md">
13+
<img
14+
alt="nextui logo"
15+
className="rounded-full"
16+
height={24}
17+
radius="sm"
18+
src={`/assets/leetcode.png`}
19+
width={24}
20+
/>
21+
<h4 className="font-bold text-large SourceCodePro">LeetCode Profiles</h4>
2322
</div>
24-
<div style={{ height: '0.5px', backgroundColor: '#E0E0E0' }} className="h-[0.5px] bg-white" />
23+
</div>
2524

26-
<div className=" flex lg:flex-row gap-5 items-center justify-center mt-4 w-full">
27-
{/* Circle */}
2825

29-
<p className="text-xs text-white uppercase font-bold SourceCodePro mx-auto mt-2 bg-gray-600 px-16 py-2 rounded-md ">
30-
Promoted
31-
</p>
26+
<div className="">
27+
<div style={{ height: '0.5px', backgroundColor: '#E0E0E0' }} className="h-[0.5px] bg-white" />
28+
29+
<p className=" px-4 text-[#FFFEFE] mt-2 font-medium text-base xl:text-lg SourceCodePro">
30+
{option.heading}
31+
</p>
3232

33+
<div className="mx-4 ">
34+
<img alt="Ad image" src={`/assets/${option.imgSrc}`} className="z-1 w-full rounded-xl h-40 object-cover" />
3335
</div>
3436

37+
</div>
38+
39+
40+
41+
42+
3543

3644

37-
</div>
3845
</div>
3946
</a>
4047

0 commit comments

Comments
 (0)