From 8812ce02ac1621fa393156b28a50bb309fd4ada7 Mon Sep 17 00:00:00 2001 From: Sabda Yagra Date: Thu, 27 Mar 2025 21:00:01 +0700 Subject: [PATCH] fix mobile version polda/kaltara and tbnews --- .../[polda_name]/image/detail/[slug]/page.tsx | 2 +- .../[polda_name]/components/regional-news.tsx | 2 +- .../[polda_name]/components/social-media.tsx | 10 +- .../[polda_name]/image/detail/[slug]/page.tsx | 2 +- components/landing-page/content-category.tsx | 44 +++++- .../header-banner-kaltara.tsx | 5 +- .../latest-content-kaltara.tsx | 132 +++++++++++++----- 7 files changed, 148 insertions(+), 49 deletions(-) diff --git a/app/[locale]/(public)/(polda)/polda/[polda_name]/image/detail/[slug]/page.tsx b/app/[locale]/(public)/(polda)/polda/[polda_name]/image/detail/[slug]/page.tsx index 17e7e146..8a6565ee 100644 --- a/app/[locale]/(public)/(polda)/polda/[polda_name]/image/detail/[slug]/page.tsx +++ b/app/[locale]/(public)/(polda)/polda/[polda_name]/image/detail/[slug]/page.tsx @@ -497,7 +497,7 @@ const DetailInfo = () => { -
+
{listSuggestion?.map((data: any) => ( diff --git a/app/[locale]/(public)/(polda)/tbnews/[polda_name]/components/regional-news.tsx b/app/[locale]/(public)/(polda)/tbnews/[polda_name]/components/regional-news.tsx index a81bd11e..dd676e45 100644 --- a/app/[locale]/(public)/(polda)/tbnews/[polda_name]/components/regional-news.tsx +++ b/app/[locale]/(public)/(polda)/tbnews/[polda_name]/components/regional-news.tsx @@ -129,7 +129,7 @@ const RegionalNews = () => {

Berita Wilayah

-
+
{isLoading ? (
diff --git a/app/[locale]/(public)/(polda)/tbnews/[polda_name]/components/social-media.tsx b/app/[locale]/(public)/(polda)/tbnews/[polda_name]/components/social-media.tsx index 3e6b6878..6abb3425 100644 --- a/app/[locale]/(public)/(polda)/tbnews/[polda_name]/components/social-media.tsx +++ b/app/[locale]/(public)/(polda)/tbnews/[polda_name]/components/social-media.tsx @@ -109,7 +109,7 @@ const SocialMedia = () => {
{selectedTab == "x" ? ( -
+
{/*
@@ -175,7 +175,7 @@ const SocialMedia = () => {
) : selectedTab == "instagram" ? ( -
+
@@ -207,7 +207,7 @@ const SocialMedia = () => {
) : selectedTab == "facebook" ? ( -
+
@@ -239,7 +239,7 @@ const SocialMedia = () => {
) : selectedTab == "tiktok" ? ( -
+
@@ -271,7 +271,7 @@ const SocialMedia = () => {
) : selectedTab == "youtube" ? ( -
+
diff --git a/app/[locale]/(public)/(polda)/tbnews/[polda_name]/image/detail/[slug]/page.tsx b/app/[locale]/(public)/(polda)/tbnews/[polda_name]/image/detail/[slug]/page.tsx index dfe60185..f00057c9 100644 --- a/app/[locale]/(public)/(polda)/tbnews/[polda_name]/image/detail/[slug]/page.tsx +++ b/app/[locale]/(public)/(polda)/tbnews/[polda_name]/image/detail/[slug]/page.tsx @@ -813,7 +813,7 @@ const DetailInfo = () => {
-
+
{listSuggestion?.map((data: any) => ( diff --git a/components/landing-page/content-category.tsx b/components/landing-page/content-category.tsx index 44e97c13..d4d5542b 100644 --- a/components/landing-page/content-category.tsx +++ b/components/landing-page/content-category.tsx @@ -72,7 +72,21 @@ const ContentCategory = (props: { group?: string }) => { {categories?.map((category: any, index: number) => !seeAllValue ? ( index < 4 ? ( + // + // category + //
+ //

{category?.name}

+ //
+ // + {/* Gambar */} category { src={category?.thumbnailLink} className="w-full lg:w-[315px] lg:h-[250px] h-40 object-cover group-hover:scale-110 transition-transform duration-300" /> -
+ + {/* Overlay gelap */} +
+ + {/* Judul */} +

{category?.name}

@@ -89,16 +108,35 @@ const ContentCategory = (props: { group?: string }) => { "" ) ) : ( + // + // category + //
+ //

{category?.name}

+ //
+ // + {/* Gambar */} category -
+ + {/* Overlay Gelap */} +
+ + {/* Judul */} +

{category?.name}

diff --git a/components/landing-page/landing-polda-kaltara/header-banner-kaltara.tsx b/components/landing-page/landing-polda-kaltara/header-banner-kaltara.tsx index 0aba9055..6a38dbb0 100644 --- a/components/landing-page/landing-polda-kaltara/header-banner-kaltara.tsx +++ b/components/landing-page/landing-polda-kaltara/header-banner-kaltara.tsx @@ -89,8 +89,9 @@ const HeaderBannerKaltara = () => { {content?.map((row: any) => ( -
- +
+ +
{/* Overlay */}
{row?.categoryName}
router.push(prefixPath + `/image/detail/${row?.slug}`)} className="cursor-pointer mt-2 lg:mt-0"> diff --git a/components/landing-page/landing-polda-kaltara/latest-content-kaltara.tsx b/components/landing-page/landing-polda-kaltara/latest-content-kaltara.tsx index 71748927..8d112c3a 100644 --- a/components/landing-page/landing-polda-kaltara/latest-content-kaltara.tsx +++ b/components/landing-page/landing-polda-kaltara/latest-content-kaltara.tsx @@ -75,7 +75,7 @@ const LatestContentKaltara = (props: { group: string; type: string }) => {
Berita {props.type == "popular" ? "Terpopuler" : props.type == "latest" ? t("new") : "Serupa"}
-
+
{
{selectedTab == "image" ? ( content?.length > 0 ? ( - + // + // + // {content?.map((image: any) => ( + // + //
router.push(prefixPath + `/video/detail/${image?.slug}`)} className="cursor-pointer relative group rounded-md overflow-hidden"> + // {/* Gambar */} + // image + + // {/* Kategori - Sekarang Berada di Atas */} + // {image?.categoryName} + + // {/* Overlay Konten (Informasi di Bawah) */} + //
+ // {/* Judul */} + //

{image?.title}

+ + // {/* Info Tambahan */} + // {/*

+ // {formatDateToIndonesian(new Date(video?.createdAt))} {video?.timezone ? video?.timezone : "WIB"} | {video?.clickCount} + //

*/} + //
+ //
+ //
+ // ))} + //
+ // {/* + // */} + //
+ - {content?.map((video: any) => ( - -
router.push(prefixPath + `/video/detail/${video?.slug}`)} className="cursor-pointer relative group rounded-md overflow-hidden"> + {content?.map((image: any) => ( + +
router.push(prefixPath + `/image/detail/${image?.slug}`)} className="cursor-pointer relative group rounded-md overflow-hidden"> {/* Gambar */} video - {/* Kategori - Sekarang Berada di Atas */} - {video?.categoryName} + {/* Overlay gelap */} +
- {/* Overlay Konten (Informasi di Bawah) */} -
- {/* Judul */} -

{video?.title}

+ {/* Kategori */} + {image?.categoryName} - {/* Info Tambahan */} - {/*

- {formatDateToIndonesian(new Date(video?.createdAt))} {video?.timezone ? video?.timezone : "WIB"} | {video?.clickCount} -

*/} + {/* Konten Informasi */} +
+

{image?.title}

))} - - ) : (

@@ -200,8 +230,8 @@ const LatestContentKaltara = (props: { group: string; type: string }) => { ))} - - + {/* + */} ) : (

@@ -210,10 +240,45 @@ const LatestContentKaltara = (props: { group: string; type: string }) => { ) ) : selectedTab == "video" ? ( content?.length > 0 ? ( - + // + // + // {content?.map((video: any) => ( + // + //

router.push(prefixPath + `/video/detail/${video?.slug}`)} className="cursor-pointer relative group rounded-lg overflow-hidden"> + // {/* Gambar */} + // video + + // {/* Kategori - Sekarang Berada di Atas */} + // {video?.categoryName} + + // {/* Overlay Konten (Informasi di Bawah) */} + //
+ // {/* Judul */} + //

{video?.title}

+ + // {/* Info Tambahan */} + // {/*

+ // {formatDateToIndonesian(new Date(video?.createdAt))} {video?.timezone ? video?.timezone : "WIB"} | {video?.clickCount} + //

*/} + //
+ //
+ // + // ))} + // + // {/* + // */} + // + {content?.map((video: any) => ( - +
router.push(prefixPath + `/video/detail/${video?.slug}`)} className="cursor-pointer relative group rounded-lg overflow-hidden"> {/* Gambar */} { className="w-full lg:w-[315px] h-48 md:h-56 lg:h-[490px] object-cover rounded-lg transition-transform duration-300" /> - {/* Kategori - Sekarang Berada di Atas */} + {/* Overlay Gelap */} +
+ + {/* Kategori */} {video?.categoryName} - {/* Overlay Konten (Informasi di Bawah) */} -
- {/* Judul */} -

{video?.title}

- - {/* Info Tambahan */} - {/*

- {formatDateToIndonesian(new Date(video?.createdAt))} {video?.timezone ? video?.timezone : "WIB"} | {video?.clickCount} -

*/} + {/* Overlay Konten (Judul) */} +
+

{video?.title}

))} - - ) : (

@@ -286,8 +346,8 @@ const LatestContentKaltara = (props: { group: string; type: string }) => { ))} - - + {/* + */} ) : (