diff --git a/app/[locale]/(public)/(polda)/polda/[polda_name]/page.tsx b/app/[locale]/(public)/(polda)/polda/[polda_name]/page.tsx index 4f18ade0..e7c51e8c 100644 --- a/app/[locale]/(public)/(polda)/polda/[polda_name]/page.tsx +++ b/app/[locale]/(public)/(polda)/polda/[polda_name]/page.tsx @@ -20,7 +20,8 @@ const page = () => {
- + {/* */} + diff --git a/app/[locale]/layout.tsx b/app/[locale]/layout.tsx index 6ffd9dc2..72fd5a5c 100644 --- a/app/[locale]/layout.tsx +++ b/app/[locale]/layout.tsx @@ -13,6 +13,7 @@ import { NextIntlClientProvider } from "next-intl"; import { getMessages } from "next-intl/server"; import DirectionProvider from "@/providers/direction-provider"; import AuthProvider from "@/providers/auth.provider"; +import LoadScript from "@/utils/globals"; export const metadata: Metadata = { title: "Media Hub | POLRI", @@ -34,6 +35,7 @@ export default async function RootLayout({ + diff --git a/components/landing-page/content-category.tsx b/components/landing-page/content-category.tsx index ad2d4d29..4e1f2ec2 100644 --- a/components/landing-page/content-category.tsx +++ b/components/landing-page/content-category.tsx @@ -52,8 +52,8 @@ const ContentCategory = (props: { group?: string }) => { return (
-

- {/* {pathname?.split("/")[1] == "in" ? ( +

+ {pathname?.split("/")[1] == "in" ? ( <> {t("category")}  {t("content")} @@ -63,10 +63,9 @@ const ContentCategory = (props: { group?: string }) => { {t("content")}  {t("category")} - )} */} - Kategori Konten + )}

- {/*
*/} +
{categories?.map((category: any, index: number) => diff --git a/components/landing-page/landing-polda-kaltara/contact-us-kaltara.tsx b/components/landing-page/landing-polda-kaltara/contact-us-kaltara.tsx index 62c07d1c..a7ac9bfb 100644 --- a/components/landing-page/landing-polda-kaltara/contact-us-kaltara.tsx +++ b/components/landing-page/landing-polda-kaltara/contact-us-kaltara.tsx @@ -1,17 +1,72 @@ +import { Button } from "@/components/ui/button"; import { Link } from "@/i18n/routing"; import { Icon } from "@iconify/react/dist/iconify.js"; import Image from "next/image"; import React from "react"; +type Channel = { + name: string; + logo: string; + url: string; +}; + +const channels: Channel[] = [ + { + name: "Divisi Humas Polri", + logo: "/assets/portal-humas.png", + url: "https://portal.humas.polri.go.id/", + }, + { + name: "Media Hub", + logo: "/assets/mediahub-logo.gif", + url: "/polda/kaltara", + }, + { + name: "SPIT", + logo: "/assets/logo-spit.png", + url: "https://spit.humas.polri.go.id/", + }, + { + name: "Polri TV", + logo: "/assets/polriTv.png", + url: "https://tvradio.polri.go.id/", + }, + { + name: "TBNews", + logo: "/assets/img/logo-tbn.png", + url: "/tbnews/polda-kaltara", + }, + { + name: "INP", + logo: "/assets/logo-inp.png", + url: "https://inp.polri.go.id/", + }, +]; + const ContactUsKaltara = () => { return ( -
-
+
+
+

Channel Divisi Humas Polri

+ + {/* Mobile version pakai grid, Desktop pakai flex */} +
+ {channels.map((channel, index) => ( + +
+ {channel.name} +
+ + ))} +
+
+ +
{/* Logo */}
- -

Copyright @TribrataNews Kaltara

+ logo + {/*

Copyright @TribrataNews Kaltara

*/}
{/* Contact Us */} @@ -100,6 +155,14 @@ const ContactUsKaltara = () => { Index
+ + {/* login */} + + +
{/* Social Media */} 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 6a38dbb0..3a408553 100644 --- a/components/landing-page/landing-polda-kaltara/header-banner-kaltara.tsx +++ b/components/landing-page/landing-polda-kaltara/header-banner-kaltara.tsx @@ -3,7 +3,7 @@ import { listData } from "@/service/landing/landing"; import { useParams } from "next/navigation"; import React, { useEffect, useState } from "react"; import Skeleton, { SkeletonTheme } from "react-loading-skeleton"; -import { formatDateToIndonesian, getPublicLocaleTimestamp, textEllipsis } from "@/utils/globals"; +import { formatDateToIndonesian, getPublicLocaleTimestamp } from "@/utils/globals"; import { Icon } from "@iconify/react/dist/iconify.js"; import { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious } from "@/components/ui/carousel"; import Image from "next/image"; @@ -75,7 +75,7 @@ const HeaderBannerKaltara = () => { <> {/* Header Left */} -
+
{isBannerLoading ? (
@@ -152,7 +152,7 @@ const HeaderBannerKaltara = () => {
) : ( -
    +
      {content?.map((item: any) => (
    • @@ -161,7 +161,7 @@ const HeaderBannerKaltara = () => {
      {item?.categoryName}
      router.push(prefixPath + `/image/detail/${item?.slug}`)} className="cursor-pointer"> -

      {textEllipsis(item?.title, 30)}

      +

      {item?.title}

      {formatDateToIndonesian(new Date(item?.createdAt))} {item?.timezone ? item?.timezone : "WIB"} |{" "} 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 871451d8..b220be2d 100644 --- a/components/landing-page/landing-polda-kaltara/latest-content-kaltara.tsx +++ b/components/landing-page/landing-polda-kaltara/latest-content-kaltara.tsx @@ -6,7 +6,7 @@ import { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious import Image from "next/image"; import { Skeleton } from "@/components/ui/skeleton"; import { formatDateToIndonesian, secondToTimes } from "@/utils/globals"; -import { useParams } from "next/navigation"; +import { useParams, usePathname } from "next/navigation"; import { listData } from "@/service/landing/landing"; import { useRouter } from "@/i18n/routing"; import { Icon } from "@iconify/react/dist/iconify.js"; @@ -23,6 +23,7 @@ const LatestContentKaltara = (props: { group: string; type: string }) => { const [isBannerLoading, setIsBannerLoading] = useState(true); const [centerPadding, setCenterPadding] = useState(); const router = useRouter(); + const pathname = usePathname(); const t = useTranslations("LandingPage"); let prefixPath = poldaName ? `/polda/${poldaName}` : satkerName ? `/satker/${satkerName}` : "/"; @@ -73,9 +74,22 @@ const LatestContentKaltara = (props: { group: string; type: string }) => { return ( <> -

      -
      Berita {props.type == "popular" ? "Terpopuler" : props.type == "latest" ? t("new") : "Serupa"}
      -
      +
      + {/*
      Berita {props.type == "popular" ? "Terpopuler" : props.type == "latest" ? t("new") : "Serupa"}
      */} +
      +

      + {pathname?.split("/")[1] == "in" ? ( + <> + {t("content")}  + {props.type == "popular" ? "Terpopuler" : props.type == "latest" ? t("new") : "Serupa"} + + ) : ( + <> + {props.type == "popular" ? "Popular" : props.type == "latest" ? t("new") : "Serupa"}  + {t("content")} + + )} +

      {
      {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((image: any) => ( - -
      router.push(prefixPath + `/image/detail/${image?.slug}`)} className="cursor-pointer relative group rounded-md overflow-hidden"> + +
      router.push(prefixPath + `/image/detail/${image?.slug}`)} className="cursor-pointer relative group overflow-hidden shadow-md hover:shadow-lg"> {/* Gambar */} { width={2560} height={1440} src={image?.thumbnailLink} - className="w-full lg:w-[400px] h-48 md:h-56 lg:h-[490px] object-cover rounded-md" + className="w-full rounded-lg h-48 lg:h-60 object-cover group-hover:scale-100 transition-transform duration-300" /> {/* Overlay gelap */}
      - {/* Kategori */} - {image?.categoryName} - - {/* Konten Informasi */} -
      -

      {image?.title}

      +
      +

      {image?.title}

      +

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

      ))} + + ) : (

      @@ -202,10 +182,10 @@ const LatestContentKaltara = (props: { group: string; type: string }) => { ) ) : selectedTab == "audio" ? ( content?.length > 0 ? ( - + {content?.map((audio: any) => ( - +

      router.push(prefixPath + `/audio/detail/${audio?.slug}`)} className="cursor-pointer flex flex-col sm:flex-row items-center bg-white dark:bg-gray-800 shadow-md rounded-lg p-4 gap-4 w-full">
      @@ -230,8 +210,8 @@ const LatestContentKaltara = (props: { group: string; type: string }) => { ))} - {/* - */} + + ) : (

      @@ -240,46 +220,11 @@ 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-md overflow-hidden"> + +
      router.push(prefixPath + `/video/detail/${video?.slug}`)} className="cursor-pointer relative group overflow-hidden shadow-md hover:shadow-lg"> {/* Gambar */} { width={2560} height={1440} src={video?.thumbnailLink} - className="w-full lg:w-[400px] h-48 md:h-56 lg:h-[490px] object-cover rounded-md" + className="w-full rounded-lg h-48 lg:h-60 object-cover group-hover:scale-100 transition-transform duration-300" /> {/* Overlay Gelap */}
      - {/* Kategori */} - {video?.categoryName} - - {/* Overlay Konten (Judul) */} -
      -

      {video?.title}

      +
      +

      {video?.title}

      +

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

      ))} + + ) : (

      @@ -311,10 +257,10 @@ const LatestContentKaltara = (props: { group: string; type: string }) => {

      ) ) : content.length > 0 ? ( - + {content?.map((text: any) => ( - +
      router.push(prefixPath + `/document/detail/${text?.slug}`)} className="flex flex-col bg-yellow-500 sm:flex-row items-center dark:bg-gray-800 cursor-pointer shadow-md rounded-lg p-4 gap-4">
      @@ -346,8 +292,8 @@ const LatestContentKaltara = (props: { group: string; type: string }) => { ))} - {/* - */} + + ) : (

      diff --git a/components/landing-page/landing-polda-kaltara/navbar-polda-kaltara.tsx b/components/landing-page/landing-polda-kaltara/navbar-polda-kaltara.tsx index d10b5ea2..29ef441c 100644 --- a/components/landing-page/landing-polda-kaltara/navbar-polda-kaltara.tsx +++ b/components/landing-page/landing-polda-kaltara/navbar-polda-kaltara.tsx @@ -136,8 +136,8 @@ const NavbarKaltara = () => {

      - - TBNews + + logo
      @@ -174,14 +174,6 @@ const NavbarKaltara = () => { {/* Dark Mode */} - - {/* login */} - - -
      @@ -278,7 +270,7 @@ const NavbarKaltara = () => {
      - TBNews + logo
      @@ -317,14 +309,6 @@ const NavbarKaltara = () => { {/* Dark Mode */} - - {/* login */} - - -
      diff --git a/components/landing-page/search-section.tsx b/components/landing-page/search-section.tsx index 0bf06c2e..dffaa6a4 100644 --- a/components/landing-page/search-section.tsx +++ b/components/landing-page/search-section.tsx @@ -1,8 +1,6 @@ import React, { useState } 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"; -import { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectTrigger, SelectValue } from "@/components/ui/select"; +import { Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; import { useRouter } from "@/i18n/routing"; import { useTranslations } from "next-intl"; @@ -13,8 +11,8 @@ const SearchSection = () => { const t = useTranslations("LandingPage"); return ( -
      -
      +
      +
      {/* Heading */}

      {t("exploration")} {t("and")} {t("download")} {t("coverage")}{" "} diff --git a/public/assets/logo-humas-polri.png b/public/assets/logo-humas-polri.png new file mode 100644 index 00000000..ef366bec Binary files /dev/null and b/public/assets/logo-humas-polri.png differ diff --git a/public/assets/logo-inp.png b/public/assets/logo-inp.png new file mode 100644 index 00000000..706a9573 Binary files /dev/null and b/public/assets/logo-inp.png differ diff --git a/public/assets/logo-spit.png b/public/assets/logo-spit.png new file mode 100644 index 00000000..b33f1e1c Binary files /dev/null and b/public/assets/logo-spit.png differ diff --git a/public/assets/polda/logo-tbnews.png b/public/assets/polda/logo-tbnews.png new file mode 100644 index 00000000..dfac2e80 Binary files /dev/null and b/public/assets/polda/logo-tbnews.png differ diff --git a/public/assets/portal-humas.png b/public/assets/portal-humas.png new file mode 100644 index 00000000..0d9a47ca Binary files /dev/null and b/public/assets/portal-humas.png differ diff --git a/utils/globals.tsx b/utils/globals.tsx index 11019f6d..81def301 100644 --- a/utils/globals.tsx +++ b/utils/globals.tsx @@ -1,5 +1,8 @@ +"use client"; + import { format } from "date-fns"; import { id, tr } from "date-fns/locale"; +import { useEffect } from "react"; export const generateLocalizedPath = (href: string, locale: string): string => { if (href.startsWith(`/${locale}`)) { @@ -153,3 +156,19 @@ export const shimmer = (w: number, h: number) => ` `; export const toBase64 = (str: string) => (typeof window === "undefined" ? Buffer.from(str).toString("base64") : window.btoa(str)); + +const LoadScript = () => { + useEffect(() => { + const script = document.createElement("script"); + script.src = "https://cdn.userway.org/widget.js"; + script.setAttribute("data-account", "X36s1DpjqB"); + script.async = true; + document.head.appendChild(script); + return () => { + // Cleanup if needed + document.head.removeChild(script); + }; + }, []); + return null; // Tidak perlu merender apa-apa +}; +export default LoadScript;