diff --git a/app/[locale]/(public)/image/detail/[slug]/page.tsx b/app/[locale]/(public)/image/detail/[slug]/page.tsx index c7233931..fcc00b66 100644 --- a/app/[locale]/(public)/image/detail/[slug]/page.tsx +++ b/app/[locale]/(public)/image/detail/[slug]/page.tsx @@ -6,6 +6,8 @@ import { Textarea } from "@/components/ui/textarea"; import Link from "next/link"; import { useParams, usePathname, useRouter } from "next/navigation"; import React, { useState } from "react"; +import { Icon } from "@iconify/react/dist/iconify.js"; +import { textEllipsis } from "@/utils/globals"; const dummyImage = [ { id: 1, thumbnail: "/assets/banner-sample.png" }, @@ -17,7 +19,7 @@ const dummyImage = [ const dummyData = { id: 12312, - title: "ahahah", + title: "TITLE", createdBy: "Mabes", createdAt: "21-21-2021", time: "18:23", @@ -26,6 +28,27 @@ const dummyData = { '

Polres Kobar - Polres Kotawaringin Barat (Kobar) memberikan bantuan sosial kepada warga yang berada di Daerah Aliran Sungai (DAS) Arut khususnya yang terdampak banjir, Sabtu (30/11/2024) pagi.

Kapolda Kalteng Irjen Pol Drs. Djoko Poerwanto melalui Kapolres Kobar AKBP Yusfandi Usman, S.I.K., M.I.K., menjelaskan bahwa pihaknya membagikan 200 paket sembako sebagai bentuk kepedulian kepada masyarakat.

"Saya bersama personel turun langsung membagikan bantuan berupa paket sembako yang diserahkan kepada masyarakat sekaligus monitoring ke lokasi pinggiran sungai yang mulai sebagain terdampak banjir akibat curah hujan tinggi,” ungkap Kapolres.

Lebih lanjut, orang nomor satu di Polres Kobar ini, mengungkapkan kegiatan tersebut dilakukan dalam rangka tanggap waspada dan antisipasi bencana banjir di wilayah Kabupaten Kobar.

“Kami minta masyarakat tetap waspada banjir menyikapi cuaca yang berubah-ubah saat ini, tidak menutup kemungkinan bertambahnya volume air sungai, jika diguyur hujan terus menerus,” jelasnya.

', }; +const dummyImageContent = [ + { id: 1, thumbnail: "/assets/banner-sample.png", date: "17 MEI 2024", title: "Kapolres Batam Berikan pengarahan pagi kepada para anggota dan staf yang terkait", time: "18.00 WIB" }, + { id: 2, thumbnail: "/assets/banner-sample.png", date: "17 MEI 2024", title: "Kapolres Batam Berikan pengarahan pagi kepada para anggota dan staf yang terkait", time: "18.00 WIB" }, + { id: 3, thumbnail: "/assets/banner-sample.png", date: "17 MEI 2024", title: "Kapolres Batam Berikan pengarahan pagi kepada para anggota dan staf yang terkait", time: "18.00 WIB" }, + { id: 4, thumbnail: "/assets/banner-sample.png", date: "17 MEI 2024", title: "Kapolres Batam Berikan pengarahan pagi kepada para anggota dan staf yang terkait", time: "18.00 WIB" }, + { id: 5, thumbnail: "/assets/banner-sample.png", date: "17 MEI 2024", title: "Kapolres Batam Berikan pengarahan pagi kepada para anggota dan staf yang terkait", time: "18.00 WIB" }, + { id: 6, thumbnail: "/assets/banner-sample.png", date: "17 MEI 2024", title: "Kapolres Batam Berikan pengarahan pagi kepada para anggota dan staf yang terkait", time: "18.00 WIB" }, + { id: 7, thumbnail: "/assets/banner-sample.png", date: "17 MEI 2024", title: "Kapolres Batam Berikan pengarahan pagi kepada para anggota dan staf yang terkait", time: "18.00 WIB" }, + { id: 8, thumbnail: "/assets/banner-sample.png", date: "17 MEI 2024", title: "Kapolres Batam Berikan pengarahan pagi kepada para anggota dan staf yang terkait", time: "18.00 WIB" }, + { id: 9, thumbnail: "/assets/banner-sample.png", date: "17 MEI 2024", title: "Kapolres Batam Berikan pengarahan pagi kepada para anggota dan staf yang terkait", time: "18.00 WIB" }, +]; + +const dummyDescription = [ + { id: 1, title: "Kapolres Batam Berikan pengarahan pagi kepada para anggota dan staf yang terkait", date: "28 November 2024", time: "11.15 WIB", duration: "00:24:55" }, + { id: 2, title: "Kapolres Lahat Himbau Cipta Kondisi Cooling System Pasca Pemungutan Suara Pilkada 2024", date: "28 November 2024", time: "11.15 WIB", duration: "00:24:55" }, + { id: 3, title: "17 Ton Pupuk Bersubsidi yang Akan Diselewengkan ke Banyuasin Berhasil Digagalkan", date: "28 November 2024", time: "11.15 WIB", duration: "00:24:55" }, + { id: 4, title: "Kapolda Sumsel Apelkan 1471 Personel Persiapan Pengamanan Pengawalan Tahan Pungut dan Hitung Suara", date: "28 November 2024", time: "11.15 WIB", duration: "00:24:55" }, + { id: 5, title: "Polrestabes Palembang Berhasil Mengungkap Kasus Penganiayaan Berat di Ilir Barat II", date: "28 November 2024", time: "11.15 WIB", duration: "00:24:55" }, + { id: 6, title: "Tahapan Pilkada di Sumsel Berlangsung Kondusif", date: "28 November 2024", time: "11.15 WIB", duration: "00:24:55" }, +]; + const DetailInfo = () => { const [selectedSize, setSelectedSize] = useState("L"); const [selectedTab, setSelectedTab] = useState("video"); @@ -43,14 +66,14 @@ const DetailInfo = () => { ]; return ( -
+
{/* Container Utama */}
{/* Bagian Kiri */} -
+
{/* Gambar Utama */}
- Main + Main
@@ -61,14 +84,14 @@ const DetailInfo = () => { key={index} src="https://mediahub.polri.go.id/api/media/categories/view-thumbnail?id=93¤tMilis=1732769540018" alt={`Thumbnail ${index + 1}`} - className="w-full h-16 object-cover rounded-md cursor-pointer hover:ring-2 hover:ring-red-600" + className="w-full h-fit object-cover rounded-md cursor-pointer hover:ring-2 hover:ring-red-600" /> ))}
{/* Bagian Kanan */} -
+
@@ -132,7 +155,7 @@ const DetailInfo = () => {
{/* Keterangan */} -
+

{dummyData.title}

@@ -145,24 +168,36 @@ const DetailInfo = () => {
{/* Konten Serupa */} -
-
-
-

- Konten Serupa +
+
+
+

+ Konten Terbaru

- + Audio Visual - + Audio - + Foto - + Teks @@ -170,15 +205,21 @@ const DetailInfo = () => {
{selectedTab == "video" ? ( - + - {dummyImage.map((image) => ( + {dummyImageContent.map((image) => ( - - - - - + +
+ {image.date} {image.time} | 518{" "} + + + {" "} +
+
{image.title}
))}
@@ -188,13 +229,27 @@ const DetailInfo = () => { ) : selectedTab == "audio" ? ( - {dummyImage.map((image) => ( - - - - - - + {dummyDescription.map((description) => ( + + ))} @@ -204,13 +259,19 @@ const DetailInfo = () => { ) : selectedTab == "image" ? ( - {dummyImage.map((image) => ( + {dummyImageContent.map((image) => ( - router.push(`${locale}/image/detail/${image.id}`)}> - - - - + +
+ {image.date} {image.time} | 518{" "} + + + {" "} +
+
{image.title}
))}
@@ -220,13 +281,33 @@ const DetailInfo = () => { ) : ( - {dummyImage.map((image) => ( - - - - - - + {dummyImageContent.map((description) => ( + + ))} diff --git a/app/[locale]/(public)/image/filter/page.tsx b/app/[locale]/(public)/image/filter/page.tsx index 9387cf43..e7f05e43 100644 --- a/app/[locale]/(public)/image/filter/page.tsx +++ b/app/[locale]/(public)/image/filter/page.tsx @@ -4,6 +4,8 @@ import { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, Pagi import { Card, CardContent } from "@/components/ui/card"; import { Checkbox } from "@/components/ui/checkbox"; import { Icon } from "@iconify/react/dist/iconify.js"; +import { generateLocalizedPath } from "@/utils/globals"; +import { useParams, usePathname, useRouter } from "next/navigation"; const dummyImage = [ { id: 1, thumbnail: "/assets/banner-sample.png", date: "17 MEI 2024", title: "Kapolres Batam Berikan pengarahan pagi kepada para anggota dan staf yang terkait", time: "18.00 WIB" }, @@ -37,6 +39,11 @@ const formatPicture = [ ]; const FilterPage = () => { + const router = useRouter(); + const pathname = usePathname(); + const params = useParams(); + const locale = params?.locale; + return (
{/* Header */} @@ -124,7 +131,7 @@ const FilterPage = () => {
{dummyImage.map((image) => ( - + router.push(generateLocalizedPath(`/image/detail/${image.id}`, String(locale)))} className="flex flex-col text-xs lg:text-sm">
{image.date} {image.time} | 518{" "} diff --git a/app/[locale]/(public)/indeks/page.tsx b/app/[locale]/(public)/indeks/page.tsx index 3def81d7..8543e2a3 100644 --- a/app/[locale]/(public)/indeks/page.tsx +++ b/app/[locale]/(public)/indeks/page.tsx @@ -17,7 +17,7 @@ const ImageCard: React.FC = ({ imageUrl, label, title, date }) = {title}
{label} -

{title}

+

{title}

{date}
@@ -73,7 +73,7 @@ const ImageGallery: React.FC = () => { return ( <> {/* Hero */} -
+
@@ -83,7 +83,7 @@ const ImageGallery: React.FC = () => {
{/* Bottom */} -
+
{imageBottom.map((image) => (
diff --git a/app/[locale]/(public)/schedule/page.tsx b/app/[locale]/(public)/schedule/page.tsx index 93311fa7..f3096a7b 100644 --- a/app/[locale]/(public)/schedule/page.tsx +++ b/app/[locale]/(public)/schedule/page.tsx @@ -273,8 +273,8 @@ const Jadwal = () => {
- -
+
+
@@ -591,7 +591,7 @@ const Jadwal = () => {
- +
{/* Akhir Komponen Kiri */} diff --git a/app/[locale]/(public)/video/detail/[slug]/page.tsx b/app/[locale]/(public)/video/detail/[slug]/page.tsx index 6893667e..9c135339 100644 --- a/app/[locale]/(public)/video/detail/[slug]/page.tsx +++ b/app/[locale]/(public)/video/detail/[slug]/page.tsx @@ -6,7 +6,8 @@ import { Textarea } from "@/components/ui/textarea"; import Link from "next/link"; import { useParams, usePathname, useRouter } from "next/navigation"; import React, { useState } from "react"; - +import { Icon } from "@iconify/react/dist/iconify.js"; +import { textEllipsis } from "@/utils/globals"; const dummyImage = [ { id: 1, thumbnail: "/assets/banner-sample.png" }, @@ -18,7 +19,7 @@ const dummyImage = [ const dummyData = { id: 12312, - title: "ahahah", + title: "TITLE", createdBy: "Mabes", createdAt: "21-21-2021", time: "18:23", @@ -27,6 +28,27 @@ const dummyData = { '

Polres Kobar - Polres Kotawaringin Barat (Kobar) memberikan bantuan sosial kepada warga yang berada di Daerah Aliran Sungai (DAS) Arut khususnya yang terdampak banjir, Sabtu (30/11/2024) pagi.

Kapolda Kalteng Irjen Pol Drs. Djoko Poerwanto melalui Kapolres Kobar AKBP Yusfandi Usman, S.I.K., M.I.K., menjelaskan bahwa pihaknya membagikan 200 paket sembako sebagai bentuk kepedulian kepada masyarakat.

"Saya bersama personel turun langsung membagikan bantuan berupa paket sembako yang diserahkan kepada masyarakat sekaligus monitoring ke lokasi pinggiran sungai yang mulai sebagain terdampak banjir akibat curah hujan tinggi,” ungkap Kapolres.

Lebih lanjut, orang nomor satu di Polres Kobar ini, mengungkapkan kegiatan tersebut dilakukan dalam rangka tanggap waspada dan antisipasi bencana banjir di wilayah Kabupaten Kobar.

“Kami minta masyarakat tetap waspada banjir menyikapi cuaca yang berubah-ubah saat ini, tidak menutup kemungkinan bertambahnya volume air sungai, jika diguyur hujan terus menerus,” jelasnya.

', }; +const dummyImageContent = [ + { id: 1, thumbnail: "/assets/banner-sample.png", date: "17 MEI 2024", title: "Kapolres Batam Berikan pengarahan pagi kepada para anggota dan staf yang terkait", time: "18.00 WIB" }, + { id: 2, thumbnail: "/assets/banner-sample.png", date: "17 MEI 2024", title: "Kapolres Batam Berikan pengarahan pagi kepada para anggota dan staf yang terkait", time: "18.00 WIB" }, + { id: 3, thumbnail: "/assets/banner-sample.png", date: "17 MEI 2024", title: "Kapolres Batam Berikan pengarahan pagi kepada para anggota dan staf yang terkait", time: "18.00 WIB" }, + { id: 4, thumbnail: "/assets/banner-sample.png", date: "17 MEI 2024", title: "Kapolres Batam Berikan pengarahan pagi kepada para anggota dan staf yang terkait", time: "18.00 WIB" }, + { id: 5, thumbnail: "/assets/banner-sample.png", date: "17 MEI 2024", title: "Kapolres Batam Berikan pengarahan pagi kepada para anggota dan staf yang terkait", time: "18.00 WIB" }, + { id: 6, thumbnail: "/assets/banner-sample.png", date: "17 MEI 2024", title: "Kapolres Batam Berikan pengarahan pagi kepada para anggota dan staf yang terkait", time: "18.00 WIB" }, + { id: 7, thumbnail: "/assets/banner-sample.png", date: "17 MEI 2024", title: "Kapolres Batam Berikan pengarahan pagi kepada para anggota dan staf yang terkait", time: "18.00 WIB" }, + { id: 8, thumbnail: "/assets/banner-sample.png", date: "17 MEI 2024", title: "Kapolres Batam Berikan pengarahan pagi kepada para anggota dan staf yang terkait", time: "18.00 WIB" }, + { id: 9, thumbnail: "/assets/banner-sample.png", date: "17 MEI 2024", title: "Kapolres Batam Berikan pengarahan pagi kepada para anggota dan staf yang terkait", time: "18.00 WIB" }, +]; + +const dummyDescription = [ + { id: 1, title: "Kapolres Batam Berikan pengarahan pagi kepada para anggota dan staf yang terkait", date: "28 November 2024", time: "11.15 WIB", duration: "00:24:55" }, + { id: 2, title: "Kapolres Lahat Himbau Cipta Kondisi Cooling System Pasca Pemungutan Suara Pilkada 2024", date: "28 November 2024", time: "11.15 WIB", duration: "00:24:55" }, + { id: 3, title: "17 Ton Pupuk Bersubsidi yang Akan Diselewengkan ke Banyuasin Berhasil Digagalkan", date: "28 November 2024", time: "11.15 WIB", duration: "00:24:55" }, + { id: 4, title: "Kapolda Sumsel Apelkan 1471 Personel Persiapan Pengamanan Pengawalan Tahan Pungut dan Hitung Suara", date: "28 November 2024", time: "11.15 WIB", duration: "00:24:55" }, + { id: 5, title: "Polrestabes Palembang Berhasil Mengungkap Kasus Penganiayaan Berat di Ilir Barat II", date: "28 November 2024", time: "11.15 WIB", duration: "00:24:55" }, + { id: 6, title: "Tahapan Pilkada di Sumsel Berlangsung Kondusif", date: "28 November 2024", time: "11.15 WIB", duration: "00:24:55" }, +]; + const DetailVideo = () => { const [selectedSize, setSelectedSize] = useState("L"); const [selectedTab, setSelectedTab] = useState("video"); @@ -44,14 +66,14 @@ const DetailVideo = () => { ]; return ( -
+
{/* Container Utama */}
{/* Bagian Kiri */} -
+
{/* Gambar Utama */}
- Main + Main
@@ -62,14 +84,14 @@ const DetailVideo = () => { key={index} src="https://mediahub.polri.go.id/api/media/categories/view-thumbnail?id=93¤tMilis=1732769540018" alt={`Thumbnail ${index + 1}`} - className="w-full h-16 object-cover rounded-md cursor-pointer hover:ring-2 hover:ring-red-600" + className="w-full h-fit object-cover rounded-md cursor-pointer hover:ring-2 hover:ring-red-600" /> ))}
{/* Bagian Kanan */} -
+
@@ -133,7 +155,7 @@ const DetailVideo = () => {
{/* Keterangan */} -
+

{dummyData.title}

@@ -146,24 +168,36 @@ const DetailVideo = () => {
{/* Konten Serupa */} -
-
-
-

- Konten Serupa +
+
+
+

+ Konten Terbaru

- + Audio Visual - + Audio - + Foto - + Teks @@ -171,15 +205,21 @@ const DetailVideo = () => {
{selectedTab == "video" ? ( - + - {dummyImage.map((image) => ( + {dummyImageContent.map((image) => ( - - - - - + +
+ {image.date} {image.time} | 518{" "} + + + {" "} +
+
{image.title}
))}
@@ -189,13 +229,27 @@ const DetailVideo = () => { ) : selectedTab == "audio" ? ( - {dummyImage.map((image) => ( - - - - - - + {dummyDescription.map((description) => ( + + ))} @@ -205,13 +259,19 @@ const DetailVideo = () => { ) : selectedTab == "image" ? ( - {dummyImage.map((image) => ( + {dummyImageContent.map((image) => ( - router.push(`${locale}/image/detail/${image.id}`)}> - - - - + +
+ {image.date} {image.time} | 518{" "} + + + {" "} +
+
{image.title}
))}
@@ -221,13 +281,33 @@ const DetailVideo = () => { ) : ( - {dummyImage.map((image) => ( - - - - - - + {dummyImageContent.map((description) => ( + + ))} diff --git a/components/landing-page/new-content.tsx b/components/landing-page/new-content.tsx index ef3d9522..a4b2151f 100644 --- a/components/landing-page/new-content.tsx +++ b/components/landing-page/new-content.tsx @@ -2,9 +2,10 @@ import React, { useState } from "react"; import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs"; import { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious } from "@/components/ui/carousel"; import Link from "next/link"; -import { usePathname, useRouter } from "next/navigation"; +import { useParams, usePathname, useRouter } from "next/navigation"; import { Icon } from "@iconify/react/dist/iconify.js"; import { textEllipsis } from "@/utils/globals"; +import { generateLocalizedPath } from "@/utils/globals"; const dummyImage = [ { id: 1, thumbnail: "/assets/banner-sample.png", date: "17 MEI 2024", title: "Kapolres Batam Berikan pengarahan pagi kepada para anggota dan staf yang terkait", time: "18.00 WIB" }, @@ -31,6 +32,8 @@ const NewContent = () => { const [selectedTab, setSelectedTab] = useState("video"); const router = useRouter(); const pathname = usePathname(); + const params = useParams(); + const locale = params?.locale; return (
@@ -74,14 +77,21 @@ const NewContent = () => { {dummyImage.map((image) => ( - -
- {image.date} {image.time} | 518{" "} - - - {" "} -
-
{image.title}
+ + +
+

{image.title}

+

+ {image.date} {image.time} | 518{" "} + + + {" "} +

+
+
))}
@@ -123,14 +133,21 @@ const NewContent = () => { {dummyImage.map((image) => ( - -
- {image.date} {image.time} | 518{" "} - - - {" "} -
-
{image.title}
+ + +
+

{image.title}

+

+ {image.date} {image.time} | 518{" "} + + + {" "} +

+
+
))}
diff --git a/components/landing-page/popular-content.tsx b/components/landing-page/popular-content.tsx index 1adc0912..e59afe48 100644 --- a/components/landing-page/popular-content.tsx +++ b/components/landing-page/popular-content.tsx @@ -77,14 +77,21 @@ const PopularContent = () => { {dummyImage.map((image) => ( - - - {image.date} {image.time} | 518{" "} - - - {" "} + + +
+

{image.title}

+

+ {image.date} {image.time} | 518{" "} + + + {" "} +

+
-
{image.title}
))}
@@ -126,14 +133,21 @@ const PopularContent = () => { {dummyImage.map((image) => ( - -
- {image.date} {image.time} | 518{" "} - - - {" "} -
-
{image.title}
+ + +
+

{image.title}

+

+ {image.date} {image.time} | 518{" "} + + + {" "} +

+
+
))}