Feat: add api in another content and adjust spacing in ui
This commit is contained in:
parent
8e210bc307
commit
dec1febfba
|
|
@ -81,14 +81,15 @@ const DetailInfo = () => {
|
|||
];
|
||||
|
||||
return (
|
||||
<div className="min-h-screen px-4 md:px-24 py-4">
|
||||
<div className="rounded-md overflow-hidden md:flex">
|
||||
{/* Bagian Kiri */}
|
||||
<Reveal>
|
||||
<div className="md:w-3/4">
|
||||
<>
|
||||
<div className="min-h-screen px-4 md:px-24 py-4">
|
||||
<div className="rounded-md overflow-hidden md:flex">
|
||||
{/* Bagian Kiri */}
|
||||
|
||||
<div className="md:w-[70%]">
|
||||
{/* Gambar Besar */}
|
||||
<div className="relative">
|
||||
<img src={detailDataImage?.files[selectedImage]?.url} alt="Main" className="w-full rounded-lg" />
|
||||
<img src={detailDataImage?.files[selectedImage]?.url} alt="Main" className="rounded-lg w-auto h-fit" />
|
||||
<div className="absolute top-4 left-4"></div>
|
||||
</div>
|
||||
|
||||
|
|
@ -101,16 +102,14 @@ const DetailInfo = () => {
|
|||
))}
|
||||
</div>
|
||||
</div>
|
||||
</Reveal>
|
||||
|
||||
{/* Bagian Kanan */}
|
||||
<Reveal>
|
||||
<div className="md:w-1/4 p-4 bg-gray-300 rounded-lg mx-4">
|
||||
{/* Bagian Kanan */}
|
||||
<div className="md:w-[30%] p-4 bg-gray-300 rounded-lg mx-4">
|
||||
<div className="flex flex-col mb-3 items-center justify-center cursor-pointer">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="2.5em" height="2.5em" viewBox="0 0 24 24">
|
||||
<path fill="black" d="m17 18l-5-2.18L7 18V5h10m0-2H7a2 2 0 0 0-2 2v16l7-3l7 3V5a2 2 0 0 0-2-2" />
|
||||
</svg>
|
||||
<p className="text-base lg:text-lg">Simpan</p>
|
||||
<button className="text-base lg:text-lg">Simpan</button>
|
||||
</div>
|
||||
{/* garis */}
|
||||
<div className="border-t border-black my-4"></div>
|
||||
|
|
@ -159,11 +158,9 @@ const DetailInfo = () => {
|
|||
Download
|
||||
</button>
|
||||
</div>
|
||||
</Reveal>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Footer Informasi */}
|
||||
<Reveal>
|
||||
{/* Footer Informasi */}
|
||||
<div className="p-4 text-sm text-gray-500 flex justify-between items-center border-t mt-4">
|
||||
<div className="flex flex-row items-center">
|
||||
oleh <span className="font-semibold text-black">{detailDataImage?.uploadedBy?.userLevel?.name}</span> | Diupdate pada {detailDataImage?.updatedAt} WIB |
|
||||
|
|
@ -178,7 +175,8 @@ const DetailInfo = () => {
|
|||
<h1 className="flex flex-row font-bold text-2xl mx-5 my-8">{detailDataImage?.title}</h1>
|
||||
<div dangerouslySetInnerHTML={{ __html: detailDataImage?.htmlDescription }} />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div className="w-full mb-8">
|
||||
{/* Comment */}
|
||||
<div className="flex flex-col my-16 gap-5 p-10 bg-gray-300">
|
||||
<p className="flex items-start text-lg">Berikan Komentar</p>
|
||||
|
|
@ -190,8 +188,8 @@ const DetailInfo = () => {
|
|||
<div className="px-4">
|
||||
<NewContent type={"similar"} />
|
||||
</div>
|
||||
</Reveal>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import { getListContent } from "@/service/landing/landing";
|
|||
import { ColumnDef, ColumnFiltersState, PaginationState, SortingState, VisibilityState, flexRender, getCoreRowModel, getFilteredRowModel, getPaginationRowModel, getSortedRowModel, useReactTable } from "@tanstack/react-table";
|
||||
import LandingPagination from "@/components/landing-page/pagination";
|
||||
import { Reveal } from "@/components/landing-page/Reveal";
|
||||
import { Link } from "@/i18n/routing";
|
||||
|
||||
const columns: ColumnDef<any>[] = [
|
||||
{
|
||||
|
|
@ -106,14 +107,13 @@ const FilterPage = () => {
|
|||
<div className="flex flex-col md:flex-row items-start gap-5 p-10 bg-gray-200">
|
||||
<p>
|
||||
{" "}
|
||||
Audio Visual {">"} <span className="font-bold">Semua Audio Visual</span>
|
||||
Foto {">"} <span className="font-bold">Semua Foto</span>
|
||||
</p>
|
||||
<p className="font-bold">|</p>
|
||||
<p>Terdapat 324911 artikel berisi Audio Visual yang dapat diunduh </p>
|
||||
<p>Terdapat 324911 artikel berisi Foto yang dapat diunduh </p>
|
||||
</div>
|
||||
|
||||
{/* Left */}
|
||||
|
||||
<div className="flex flex-col lg:flex-row gap-6 p-4">
|
||||
<div className="lg:w-1/4 w-full bg-white p-4 rounded-lg shadow-md">
|
||||
<h2 className="text-lg font-semibold mb-4">Filter</h2>
|
||||
|
|
@ -186,15 +186,20 @@ const FilterPage = () => {
|
|||
{imageData?.map((image: any) => (
|
||||
<Card key={image?.id} className="hover:scale-110 transition-transform duration-300">
|
||||
<CardContent className="flex flex-col text-xs lg:text-sm w-full p-0">
|
||||
<img src={image?.thumbnailLink} className="h-60 object-cover items-center justify-center cursor-pointer rounded-lg" />
|
||||
<div className="flex flex-row items-center gap-2 text-[10px] mx-2">
|
||||
{formatDateToIndonesian(new Date(image?.createdAt))} {image?.timezone ? image?.timezone : "WIB"}| <Icon icon="formkit:eye" width="15" height="15" />
|
||||
{image?.clickCount}{" "}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20">
|
||||
<path fill="#f00" d="M7.707 10.293a1 1 0 1 0-1.414 1.414l3 3a1 1 0 0 0 1.414 0l3-3a1 1 0 0 0-1.414-1.414L11 11.586V6h5a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h5v5.586zM9 4a1 1 0 0 1 2 0v2H9z" />
|
||||
</svg>{" "}
|
||||
</div>
|
||||
<div className="font-semibold pr-3 pb-3 mx-2 hover:h-auto truncate hover:whitespace-normal hover:overflow-visible w-full">{image?.title}</div>
|
||||
<Link href={`/image/detail/${image?.slug}`} >
|
||||
<img src={image?.thumbnailLink} className="h-60 object-cover items-center justify-center cursor-pointer rounded-lg" />
|
||||
<div className="flex flex-row items-center gap-2 text-[10px] mx-2">
|
||||
{formatDateToIndonesian(new Date(image?.createdAt))} {image?.timezone ? image?.timezone : "WIB"}| <Icon icon="formkit:eye" width="15" height="15" />
|
||||
{image?.clickCount}{" "}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20">
|
||||
<path
|
||||
fill="#f00"
|
||||
d="M7.707 10.293a1 1 0 1 0-1.414 1.414l3 3a1 1 0 0 0 1.414 0l3-3a1 1 0 0 0-1.414-1.414L11 11.586V6h5a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h5v5.586zM9 4a1 1 0 0 1 2 0v2H9z"
|
||||
/>
|
||||
</svg>{" "}
|
||||
</div>
|
||||
<div className="font-semibold pr-3 pb-3 mx-2 hover:h-auto truncate hover:whitespace-normal hover:overflow-visible w-full">{image?.title}</div>
|
||||
</Link>
|
||||
</CardContent>
|
||||
</Card>
|
||||
))}
|
||||
|
|
|
|||
|
|
@ -1,129 +1,73 @@
|
|||
"use client";
|
||||
import { Card, CardContent } from "@/components/ui/card";
|
||||
import { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious } from "@/components/ui/carousel";
|
||||
import { Textarea } from "@/components/ui/textarea";
|
||||
import Link from "next/link";
|
||||
import { usePathname, useRouter } from "next/navigation";
|
||||
import React, { useState } from "react";
|
||||
import { textEllipsis } from "@/utils/globals";
|
||||
|
||||
const dummyImage = [
|
||||
{
|
||||
id: 1,
|
||||
title: "Giat Polri",
|
||||
thumbnail: "/assets/banner-sample.png",
|
||||
htmlDescription:
|
||||
"Lorem ipsum dolor sit amet consectetur, adipisicing elit. Quia ratione qui quidem, saepe blanditiis vero reiciendis commodi adipisci libero voluptatum, nisi eum hic quis dolorem, et aperiam consectetur perspiciatis error optio rem dolores tempore ducimus quos officia! Dicta odio dolorem quam necessitatibus libero mollitia reiciendis? Veniam, fugit incidunt? Quidem, consectetur.",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
title: "Giat Polri",
|
||||
thumbnail: "https://mediahub.polri.go.id/api/media/categories/view-thumbnail?id=125¤tMilis=1732769540018",
|
||||
htmlDescription:
|
||||
"Lorem ipsum dolor sit amet consectetur, adipisicing elit. Quia ratione qui quidem, saepe blanditiis vero reiciendis commodi adipisci libero voluptatum, nisi eum hic quis dolorem, et aperiam consectetur perspiciatis error optio rem dolores tempore ducimus quos officia! Dicta odio dolorem quam necessitatibus libero mollitia reiciendis? Veniam, fugit incidunt? Quidem, consectetur.",
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
title: "Giat Polri",
|
||||
thumbnail: "https://mediahub.polri.go.id/api/media/categories/view-thumbnail?id=128¤tMilis=1732769540018",
|
||||
htmlDescription:
|
||||
"Lorem ipsum dolor sit amet consectetur, adipisicing elit. Quia ratione qui quidem, saepe blanditiis vero reiciendis commodi adipisci libero voluptatum, nisi eum hic quis dolorem, et aperiam consectetur perspiciatis error optio rem dolores tempore ducimus quos officia! Dicta odio dolorem quam necessitatibus libero mollitia reiciendis? Veniam, fugit incidunt? Quidem, consectetur.",
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
thumbnail: "https://mediahub.polri.go.id/api/media/categories/view-thumbnail?id=127¤tMilis=1732769540018",
|
||||
htmlDescription:
|
||||
"Lorem ipsum dolor sit amet consectetur, adipisicing elit. Quia ratione qui quidem, saepe blanditiis vero reiciendis commodi adipisci libero voluptatum, nisi eum hic quis dolorem, et aperiam consectetur perspiciatis error optio rem dolores tempore ducimus quos officia! Dicta odio dolorem quam necessitatibus libero mollitia reiciendis? Veniam, fugit incidunt? Quidem, consectetur.",
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
title: "Giat Polri",
|
||||
thumbnail: "https://mediahub.polri.go.id/api/media/categories/view-thumbnail?id=93¤tMilis=1732769540018",
|
||||
htmlDescription:
|
||||
"Lorem ipsum dolor sit amet consectetur, adipisicing elit. Quia ratione qui quidem, saepe blanditiis vero reiciendis commodi adipisci libero voluptatum, nisi eum hic quis dolorem, et aperiam consectetur perspiciatis error optio rem dolores tempore ducimus quos officia! Dicta odio dolorem quam necessitatibus libero mollitia reiciendis? Veniam, fugit incidunt? Quidem, consectetur.",
|
||||
},
|
||||
];
|
||||
|
||||
const dummyData = {
|
||||
id: 12312,
|
||||
title: "TITLE",
|
||||
createdBy: "Mabes",
|
||||
createdAt: "21-21-2021",
|
||||
time: "18:23",
|
||||
desc: "halooo",
|
||||
htmlDescription:
|
||||
'<p>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.</p><p>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.</p><p>"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.</p><p>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.</p><p>“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.</p>',
|
||||
};
|
||||
import { useParams, usePathname, useRouter } from "next/navigation";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import NewContent from "@/components/landing-page/new-content";
|
||||
import { Link } from "@/i18n/routing";
|
||||
import { getDetailIndeks } from "@/service/landing/landing";
|
||||
import { formatDateToIndonesian } from "@/utils/globals";
|
||||
|
||||
const IndeksDetail = () => {
|
||||
const [selectedSize, setSelectedSize] = useState<string>("L");
|
||||
const [selectedTab, setSelectedTab] = useState("video");
|
||||
const router = useRouter();
|
||||
const pathname = usePathname();
|
||||
const [indeksData, setIndeksData] = useState<any>();
|
||||
const params = useParams();
|
||||
const slug = params?.slug;
|
||||
|
||||
useEffect(() => {
|
||||
initFetch();
|
||||
}, []);
|
||||
const initFetch = async () => {
|
||||
const response = await getDetailIndeks();
|
||||
console.log(response);
|
||||
setIndeksData(response?.data?.data?.content);
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="p-4 lg:p-12">
|
||||
{/* Judul */}
|
||||
<div>
|
||||
<h3>INDEKS / DETAIL</h3>
|
||||
<h1 className="flex flex-row font-bold text-2xl mx-5 my-8">{dummyData.title}</h1>
|
||||
</div>
|
||||
{/* Gambar Utama */}
|
||||
<div className="flex items-center justify-center">
|
||||
<img src="https://mediahub.polri.go.id/api/media/categories/view-thumbnail?id=93¤tMilis=1732769540018" alt="Main" className="h-[500px] w-[700px] rounded-lg" />
|
||||
</div>
|
||||
{/* Footer Informasi */}
|
||||
<div className="p-4 text-sm text-gray-500 flex justify-between items-center border-t mt-4">
|
||||
<p className="items-end">
|
||||
oleh <span className="font-semibold text-black">{dummyData.createdBy}</span> | Diupdate pada {dummyData.createdAt} {dummyData.time} WIB | 👁️ 65
|
||||
</p>
|
||||
</div>
|
||||
<>
|
||||
{indeksData?.map((indeks: any) => (
|
||||
<div className="p-4 lg:px-60 lg:p-12" key={indeks?.id}>
|
||||
{/* Judul */}
|
||||
<div className="flex justify-center mb-5">
|
||||
<h1 className="flex flex-row font-bold text-center text-2xl">{indeks?.title}</h1>
|
||||
</div>
|
||||
{/* Gambar Utama */}
|
||||
<div className="flex items-center justify-center">
|
||||
<img src={indeks?.thumbnailLink} alt="Main" className="h-[500px] w-full rounded-lg" />
|
||||
</div>
|
||||
{/* Footer Informasi */}
|
||||
<div className="p-4 text-sm text-gray-500 flex justify-between items-center border-t mt-4">
|
||||
<p className="items-end">
|
||||
{formatDateToIndonesian(new Date(indeks?.createdAt))} {indeks?.timezone ? indeks?.timezone : "WIB"}|{" "}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1.2em" height="1.2em" viewBox="0 0 24 24">
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M11.5 18c4 0 7.46-2.22 9.24-5.5C18.96 9.22 15.5 7 11.5 7s-7.46 2.22-9.24 5.5C4.04 15.78 7.5 18 11.5 18m0-12c4.56 0 8.5 2.65 10.36 6.5C20 16.35 16.06 19 11.5 19S3 16.35 1.14 12.5C3 8.65 6.94 6 11.5 6m0 2C14 8 16 10 16 12.5S14 17 11.5 17S7 15 7 12.5S9 8 11.5 8m0 1A3.5 3.5 0 0 0 8 12.5a3.5 3.5 0 0 0 3.5 3.5a3.5 3.5 0 0 0 3.5-3.5A3.5 3.5 0 0 0 11.5 9"
|
||||
/>
|
||||
</svg>{" "}
|
||||
{indeks?.clickCount}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{/* Keterangan */}
|
||||
<div className="md:w-2/3">
|
||||
<div dangerouslySetInnerHTML={{ __html: dummyData.htmlDescription }} />
|
||||
</div>
|
||||
{/* Keterangan */}
|
||||
<div className="w-auto">
|
||||
<p dangerouslySetInnerHTML={{ __html: indeks?.description }} />
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
|
||||
{/* Comment */}
|
||||
<div className="flex flex-col my-16 gap-5 p-10 bg-gray-300">
|
||||
<p className="flex items-start text-lg">Berikan Komentar</p>
|
||||
<Textarea placeholder="Type your comments here." className="flex items-start justify-center" />
|
||||
<button className="flex items-start bg-[#bb3523] rounded-lg w-fit px-4 py-1">Kirim</button>
|
||||
</div>
|
||||
|
||||
{/* Konten Serupa */}
|
||||
<div className="w-full">
|
||||
<div className="space-x-5 flex flex-col p-4">
|
||||
<div className="flex px-10 flex-col lg:flex-row gap-5 mb-4">
|
||||
<h2 className="flex items-center text-sm lg:text-xl font-bold px-4 py-1 rounded-lg text-black">Post Terkait</h2>
|
||||
</div>
|
||||
<div className="px-10">
|
||||
<Carousel>
|
||||
<CarouselContent>
|
||||
{dummyImage.map((image) => (
|
||||
<CarouselItem key={image.id} className="md:basis-1/2 lg:basis-1/3">
|
||||
<Card>
|
||||
<CardContent className="flex flex-col gap-3 items-center justify-center">
|
||||
<img src={image.thumbnail} className="h-60 object-cover w-full rounded-lg" />
|
||||
<p className="bg-[#bb3523] text-white p-2 rounded-lg">{image.title}</p>
|
||||
<p>{textEllipsis(image.htmlDescription, 100)}</p>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</CarouselItem>
|
||||
))}
|
||||
</CarouselContent>
|
||||
<CarouselPrevious />
|
||||
<CarouselNext />
|
||||
</Carousel>
|
||||
</div>
|
||||
{/* Comment */}
|
||||
<div className="flex flex-col my-16 gap-5 p-10 bg-gray-300">
|
||||
<p className="flex items-start text-lg">Berikan Komentar</p>
|
||||
<Textarea placeholder="Type your comments here." className="flex items-start justify-center" />
|
||||
<button className="flex items-start bg-[#bb3523] rounded-lg w-fit px-4 py-1">Kirim</button>
|
||||
</div>
|
||||
<div className="flex items-center flex-row justify-center">
|
||||
<Link href="#" className="border text-[#bb3523] text-sm lg:text-md px-4 py-1 border-[#bb3523]">
|
||||
LIHAT SEMUA
|
||||
</Link>
|
||||
|
||||
{/* Konten Serupa */}
|
||||
<div className="space-x-5 flex flex-col p-4">
|
||||
<NewContent type={"similar"} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,22 +1,18 @@
|
|||
"use client";
|
||||
|
||||
import { Link } from "@/i18n/routing";
|
||||
import { getIndeksData } from "@/service/landing/landing";
|
||||
import { formatDateToIndonesian } from "@/utils/globals";
|
||||
import { Lectern } from "lucide-react";
|
||||
import Link from "next/link";
|
||||
import { usePathname } from "next/navigation";
|
||||
import React, { useEffect, useState } from "react";
|
||||
|
||||
const Indeks: React.FC = () => {
|
||||
const pathname = usePathname();
|
||||
const [indeksData, setIndeksData] = useState<any>();
|
||||
const [currentImageIndex, setCurrentImageIndex] = useState(0);
|
||||
let count: number = 0;
|
||||
useEffect(() => {
|
||||
if (indeksData) {
|
||||
const intervalId = setInterval(() => {
|
||||
// const asal = currentImageIndex + 1;
|
||||
// setCurrentImageIndex(asal);
|
||||
count = (count + 1) % indeksData.length;
|
||||
}, 5000);
|
||||
|
||||
|
|
@ -73,7 +69,7 @@ const Indeks: React.FC = () => {
|
|||
<img src={indeksRight?.thumbnailLink} alt="image" className="w-full h-[310px] lg:h-[215px] rounded-lg" />
|
||||
<div className="absolute bottom-0 left-0 right-0 bg-transparent backdrop-blur-sm text-white p-4 rounded-b-lg">
|
||||
<span className="text-white bg-[#bb3523] rounded-md w-full h-full font-semibold uppercase text-sm px-4 py-1">{indeksRight?.categoryName}</span>
|
||||
<Link href="#">
|
||||
<Link href={`/detail/${indeksRight?.slug}`}>
|
||||
<h2 className="text-xl font-bold mt-2">{indeksRight?.title}</h2>
|
||||
</Link>
|
||||
<p className="text-xs flex flex-row items-center gap-1 mt-1 ml-2">
|
||||
|
|
@ -103,7 +99,7 @@ const Indeks: React.FC = () => {
|
|||
<img src={indeksBottom?.thumbnailLink} alt="" className="h-40 object-cover rounded-lg w-full lg:w-[500px] lg:h-[300px]" />
|
||||
<div className="flex flex-col justify-between w-full">
|
||||
<p className="text-sm">{indeksBottom?.date}</p>
|
||||
<Link href={`${pathname}/detail/${indeksBottom?.id}`} className="text-2xl font-semibold text-gray-800">
|
||||
<Link href={`/indeks/detail/${indeksBottom?.slug}`} className="text-2xl font-semibold text-gray-800">
|
||||
{indeksBottom?.title}
|
||||
</Link>
|
||||
<p className="text-sm text-gray-600 mt-2">{indeksBottom?.description}</p>
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import { listSchedule, listScheduleNextPublic, listSchedulePrevPublic, listSched
|
|||
import { useRouter } from "@/i18n/routing";
|
||||
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "@/components/ui/collapsible";
|
||||
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from "@/components/ui/alert-dialog";
|
||||
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "@/components/ui/accordion";
|
||||
|
||||
const timeList = [
|
||||
{
|
||||
|
|
@ -473,6 +474,8 @@ const Schedule = () => {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Component Kanan */}
|
||||
<div className="w-1/4 flex flex-col gap-6">
|
||||
<div className="relative text-gray-600 dark:text-white">
|
||||
<input type="text" placeholder="Masukkan Judul Jadwal" className="pl-8 pr-4 py-1 w-full border rounded-full text-sm focus:outline-none" />
|
||||
|
|
@ -487,7 +490,7 @@ const Schedule = () => {
|
|||
</div>
|
||||
|
||||
{/* jadwal hari ini */}
|
||||
<Collapsible className="border border-slate-400 p-2 rounded-lg" open={isOpen} onOpenChange={setIsOpen}>
|
||||
{/* <Collapsible className="border border-slate-400 p-2 rounded-lg" open={isOpen} onOpenChange={setIsOpen}>
|
||||
<CollapsibleTrigger>
|
||||
<h5 className="py-2 flex justify-between items-center">
|
||||
Jadwal Hari Ini
|
||||
|
|
@ -517,10 +520,86 @@ const Schedule = () => {
|
|||
</div>
|
||||
</CollapsibleContent>
|
||||
))}
|
||||
</Collapsible>
|
||||
</Collapsible> */}
|
||||
<Accordion type="single" collapsible className="w-full">
|
||||
<AccordionItem value="item-1">
|
||||
<AccordionTrigger>Jadwal Sebelumnya</AccordionTrigger>
|
||||
{prevdayList?.map((list: any) => (
|
||||
<AccordionContent>
|
||||
<div className="border-l-4 border-red-700 pl-1 h-fit font-bold text-lg">{new Date(list.startDate).getDate()}</div>
|
||||
<div className="flex flex-col">
|
||||
<h3 className="font-bold">{list?.title}</h3>
|
||||
<p className="flex flex-row items-center gap-2">
|
||||
<Icon icon="iconamoon:clock-thin" />
|
||||
{list?.startTime} - {list?.endTime} WIB
|
||||
</p>
|
||||
<p className="flex flex-row items-start gap-2 ">
|
||||
<Icon icon="bxs:map" width={40} />
|
||||
{list?.address}
|
||||
</p>
|
||||
<p>Pembicara :</p>
|
||||
<p className="flex flex-row items-center gap-2">
|
||||
<Icon icon="ic:round-person" />
|
||||
{list?.speakerTitle} {list?.speakerName}
|
||||
</p>
|
||||
</div>
|
||||
</AccordionContent>
|
||||
))}
|
||||
</AccordionItem>
|
||||
|
||||
<AccordionItem value="item-2">
|
||||
<AccordionTrigger>Jadwal Hari ini</AccordionTrigger>
|
||||
{todayList?.map((list: any) => (
|
||||
<AccordionContent>
|
||||
<div className="border-l-4 border-red-700 pl-1 h-fit font-bold text-lg">{new Date(list.startDate).getDate()}</div>
|
||||
<div className="flex flex-col">
|
||||
<h3 className="font-bold">{list?.title}</h3>
|
||||
<p className="flex flex-row items-center gap-2">
|
||||
<Icon icon="iconamoon:clock-thin" />
|
||||
{list?.startTime} - {list?.endTime} WIB
|
||||
</p>
|
||||
<p className="flex flex-row items-start gap-2 ">
|
||||
<Icon icon="bxs:map" width={40} />
|
||||
{list?.address}
|
||||
</p>
|
||||
<p>Pembicara :</p>
|
||||
<p className="flex flex-row items-center gap-2">
|
||||
<Icon icon="ic:round-person" />
|
||||
{list?.speakerTitle} {list?.speakerName}
|
||||
</p>
|
||||
</div>
|
||||
</AccordionContent>
|
||||
))}
|
||||
</AccordionItem>
|
||||
|
||||
<AccordionItem value="item-3">
|
||||
<AccordionTrigger>Jadwal Selanjutnya</AccordionTrigger>
|
||||
{nextdayList?.map((list: any) => (
|
||||
<AccordionContent>
|
||||
<div className="border-l-4 border-red-700 pl-1 h-fit font-bold text-lg">{new Date(list.startDate).getDate()}</div>
|
||||
<div className="flex flex-col">
|
||||
<h3 className="font-bold">{list?.title}</h3>
|
||||
<p className="flex flex-row items-center gap-2">
|
||||
<Icon icon="iconamoon:clock-thin" />
|
||||
{list?.startTime} - {list?.endTime} WIB
|
||||
</p>
|
||||
<p className="flex flex-row items-start gap-2 ">
|
||||
<Icon icon="bxs:map" width={40} />
|
||||
{list?.address}
|
||||
</p>
|
||||
<p>Pembicara :</p>
|
||||
<p className="flex flex-row items-center gap-2">
|
||||
<Icon icon="ic:round-person" />
|
||||
{list?.speakerTitle} {list?.speakerName}
|
||||
</p>
|
||||
</div>
|
||||
</AccordionContent>
|
||||
))}
|
||||
</AccordionItem>
|
||||
</Accordion>
|
||||
|
||||
{/* jadwal sebelumnya */}
|
||||
<Collapsible className="border border-slate-400 p-2 rounded-lg" open={isOpen} onOpenChange={setIsOpen}>
|
||||
{/* <Collapsible className="border border-slate-400 p-2 rounded-lg" open={isOpen} onOpenChange={setIsOpen}>
|
||||
<CollapsibleTrigger>
|
||||
<h5 className="py-2 flex justify-between items-center">
|
||||
Jadwal Sebelumnya
|
||||
|
|
@ -550,10 +629,10 @@ const Schedule = () => {
|
|||
</div>
|
||||
</CollapsibleContent>
|
||||
))}
|
||||
</Collapsible>
|
||||
</Collapsible> */}
|
||||
|
||||
{/* jadwal selanjutnya */}
|
||||
<Collapsible className="border border-slate-400 p-2 rounded-lg" open={isOpen} onOpenChange={setIsOpen}>
|
||||
{/* <Collapsible className="border border-slate-400 p-2 rounded-lg" open={isOpen} onOpenChange={setIsOpen}>
|
||||
<CollapsibleTrigger>
|
||||
<h5 className="py-2 flex justify-end items-center">
|
||||
Jadwal Selanjutnya
|
||||
|
|
@ -583,7 +662,7 @@ const Schedule = () => {
|
|||
</div>
|
||||
</CollapsibleContent>
|
||||
))}
|
||||
</Collapsible>
|
||||
</Collapsible> */}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,37 +1,15 @@
|
|||
"use client";
|
||||
import { Card, CardContent } from "@/components/ui/card";
|
||||
import { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious } from "@/components/ui/carousel";
|
||||
import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs";
|
||||
import { Textarea } from "@/components/ui/textarea";
|
||||
import Link from "next/link";
|
||||
|
||||
|
||||
import { useParams, usePathname, useRouter } from "next/navigation";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { Icon } from "@iconify/react/dist/iconify.js";
|
||||
import { textEllipsis } from "@/utils/globals";
|
||||
import { getDetail } from "@/service/landing/landing";
|
||||
import VideoPlayer from "@/utils/video-player";
|
||||
import NewContent from "@/components/landing-page/new-content";
|
||||
import { Link } from "@/i18n/routing";
|
||||
import { Textarea } from "@/components/ui/textarea";
|
||||
|
||||
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<string>("L");
|
||||
|
|
@ -61,103 +39,105 @@ const DetailVideo = () => {
|
|||
];
|
||||
|
||||
return (
|
||||
<div className="min-h-screen px-4 md:px-24 py-4">
|
||||
{/* Container Utama */}
|
||||
<div className="rounded-md overflow-hidden md:flex">
|
||||
{/* Bagian Kiri */}
|
||||
<div className="md:w-3/4">
|
||||
{/* Gambar Utama */}
|
||||
<div className="relative">
|
||||
<VideoPlayer url={detailDataVideo?.files[0]?.url} />
|
||||
<div className="absolute top-4 left-4"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Bagian Kanan */}
|
||||
<div className="md:w-1/4 p-4 bg-gray-300 rounded-lg mx-4">
|
||||
<div className="flex flex-col mb-3 items-center justify-center cursor-pointer">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="2.5em" height="2.5em" viewBox="0 0 24 24">
|
||||
<path fill="black" d="m17 18l-5-2.18L7 18V5h10m0-2H7a2 2 0 0 0-2 2v16l7-3l7 3V5a2 2 0 0 0-2-2" />
|
||||
</svg>
|
||||
<p className="text-base lg:text-lg">Simpan</p>
|
||||
</div>
|
||||
{/* garis */}
|
||||
<div className="border-t border-black my-4"></div>
|
||||
|
||||
<Link href="" className="bg-red-600 text-white text-xs font-bold px-3 py-3 my-3 flex justify-center items-center rounded">
|
||||
{detailDataVideo?.category?.name}
|
||||
</Link>
|
||||
|
||||
<div className="flex justify-center flex-wrap gap-2 mb-4">
|
||||
<p className="bg-gray-200 text-gray-700 text-xs px-3 py-1 rounded-full cursor-pointer hover:bg-gray-500">poldajabar</p>
|
||||
<p className="bg-gray-200 text-gray-700 text-xs px-3 py-1 rounded-full cursor-pointer hover:bg-gray-500">pilkadamai2024</p>
|
||||
<>
|
||||
<div className="min-h-screen px-4 md:px-24 py-4">
|
||||
{/* Container Utama */}
|
||||
<div className="rounded-md overflow-hidden md:flex">
|
||||
{/* Bagian Kiri */}
|
||||
<div className="md:w-3/4">
|
||||
<div className="relative">
|
||||
<VideoPlayer url={detailDataVideo?.files[0]?.url} />
|
||||
<div className="absolute top-4 left-4"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="border-t border-black my-4"></div>
|
||||
{/* Bagian Kanan */}
|
||||
<div className="md:w-1/4 p-4 bg-gray-300 rounded-lg mx-4">
|
||||
<div className="flex flex-col mb-3 items-center justify-center cursor-pointer">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="2.5em" height="2.5em" viewBox="0 0 24 24">
|
||||
<path fill="black" d="m17 18l-5-2.18L7 18V5h10m0-2H7a2 2 0 0 0-2 2v16l7-3l7 3V5a2 2 0 0 0-2-2" />
|
||||
</svg>
|
||||
<p className="text-base lg:text-lg">Simpan</p>
|
||||
</div>
|
||||
{/* garis */}
|
||||
<div className="border-t border-black my-4"></div>
|
||||
|
||||
{/* Opsi Ukuran Foto */}
|
||||
<h4 className="flex text-lg justify-center items-center font-semibold my-3">Opsi Ukuran Foto</h4>
|
||||
<Link href="" className="bg-red-600 text-white text-xs font-bold px-3 py-3 my-3 flex justify-center items-center rounded">
|
||||
{detailDataVideo?.category?.name}
|
||||
</Link>
|
||||
|
||||
<div className="border-t border-black my-4"></div>
|
||||
<div className="flex justify-center flex-wrap gap-2 mb-4">
|
||||
<p className="bg-gray-200 text-gray-700 text-xs px-3 py-1 rounded-full cursor-pointer hover:bg-gray-500">poldajabar</p>
|
||||
<p className="bg-gray-200 text-gray-700 text-xs px-3 py-1 rounded-full cursor-pointer hover:bg-gray-500">pilkadamai2024</p>
|
||||
</div>
|
||||
|
||||
<div className="space-y-2">
|
||||
{sizes.map((size) => (
|
||||
<label key={size.label} className="flex items-center space-x-2 cursor-pointer">
|
||||
<input type="radio" name="size" value={size.label} checked={selectedSize === size.label} onChange={() => setSelectedSize(size.label)} className="text-red-600 focus:ring-red-600" />
|
||||
<div className="text-sm">
|
||||
{size.label} ---------------------------------------- {size.value}
|
||||
</div>
|
||||
<div className="border-t border-black my-4"></div>
|
||||
|
||||
{/* Opsi Ukuran Foto */}
|
||||
<h4 className="flex text-lg justify-center items-center font-semibold my-3">Opsi Ukuran Foto</h4>
|
||||
|
||||
<div className="border-t border-black my-4"></div>
|
||||
|
||||
<div className="space-y-2">
|
||||
{sizes.map((size) => (
|
||||
<label key={size.label} className="flex items-center space-x-2 cursor-pointer">
|
||||
<input type="radio" name="size" value={size.label} checked={selectedSize === size.label} onChange={() => setSelectedSize(size.label)} className="text-red-600 focus:ring-red-600" />
|
||||
<div className="text-sm">
|
||||
{size.label} ----------------- {size.value}
|
||||
</div>
|
||||
</label>
|
||||
))}
|
||||
</div>
|
||||
|
||||
{/* Download Semua */}
|
||||
<div className="mt-4">
|
||||
<label className="flex items-center space-x-2 text-sm">
|
||||
<input type="checkbox" className="text-red-600 focus:ring-red-600" />
|
||||
<span>Download Semua File?</span>
|
||||
</label>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Download Semua */}
|
||||
<div className="mt-4">
|
||||
<label className="flex items-center space-x-2 text-sm">
|
||||
<input type="checkbox" className="text-red-600 focus:ring-red-600" />
|
||||
<span>Download Semua File?</span>
|
||||
</label>
|
||||
{/* Tombol Download */}
|
||||
<button className="mt-4 bg-red-600 text-white w-full py-2 flex justify-center items-center gap-1 rounded-md text-sm hover:bg-red-700">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24">
|
||||
<path fill="white" d="m12 16l-5-5l1.4-1.45l2.6 2.6V4h2v8.15l2.6-2.6L17 11zm-6 4q-.825 0-1.412-.587T4 18v-3h2v3h12v-3h2v3q0 .825-.587 1.413T18 20z" />
|
||||
</svg>
|
||||
Download
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Tombol Download */}
|
||||
<button className="mt-4 bg-red-600 text-white w-full py-2 flex justify-center items-center gap-1 rounded-md text-sm hover:bg-red-700">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24">
|
||||
<path fill="white" d="m12 16l-5-5l1.4-1.45l2.6 2.6V4h2v8.15l2.6-2.6L17 11zm-6 4q-.825 0-1.412-.587T4 18v-3h2v3h12v-3h2v3q0 .825-.587 1.413T18 20z" />
|
||||
</svg>
|
||||
Download
|
||||
</button>
|
||||
{/* Footer Informasi */}
|
||||
<div className="p-4 text-sm text-gray-500 flex justify-between items-center border-t mt-4">
|
||||
<p className="flex flex-row items-center">
|
||||
oleh <span className="font-semibold text-black">{detailDataVideo?.uploadedBy?.userLevel?.name}</span> | Diupdate pada {detailDataVideo?.updatedAt} WIB |
|
||||
<Icon icon="formkit:eye" width="15" height="15" />
|
||||
|
||||
{detailDataVideo?.clickCount}
|
||||
</p>
|
||||
<p>Kreator: {detailDataVideo?.creatorName}</p>
|
||||
</div>
|
||||
|
||||
{/* Keterangan */}
|
||||
<div className="md:w-3/4">
|
||||
<h1 className="flex flex-row font-bold text-2xl mx-5 my-8">{detailDataVideo?.title}</h1>
|
||||
<div dangerouslySetInnerHTML={{ __html: detailDataVideo?.htmlDescription }} />
|
||||
</div>
|
||||
</div>
|
||||
<div className="w-full mb-8">
|
||||
{/* Comment */}
|
||||
<div className="flex flex-col my-16 gap-5 p-10 bg-gray-300">
|
||||
<p className="flex items-start text-lg">Berikan Komentar</p>
|
||||
<Textarea placeholder="Type your comments here." className="flex items-start justify-center" />
|
||||
<button className="flex items-start bg-[#bb3523] rounded-lg w-fit px-4 py-1">Kirim</button>
|
||||
</div>
|
||||
|
||||
{/* Footer Informasi */}
|
||||
<div className="p-4 text-sm text-gray-500 flex justify-between items-center border-t mt-4">
|
||||
<p className="flex flex-row items-center">
|
||||
oleh <span className="font-semibold text-black">{detailDataVideo?.uploadedBy?.userLevel?.name}</span> | Diupdate pada {detailDataVideo?.updatedAt} WIB |
|
||||
<Icon icon="formkit:eye" width="15" height="15" />
|
||||
|
||||
{detailDataVideo?.clickCount}
|
||||
</p>
|
||||
<p>Kreator: {detailDataVideo?.creatorName}</p>
|
||||
{/* Konten Serupa */}
|
||||
<div className="px-4">
|
||||
<NewContent type={"similar"} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Keterangan */}
|
||||
<div className="md:w-3/4">
|
||||
<h1 className="flex flex-row font-bold text-2xl mx-5 my-8">{detailDataVideo?.title}</h1>
|
||||
<div dangerouslySetInnerHTML={{ __html: detailDataVideo?.htmlDescription }} />
|
||||
</div>
|
||||
|
||||
{/* Comment */}
|
||||
<div className="flex flex-col my-16 gap-5 p-10 bg-gray-300">
|
||||
<p className="flex items-start text-lg">Berikan Komentar</p>
|
||||
<Textarea placeholder="Type your comments here." className="flex items-start justify-center" />
|
||||
<button className="flex items-start bg-[#bb3523] rounded-lg w-fit px-4 py-1">Kirim</button>
|
||||
</div>
|
||||
|
||||
{/* Konten Serupa */}
|
||||
<div className="px-4">
|
||||
<NewContent type={"similar"} />
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ const ContentCategory = () => {
|
|||
index < 8 ? (
|
||||
<Link key={category?.id} href={`all/filter?category=${category?.id}`} className="relative group rounded-md overflow-hidden shadow-md hover:shadow-lg">
|
||||
<img src={category?.thumbnailLink} className="w-full h-48 sm:h-40 object-cover group-hover:scale-110 transition-transform duration-300" />
|
||||
<div className="absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black to-transparent text-white p-2">
|
||||
<div className="absolute bottom-0 rounded-lg left-0 right-0 bg-gray-400 border-l-4 mb-4 border-[#bb3523] text-white p-2">
|
||||
<h3 className="text-sm font-semibold truncate">{category?.name}</h3>
|
||||
</div>
|
||||
</Link>
|
||||
|
|
@ -42,7 +42,7 @@ const ContentCategory = () => {
|
|||
) : (
|
||||
<Link key={category?.id} href={`all/filter?category=${category?.id}`} className="relative group rounded-md overflow-hidden shadow-md hover:shadow-lg">
|
||||
<img src={category?.thumbnailLink} className="w-full h-48 sm:h-40 object-cover group-hover:scale-110 transition-transform duration-300" />
|
||||
<div className="absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black to-transparent text-white p-2">
|
||||
<div className="absolute bottom-0 left-0 right-0 bg-gray-400 border-l-4 mb-4 border-[#bb3523] rounded-lg text-white p-2">
|
||||
<h3 className="text-sm font-semibold truncate">{category?.name}</h3>
|
||||
</div>
|
||||
</Link>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import React, { useState } from "react";
|
||||
import { Button } from "../ui/button";
|
||||
import { Reveal } from "./Reveal";
|
||||
import { Icon } from "@iconify/react/dist/iconify.js";
|
||||
|
||||
const Coverage: React.FC = () => {
|
||||
const [searchTerm, setSearchTerm] = useState("");
|
||||
|
|
@ -59,11 +60,11 @@ const Coverage: React.FC = () => {
|
|||
<input
|
||||
type="text"
|
||||
placeholder="Pencarian"
|
||||
className="w-full max-w-sm px-4 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-[#bb3523] focus:outline-none"
|
||||
className="w-4/5 px-4 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-[#bb3523] focus:outline-none"
|
||||
value={searchTerm}
|
||||
onChange={(e) => setSearchTerm(e.target.value)}
|
||||
/>
|
||||
<button className="px-2 lg:px-4 lg:py-2 bg-[#bb3523] text-white rounded-md hover:bg-red-700">Cari Liputan ></button>
|
||||
<button className="px-2 w-1/5 lg:px-4 lg:py-2 bg-[#bb3523] text-white flex justify-center items-center gap-2 rounded-md hover:bg-red-700">Cari Liputan <Icon icon="uil:arrow-right" /></button>
|
||||
</div>
|
||||
|
||||
{/* Grid Wilayah */}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import React, { useState } from "react";
|
||||
import { Button } from "../ui/button";
|
||||
import { Reveal } from "./Reveal";
|
||||
import { Icon } from "@iconify/react/dist/iconify.js";
|
||||
|
||||
const Division = () => {
|
||||
const [searchTerm, setSearchTerm] = useState("");
|
||||
|
|
@ -58,14 +59,10 @@ const Division = () => {
|
|||
|
||||
{/* Pencarian */}
|
||||
<div className="flex items-center justify-center gap-4 mb-6">
|
||||
<input
|
||||
type="text"
|
||||
placeholder="Pencarian"
|
||||
className="w-full max-w-sm px-4 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-[#bb3523] focus:outline-none"
|
||||
value={searchTerm}
|
||||
onChange={(e) => setSearchTerm(e.target.value)}
|
||||
/>
|
||||
<button className="px-2 lg:px-4 lg:py-2 bg-[#bb3523] text-white rounded-md hover:bg-red-700">Cari Liputan ></button>
|
||||
<input type="text" placeholder="Pencarian" className="w-4/5 px-4 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-[#bb3523] focus:outline-none" value={searchTerm} onChange={(e) => setSearchTerm(e.target.value)} />
|
||||
<button className="px-2 w-1/5 lg:px-4 lg:py-2 bg-[#bb3523] flex justify-center items-center gap-2 text-white rounded-md hover:bg-red-700">
|
||||
Cari Liputan <Icon icon="uil:arrow-right" />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{/* Grid Wilayah */}
|
||||
|
|
@ -97,7 +94,7 @@ const Division = () => {
|
|||
Lihat Lebih {seeAllValue ? "Sedikit" : "Banyak"}
|
||||
</Button>
|
||||
</div>
|
||||
</Reveal>
|
||||
</Reveal>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ import { formatDateToIndonesian, textEllipsis } from "@/utils/globals";
|
|||
import { generateLocalizedPath } from "@/utils/globals";
|
||||
import { getListContent } from "@/service/landing/landing";
|
||||
import { Link } from "@/i18n/routing";
|
||||
import { motion } from "framer-motion";
|
||||
import { Reveal } from "./Reveal";
|
||||
|
||||
const NewContent = (props: { type: string }) => {
|
||||
|
|
@ -81,9 +80,9 @@ const NewContent = (props: { type: string }) => {
|
|||
<CarouselContent>
|
||||
{newContent?.map((video: any) => (
|
||||
<CarouselItem key={video?.id} className="md:basis-1/2 lg:basis-1/3">
|
||||
<Link href={generateLocalizedPath(`/video/detail/${video?.slug}`, String(locale))} className="relative group rounded-md overflow-hidden shadow-md hover:shadow-lg">
|
||||
<img src={video?.thumbnailLink} className="w-full h-32 lg:h-60 object-cover group-hover:scale-100 transition-transform duration-300" />
|
||||
<div className="absolute bottom-0 left-0 right-0 bg-transparent backdrop-blur-sm text-white p-2">
|
||||
<Link href={`/video/detail/${video?.slug}`} className="relative group overflow-hidden shadow-md hover:shadow-lg">
|
||||
<img src={video?.thumbnailLink} className="w-full rounded-lg h-32 lg:h-60 object-cover group-hover:scale-100 transition-transform duration-300" />
|
||||
<div className="absolute bottom-0 left-0 right-0 bg-gray-600 border-l-4 border-[#bb3523] rounded-lg backdrop-blur-sm text-white p-2">
|
||||
<h1 className="text-sm font-semibold h-5 hover:h-auto truncate hover:whitespace-normal hover:overflow-visible">{video?.title}</h1>
|
||||
<p className="flex flex-row items-center text-[10px] gap-2">
|
||||
{formatDateToIndonesian(new Date(video?.createdAt))} {video?.timezone ? video?.timezone : "WIB"} | <Icon icon="formkit:eye" width="15" height="15" /> {video.clickCount}{" "}
|
||||
|
|
@ -139,9 +138,9 @@ const NewContent = (props: { type: string }) => {
|
|||
<CarouselContent>
|
||||
{newContent?.map((image: any) => (
|
||||
<CarouselItem key={image?.id} className="md:basis-1/2 lg:basis-1/3">
|
||||
<Link href={generateLocalizedPath(`/image/detail/${image?.slug}`, String(locale))} className="relative group rounded-md overflow-hidden shadow-md hover:shadow-lg">
|
||||
<img src={image?.thumbnailLink} className="w-full h-32 lg:h-60 object-cover group-hover:scale-100 transition-transform duration-300" />
|
||||
<div className="absolute bottom-0 left-0 right-0 bg-gradient-to-r from-black to-slate-500 text-white p-2">
|
||||
<Link href={`/image/detail/${image?.slug}`} className="relative group rounded-md overflow-hidden shadow-md hover:shadow-lg">
|
||||
<img src={image?.thumbnailLink} className="w-full h-32 lg:h-60 object-cover rounded-lg group-hover:scale-100 transition-transform duration-300" />
|
||||
<div className="absolute bottom-0 rounded-lg left-0 right-0 border-l-4 border-[#bb3523] bg-gray-600 text-white p-2">
|
||||
<h1 className="text-sm font-semibold h-5 hover:h-auto truncate hover:whitespace-normal hover:overflow-visible">{image?.title}</h1>
|
||||
<p className="flex flex-row items-center text-sm gap-2">
|
||||
{formatDateToIndonesian(new Date(image?.createdAt))} {image?.timezone ? image?.timezone : "WIB"}| <Icon icon="formkit:eye" width="15" height="15" /> {image?.clickCount}{" "}
|
||||
|
|
@ -199,7 +198,7 @@ const NewContent = (props: { type: string }) => {
|
|||
</div>
|
||||
</div>
|
||||
<div className="flex items-center flex-row justify-center">
|
||||
<Link href="/video/filter" className="border text-[#bb3523] text-sm lg:text-md px-4 py-1 border-[#bb3523]">
|
||||
<Link href="/video/filter" className="border text-[#bb3523] rounded-lg text-sm lg:text-md px-4 py-1 border-[#bb3523]">
|
||||
LIHAT SEMUA
|
||||
</Link>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import React from "react";
|
||||
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "../ui/dropdown-menu";
|
||||
import { FiFile, FiImage, FiMusic, FiYoutube } from "react-icons/fi";
|
||||
import { Icon } from "@iconify/react/dist/iconify.js";
|
||||
|
||||
const SearchSection = () => {
|
||||
return (
|
||||
|
|
@ -10,7 +11,7 @@ const SearchSection = () => {
|
|||
<h1 className="text-2xl md:text-3xl font-bold text-gray-800 dark:text-white">
|
||||
<span className="text-[#bb3523] dark:text-white">Eksplorasi</span> dan <span className="text-[#bb3523] dark:text-white">Download</span> Liputan Resmi Kami
|
||||
</h1>
|
||||
<div className="w-full h-1 bg-[#bb3523] mx-auto mt-2"></div>
|
||||
<div className="w-auto h-1 bg-[#bb3523] mx-auto mt-2"></div>
|
||||
<p className="text-sm md:text-base text-gray-500 dark:text-gray-100 mt-4">Liputan resmi yang bersumber dari kegiatan Polri di Mabes dan Polda seluruh Indonesia</p>
|
||||
|
||||
{/* Search Form */}
|
||||
|
|
@ -75,7 +76,7 @@ const SearchSection = () => {
|
|||
</div>
|
||||
|
||||
{/* Button */}
|
||||
<button className="px-6 py-2 bg-[#bb3523] text-white rounded-lg hover:bg-red-700">Cari Liputan ></button>
|
||||
<button className="px-6 py-2 bg-[#bb3523] flex justify-center items-center gap-2 text-white rounded-lg hover:bg-red-700">Cari Liputan <Icon icon="uil:arrow-right" /></button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -24,4 +24,8 @@ export async function getIndeksData() {
|
|||
|
||||
export async function getDetail(slug: string) {
|
||||
return await httpGetInterceptor(`media/public?slug=${slug}&state=mabes`);
|
||||
}
|
||||
}
|
||||
|
||||
export async function getDetailIndeks() {
|
||||
return await httpGetInterceptor(`blog/public/pagination?enablePage=1&page=0&size=6`);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue