([]);
const [newGalleryItem, setNewGalleryItem] = useState("");
const [formWebsite, setFormWebsite] = useState("");
+ const [formFeatured, setFormFeatured] = useState(false);
const [uploadingImage, setUploadingImage] = useState(false);
const [uploadingGallery, setUploadingGallery] = useState(false);
@@ -178,6 +180,7 @@ export default function AdminClient({
setFormGallery(p.gallery ? [...p.gallery] : []);
setNewGalleryItem("");
setFormWebsite(p.website || "");
+ setFormFeatured(p.featured || false);
};
// Open modal for project adding
@@ -200,6 +203,7 @@ export default function AdminClient({
setFormGallery([]);
setNewGalleryItem("");
setFormWebsite("");
+ setFormFeatured(false);
};
// Save project
@@ -237,6 +241,7 @@ export default function AdminClient({
image: formImage,
gallery: formGallery,
website: formWebsite,
+ featured: formFeatured,
};
const res = await saveProject(projectDataToSave);
@@ -1157,6 +1162,18 @@ export default function AdminClient({
className="w-full font-mono text-[11px] bg-[#EDE8E0] border border-[#C8C2B8] focus:border-[#0A0A0A] outline-none px-3 py-2 text-[#0A0A0A]"
/>
+
+
+
+ setFormFeatured(e.target.checked)}
+ className="w-4 h-4 cursor-pointer"
+ />
+ Bu bizim kendi projemiz (Ana sayfada göster)
+
+
diff --git a/components/HomeClient.tsx b/components/HomeClient.tsx
index d02a3a9..45bb84a 100644
--- a/components/HomeClient.tsx
+++ b/components/HomeClient.tsx
@@ -175,7 +175,7 @@ function Label({ children }: { children: React.ReactNode }) {
}
// ── MAIN COMPONENT ──
-export default function HomeClient({ lang, dict }: { lang: Locale; dict: any }) {
+export default function HomeClient({ lang, dict, featuredProjects }: { lang: Locale; dict: any; featuredProjects?: any[] }) {
const heroRef = useRef(null);
const { scrollYProgress } = useScroll({ target: heroRef, offset: ["start start", "end start"] });
const heroY = useTransform(scrollYProgress, [0, 1], ["0%", "25%"]);
@@ -283,7 +283,7 @@ export default function HomeClient({ lang, dict }: { lang: Locale; dict: any })
-
+
);
}
diff --git a/components/HomeClientBelowFold.tsx b/components/HomeClientBelowFold.tsx
index 1e0d059..fa3ec1c 100644
--- a/components/HomeClientBelowFold.tsx
+++ b/components/HomeClientBelowFold.tsx
@@ -146,7 +146,7 @@ function Label({ children }: { children: React.ReactNode }) {
);
}
-export default function HomeClientBelowFold({ lang, dict }: { lang: Locale; dict: any }) {
+export default function HomeClientBelowFold({ lang, dict, featuredProjects }: { lang: Locale; dict: any; featuredProjects?: any[] }) {
const [activeFaq, setActiveFaq] = useState(null);
const [formSent, setFormSent] = useState(false);
const [hoverCase, setHoverCase] = useState(null);
@@ -169,9 +169,10 @@ export default function HomeClientBelowFold({ lang, dict }: { lang: Locale; dict
}))
: [];
- const caseStudies = (dict.work.items as any[]).map((item: any, idx: number) => ({
+ const rawCases = featuredProjects && featuredProjects.length > 0 ? featuredProjects : (dict.work.items as any[]);
+ const caseStudies = rawCases.map((item: any, idx: number) => ({
...item,
- tech: [
+ tech: item.tech || [
["Python", "TensorFlow", "Next.js", "PostgreSQL"],
["Solidity", "React", "IPFS", "Node.js"],
["Flutter", "Firebase", "Django", "AWS"],
diff --git a/prisma/schema.prisma b/prisma/schema.prisma
index 64b0d94..f0458bc 100644
--- a/prisma/schema.prisma
+++ b/prisma/schema.prisma
@@ -27,6 +27,7 @@ model Project {
image String @default("")
gallery String[] @default([])
website String @default("")
+ featured Boolean @default(false)
}
model BlogPost {