Skip to content

Commit 6066cb4

Browse files
Merge remote-tracking branch 'refs/remotes/origin/main'
2 parents 1e4f444 + 0fb1fd6 commit 6066cb4

File tree

2 files changed

+75
-84
lines changed

2 files changed

+75
-84
lines changed

src/components/Contact/Contact.jsx

Lines changed: 32 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import Button from "../ui/Button/Button";
44
import { motion } from "framer-motion";
55

66
export default function Contact() {
7-
const whatsappNumber = "918208689558";
8-
const whatsappMessage = "Hello! I’m interested in connecting with DCODE.";
7+
8+
const whatsappCommunityLink = "https://chat.whatsapp.com/KJNLA2R4hDE3M6FK4PK801";
99

1010
return (
1111
<motion.div
@@ -15,101 +15,62 @@ export default function Contact() {
1515
transition={{ duration: 0.5 }}
1616
>
1717
<section className="w-full pt-4 pb-8 md:py-24 bg-[#121212] relative overflow-hidden px-4 sm:px-6">
18-
{/* Background glow - smaller on mobile */}
18+
1919
<div className="absolute w-[300px] h-[210px] md:w-[600px] md:h-[420px] bg-[#01FF80] opacity-10 blur-[50px] md:blur-[100px] rounded-full z-0 -bottom-20 md:bottom-auto md:top-1/2 left-1/2 transform -translate-x-1/2 md:-translate-y-1/2" />
2020

21-
{/* Main container */}
21+
2222
<div className="w-full max-w-4xl lg:max-w-6xl xl:max-w-7xl mx-auto h-auto md:h-[300px] lg:h-[367px] bg-[#151515] border border-[rgba(25,221,113,0.3)] rounded-xl lg:rounded-[20px] relative z-10 overflow-hidden flex flex-col md:flex-row">
23-
{/* Tech tags section */}
23+
2424
<div className="hidden md:flex md:w-[40%] h-full items-center justify-center relative">
2525
<div className="absolute w-[70px] h-[70px] bg-[rgba(1,153,77,0.2)] border border-[rgba(25,221,113,0.3)] rounded-[15px] flex items-center justify-center z-10">
2626
<Code className="text-lime-400 w-6 h-6" />
2727
</div>
28-
29-
{/* Tech tags */}
30-
<span className="absolute top-[20%] left-[10%] px-2 py-0.5 text-[#01994D] text-[15px] bg-[rgba(25,221,113,0.05)] border border-[rgba(118,133,41,0.3)] rounded-full">
31-
React
32-
</span>
33-
<span className="absolute top-[20%] right-[18%] px-2 py-0.5 text-[#01994D] text-[15px] bg-[rgba(25,221,113,0.05)] border border-[rgba(118,133,41,0.3)] rounded-full">
34-
AI/ML
35-
</span>
36-
<span className="absolute top-[50%] left-[5%] px-2 py-0.5 text-[#01994D] text-[15px] bg-[rgba(25,221,113,0.05)] border border-[rgba(118,133,41,0.3)] rounded-full">
37-
Open Source
38-
</span>
39-
<span className="absolute top-[50%] right-[15%] px-2 py-0.5 text-[#01994D] text-[15px] bg-[rgba(25,221,113,0.05)] border border-[rgba(118,133,41,0.3)] rounded-full">
40-
JavaScript
41-
</span>
42-
<span className="absolute bottom-[25%] left-[25%] px-2 py-0.5 text-[#01994D] text-[15px] bg-[rgba(25,221,113,0.05)] border border-[rgba(118,133,41,0.3)] rounded-full">
43-
Node.js
44-
</span>
45-
<span className="absolute bottom-[25%] right-[25%] px-2 py-0.5 text-[#01994D] text-[15px] bg-[rgba(25,221,113,0.05)] border border-[rgba(118,133,41,0.3)] rounded-full">
46-
Python
47-
</span>
48-
<span className="absolute bottom-[5%] left-[15%] px-2 py-0.5 text-[#01994D] text-[15px] bg-[rgba(25,221,113,0.05)] border border-[rgba(118,133,41,0.3)] rounded-full">
49-
Vue.js
50-
</span>
51-
<span className="absolute bottom-[5%] right-[15%] px-2 py-0.5 text-[#01994D] text-[15px] bg-[rgba(25,221,113,0.05)] border border-[rgba(118,133,41,0.3)] rounded-full">
52-
Angular
53-
</span>
28+
29+
<span className="absolute top-[20%] left-[10%] px-2 py-0.5 text-[#01994D] text-[15px] bg-[rgba(25,221,113,0.05)] border border-[rgba(118,133,41,0.3)] rounded-full">React</span>
30+
<span className="absolute top-[20%] right-[18%] px-2 py-0.5 text-[#01994D] text-[15px] bg-[rgba(25,221,113,0.05)] border border-[rgba(118,133,41,0.3)] rounded-full">AI/ML</span>
31+
<span className="absolute top-[50%] left-[5%] px-2 py-0.5 text-[#01994D] text-[15px] bg-[rgba(25,221,113,0.05)] border border-[rgba(118,133,41,0.3)] rounded-full">Open Source</span>
32+
<span className="absolute top-[50%] right-[15%] px-2 py-0.5 text-[#01994D] text-[15px] bg-[rgba(25,221,113,0.05)] border border-[rgba(118,133,41,0.3)] rounded-full">JavaScript</span>
33+
<span className="absolute bottom-[25%] left-[25%] px-2 py-0.5 text-[#01994D] text-[15px] bg-[rgba(25,221,113,0.05)] border border-[rgba(118,133,41,0.3)] rounded-full">Node.js</span>
34+
<span className="absolute bottom-[25%] right-[25%] px-2 py-0.5 text-[#01994D] text-[15px] bg-[rgba(25,221,113,0.05)] border border-[rgba(118,133,41,0.3)] rounded-full">Python</span>
5435
</div>
5536

56-
{/* Contact content section */}
37+
5738
<div className="w-full md:w-[60%] h-full flex items-center justify-center text-white p-4 md:p-12">
5839
<div className="w-full max-w-md lg:max-w-lg">
5940
<h1 className="text-3xl sm:text-4xl md:text-4xl font-semibold text-white mb-3 md:mb-6 leading-tight">
60-
Ready to boost your{" "}
61-
<span className="text-[#01FF80]">development?</span>
41+
Ready to boost your <span className="text-[#01FF80]">development?</span>
6242
</h1>
63-
6443
<p className="text-gray-300 text-sm sm:text-base md:text-lg mb-4 md:mb-8 leading-relaxed">
65-
Interested in becoming a{" "}
66-
<span className="text-green-400 font-medium">
67-
Campus Ambassador
68-
</span>{" "}
69-
or featuring your repository on{" "}
70-
<span className="text-green-400 font-medium">DCODE</span>? Feel
71-
free to reach out!
44+
Interested in becoming a <span className="text-green-400 font-medium">Campus Ambassador</span> or featuring your repository on <span className="text-green-400 font-medium">DCODE</span>? Feel free to reach out!
7245
</p>
73-
7446
<div className="flex items-center flex-wrap gap-2 md:gap-3">
75-
{/* Contact Us (WhatsApp) */}
76-
{/* <a
77-
href={`https://wa.me/${whatsappNumber}?text=${encodeURIComponent(whatsappMessage)}`}
78-
target="_blank"
79-
rel="noopener noreferrer"
80-
className="bg-[#BCDD19] hover:bg-[#a8c516] text-black font-medium px-4 py-2 md:px-5 md:py-3 rounded text-xs md:text-sm transition-colors duration-200 flex items-center gap-2"
81-
>
82-
Contact us
83-
</a> */}
84-
<div className="flex flex-col sm:flex-row">
85-
<Button className="w-full sm:w-auto !py-2 !px-4">
86-
<a
87-
88-
rel="noopener noreferrer"
89-
href={"/contact"}
90-
>
91-
Contact us
92-
</a>
93-
</Button>
94-
</div>
47+
{/* --- UPDATED: Join Community Button --- */}
48+
<Button className="w-full sm:w-auto !py-2 !px-4">
49+
<a
50+
href={whatsappCommunityLink}
51+
target="_blank"
52+
rel="noopener noreferrer"
53+
>
54+
Join Community
55+
</a>
56+
</Button>
9557

96-
{/* Email */}
58+
{/* Email Button */}
9759
<a
98-
href="mailto:contact@dcode.codes@gmail.com"
99-
// className="text-white pt-3 md:p-4 rounded border border-[#D5D5D533] flex items-center justify-center hover:bg-[#ffffff08] transition-colors"
60+
href="mailto:dcode.codes@gmail.com"
10061
className="text-white h-fit w-fit !py-2 !px-4 rounded border border-[#D5D5D533] flex items-center justify-center hover:bg-[#ffffff08] transition-colors"
10162
>
102-
<Mail className="w-4 h-4 md:w-5 md:h-5" />
63+
<Mail className="w-4 h-4 md:w-5 md-h-5" />
10364
</a>
10465

105-
{/* WhatsApp icon */}
66+
{/* --- UPDATED: WhatsApp Icon Button --- */}
10667
<a
107-
href={`https://wa.me/${whatsappNumber}?text=${encodeURIComponent(whatsappMessage)}`}
68+
href={whatsappCommunityLink}
10869
target="_blank"
10970
rel="noopener noreferrer"
11071
className="text-white h-fit w-fit !py-2 !px-4 rounded border border-[#D5D5D533] flex items-center justify-center hover:bg-[#ffffff08] transition-colors"
11172
>
112-
<FaWhatsapp className="w-4 h-4 md:w-5 md:h-5" />
73+
<FaWhatsapp className="w-4 h-4 md:w-5 md-h-5" />
11374
</a>
11475
</div>
11576
</div>
@@ -118,4 +79,4 @@ export default function Contact() {
11879
</section>
11980
</motion.div>
12081
);
121-
}
82+
}

src/pages/Repositories/repositoriesListing.jsx

Lines changed: 43 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import React, { useState, useEffect, useMemo, useCallback } from "react";
1+
import React, { useState, useEffect, useMemo } from "react";
22
import { useRepositoriesStore } from "../../store/useRepositoriesStore";
3-
import { Link, useNavigate } from "react-router-dom";
3+
import { useNavigate } from "react-router-dom";
44
import {
55
Star,
66
Cpu,
@@ -11,6 +11,8 @@ import {
1111
BookOpen,
1212
Calendar,
1313
Tag,
14+
ChevronDown,
15+
ChevronUp,
1416
} from "lucide-react";
1517
import { motion, AnimatePresence } from "framer-motion";
1618
import DashboardFooter from "../../components/dashboard/DashboardFooter";
@@ -60,13 +62,11 @@ const RepositoriesListing = () => {
6062
projects,
6163
pagination,
6264
filters,
63-
sort,
6465
loadingList,
6566
error,
6667
fetchProjects,
6768
setSearch,
6869
setFilter,
69-
setSort,
7070
goToPage,
7171
clearFiltersAndSearch,
7272
} = useRepositoriesStore();
@@ -77,10 +77,21 @@ const RepositoriesListing = () => {
7777
const [showFilters, setShowFilters] = useState(false);
7878
const [activeFilterType, setActiveFilterType] = useState("category");
7979

80+
// --- NEW STATE for showing all filters ---
81+
const [showAllTags, setShowAllTags] = useState(false);
82+
const [showAllTech, setShowAllTech] = useState(false);
83+
8084
useEffect(() => {
8185
fetchProjects();
8286
}, []);
8387

88+
// --- NEW EFFECT to reset view when switching tabs ---
89+
useEffect(() => {
90+
setShowAllTags(false);
91+
setShowAllTech(false);
92+
}, [activeFilterType]);
93+
94+
8495
const handleRepoClick = (id, event) => {
8596
if (event.target.tagName === "A" || event.target.closest("a")) {
8697
return;
@@ -183,7 +194,7 @@ const RepositoriesListing = () => {
183194
<List size={20} />
184195
</button>
185196
</div>
186-
{/* <button
197+
<button
187198
onClick={() => setShowFilters(!showFilters)}
188199
className="flex w-full md:w-auto items-center justify-center gap-2 bg-transparent border border-[#3A3A3A] text-white px-4 py-3 rounded-lg hover:bg-[#2A2A2A] transition-colors relative"
189200
>
@@ -193,17 +204,16 @@ const RepositoriesListing = () => {
193204
{activeFiltersCount}
194205
</span>
195206
)}
196-
</button> */}
207+
</button>
197208
</div>
198209
</div>
199210

200-
{/* --- MODIFIED ANIMATION --- */}
201211
<AnimatePresence>
202212
{showFilters && (
203213
<motion.div
204214
className="overflow-hidden mt-6 pt-6 border-t border-[#23252B]"
205215
initial={{ opacity: 0, maxHeight: 0 }}
206-
animate={{ opacity: 1, maxHeight: "500px" }} // Animate to a height large enough for the content
216+
animate={{ opacity: 1, maxHeight: "500px" }}
207217
exit={{ opacity: 0, maxHeight: 0 }}
208218
transition={{ duration: 0.4, ease: "easeInOut" }}
209219
>
@@ -233,14 +243,14 @@ const RepositoriesListing = () => {
233243
</div>
234244

235245
{activeFilterType === "category" && (
236-
<div className="flex flex-wrap gap-2">
246+
<div className="flex flex-wrap gap-2 items-center">
237247
<button
238248
onClick={() => setFilter("tags", [])}
239249
className={`px-3 py-1 text-xs rounded-full ${filters.tags.length === 0 ? "bg-[#C6FF3D] text-black" : "bg-[#2A2A2A] text-[#A1A1AA]"}`}
240250
>
241251
All Categories
242252
</button>
243-
{allTags.map((tag) => (
253+
{(showAllTags ? allTags : allTags.slice(0, 10)).map((tag) => (
244254
<button
245255
key={tag}
246256
onClick={() => setFilter("tags", [tag])}
@@ -249,17 +259,26 @@ const RepositoriesListing = () => {
249259
{tag}
250260
</button>
251261
))}
262+
{allTags.length > 10 && (
263+
<button
264+
onClick={() => setShowAllTags(!showAllTags)}
265+
className="text-xs text-[#C6FF3D] hover:underline flex items-center gap-1"
266+
>
267+
{showAllTags ? "Show Less" : "Show More"}
268+
{showAllTags ? <ChevronUp size={14} /> : <ChevronDown size={14} />}
269+
</button>
270+
)}
252271
</div>
253272
)}
254273
{activeFilterType === "tech" && (
255-
<div className="flex flex-wrap gap-2">
274+
<div className="flex flex-wrap gap-2 items-center">
256275
<button
257276
onClick={() => setFilter("tech", [])}
258277
className={`px-3 py-1 text-xs rounded-full ${filters.tech.length === 0 ? "bg-[#C6FF3D] text-black" : "bg-[#2A2A2A] text-[#A1A1AA]"}`}
259278
>
260279
All Technologies
261280
</button>
262-
{allTechStacks.map((tech) => (
281+
{(showAllTech ? allTechStacks : allTechStacks.slice(0, 10)).map((tech) => (
263282
<button
264283
key={tech}
265284
onClick={() => setFilter("tech", [tech])}
@@ -268,6 +287,15 @@ const RepositoriesListing = () => {
268287
{tech}
269288
</button>
270289
))}
290+
{allTechStacks.length > 10 && (
291+
<button
292+
onClick={() => setShowAllTech(!showAllTech)}
293+
className="text-xs text-[#C6FF3D] hover:underline flex items-center gap-1"
294+
>
295+
{showAllTech ? "Show Less" : "Show More"}
296+
{showAllTech ? <ChevronUp size={14} /> : <ChevronDown size={14} />}
297+
</button>
298+
)}
271299
</div>
272300
)}
273301
</motion.div>
@@ -340,6 +368,8 @@ const RepositoriesListing = () => {
340368
);
341369
};
342370

371+
// --- Child Components (No changes needed below this line) ---
372+
343373
const ProjectCardGrid = ({ project, onClick, formatDate }) => (
344374
<motion.div
345375
onClick={onClick}
@@ -459,4 +489,4 @@ const EmptyState = ({ onClear }) => (
459489
</motion.div>
460490
);
461491

462-
export default RepositoriesListing;
492+
export default RepositoriesListing;

0 commit comments

Comments
 (0)