From c1aec7f31617cccc9229cb79d04a62b780c4d292 Mon Sep 17 00:00:00 2001 From: Sabda Yagra Date: Tue, 5 Aug 2025 22:54:26 +0700 Subject: [PATCH] fixing --- components/landing-page/navbar.tsx | 28 ++-- components/landing-page/new-content.tsx | 206 +++++++++++++++--------- 2 files changed, 144 insertions(+), 90 deletions(-) diff --git a/components/landing-page/navbar.tsx b/components/landing-page/navbar.tsx index 00c8f3e1..834fa234 100644 --- a/components/landing-page/navbar.tsx +++ b/components/landing-page/navbar.tsx @@ -250,34 +250,38 @@ const Navbar = () => { - - - - + diff --git a/components/landing-page/new-content.tsx b/components/landing-page/new-content.tsx index 3bbc213a..cfbe8fb7 100644 --- a/components/landing-page/new-content.tsx +++ b/components/landing-page/new-content.tsx @@ -128,7 +128,10 @@ const NewContent = (props: { group: string; type: string }) => {

{pathname?.split("/")[1] == "in" ? ( <> - {t("content", { defaultValue: "Content" })}  + + {t("content", { defaultValue: "Content" })} + +   {props.type == "popular" ? "Terpopuler" : props.type == "latest" @@ -153,10 +156,22 @@ const NewContent = (props: { group: string; type: string }) => { {[ - { label: t("image", { defaultValue: "Image" }), value: "image" }, - { label: t("video", { defaultValue: "Video" }), value: "video" }, - { label: t("text", { defaultValue: "Text" }), value: "document" }, - { label: t("audio", { defaultValue: "Audio" }), value: "audio" }, + { + label: t("image", { defaultValue: "Image" }), + value: "image", + }, + { + label: t("video", { defaultValue: "Video" }), + value: "video", + }, + { + label: t("text", { defaultValue: "Text" }), + value: "document", + }, + { + label: t("audio", { defaultValue: "Audio" }), + value: "audio", + }, ].map((tab) => ( { className="md:basis-1/2 lg:basis-1/3" >
- router.push( - prefixPath + `/image/detail/${image?.slug}` - ) - } - className="cursor-pointer relative group overflow-hidden bg-white dark:bg-black dark:border dark:border-gray-500 rounded-xl shadow-md hover:shadow-lg transition-shadow duration-300" + // onClick={() => + // router.push( + // prefixPath + `/image/detail/${image?.slug}` + // ) + // } + className="relative group overflow-hidden bg-white dark:bg-black dark:border dark:border-gray-500 rounded-xl shadow-md hover:shadow-lg transition-shadow duration-300" > {/* Image with motion effect */} { whileHover={{ scale: 0.95 }} transition={{ duration: 0.3 }} > - image + + {" "} + image + {/* Badge category */} @@ -248,15 +270,15 @@ const NewContent = (props: { group: string; type: string }) => { {image?.categoryName?.toUpperCase() ?? "Giat Pimpinan"}

-

- {image?.title} -

+

+ {image?.title} +

+
{/* Optional metadata area (uncomment if needed) */} {/* @@ -271,7 +293,7 @@ const NewContent = (props: { group: string; type: string }) => { ))} -
+
{Array.from({ length: count }).map((_, index) => (