feat: berita wilayah

This commit is contained in:
amd123 2024-03-12 11:44:06 +07:00
parent da42a3f8c4
commit 0a3f27d21f
4 changed files with 117 additions and 135 deletions

View File

@ -8,7 +8,7 @@ import Link from 'next/link';
export default function RegionalNews() { export default function RegionalNews() {
const [limitedData, setLimitedData] = useState<any>([]); const [limitedData, setLimitedData] = useState<any>([]);
const { isOpen, onOpen, onOpenChange } = useDisclosure(); const { isOpen, onOpen, onOpenChange } = useDisclosure();
const [scrollBehavior, setScrollBehavior] = React.useState<ModalProps["scrollBehavior"]>("outside"); const [scrollBehavior, setScrollBehavior] = React.useState<ModalProps["scrollBehavior"]>("inside");
const [modalPlacement, setModalPlacement] = React.useState<any>("auto"); const [modalPlacement, setModalPlacement] = React.useState<any>("auto");
const listPolda = [ const listPolda = [
@ -47,208 +47,221 @@ export default function RegionalNews() {
const listPoldaAll = [ const listPoldaAll = [
{ {
id: 1, id: 1,
img: "/temp/poldametro.svg", img: "/assets/polda/polda-metro.svg",
title: "Polda Metro Jaya", title: "Polda Metro Jaya",
path: '/news/polda-metro-jaya' path: '/news/polda-metro-jaya'
}, },
{ {
id: 2, id: 2,
img: "/temp/polda-sumut.svg", img: "/assets/polda/polda-jabar.svg",
title: "Polda Sumatra Utara", title: "Polda Jawa Barat",
path: '/news/polda-sumatra-utara' path: '/news/polda-jawa-barat'
}, },
{ {
id: 3, id: 3,
img: "/temp/polda-banten.svg", img: "/assets/polda/polda-banten.svg",
title: "Polda Banten", title: "Polda Banten",
path: '/news/polda-banten' path: '/news/polda-banten'
}, },
{ {
id: 4, id: 4,
img: "/temp/polda-jateng.svg", img: "/assets/polda/polda-jateng.svg",
title: "Polda Jawa Tengah", title: "Polda Jawa Tengah",
path: '/news/polda-jateng' path: '/news/polda-jateng'
}, },
{ {
id: 5, id: 5,
img: "/temp/polda-jatim.svg", img: "/assets/polda/polda-diy.svg",
title: "Polda Jawa Timur", title: "Polda D.I Yogyakarta",
path: 'news/polda-jatim' path: '/news/polda-daerah-istimewa-yogyakarta'
}, },
{ {
id: 6, id: 6,
img: "/temp/polda-jatim.svg", img: "/assets/polda/polda-jatim.svg",
title: "Polda Jawa Timur", title: "Polda Jawa Timur",
path: 'news/polda-jatim' path: '/news/polda-jawa-timur'
}, },
{ {
id: 7, id: 7,
img: "/temp/polda-jatim.svg", img: "/assets/polda/polda-aceh.svg",
title: "Polda Jawa Timur", title: "Polda Aceh",
path: 'news/polda-jatim' path: '/news/polda-aceh'
}, },
{ {
id: 8, id: 8,
img: "/temp/polda-jatim.svg", img: "/assets/polda/polda-sumut.svg",
title: "Polda Jawa Timur", title: "Polda Sumatra Utara",
path: 'news/polda-jatim' path: '/news/polda-sumatra-utara'
}, },
{ {
id: 9, id: 9,
img: "/temp/polda-jatim.svg", img: "/assets/polda/polda-sumbar.svg",
title: "Polda Jawa Timur", title: "Polda Sumatra Barat",
path: 'news/polda-jatim' path: '/news/polda-sumatra-barat'
}, },
{ {
id: 10, id: 10,
img: "/temp/polda-jatim.svg", img: "/assets/polda/polda-riau.svg",
title: "Polda Jawa Timur", title: "Polda Riau",
path: 'news/polda-jatim' path: '/news/polda-riau'
}, },
{ {
id: 11, id: 11,
img: "/temp/polda-jatim.svg", img: "/assets/polda/polda-kepri.svg",
title: "Polda Jawa Timur", title: "Polda Kep.Riau",
path: 'news/polda-jatim' path: '/news/polda-kepulauan-riau'
}, },
{ {
id: 12, id: 12,
img: "/temp/polda-jatim.svg", img: "/assets/polda/polda-jambi.svg",
title: "Polda Jawa Timur", title: "Polda Jambi",
path: 'news/polda-jatim' path: '/news/polda-jambi'
}, },
{ {
id: 13, id: 13,
img: "/temp/polda-jatim.svg", img: "/assets/polda/polda-jambi.svg",
title: "Polda Jawa Timur", title: "Polda Jambi",
path: 'news/polda-jatim' path: '/news/polda-jambi'
}, },
{ {
id: 14, id: 14,
img: "/temp/polda-jatim.svg", img: "/assets/polda/polda-sumsel.svg",
title: "Polda Jawa Timur", title: "Polda Sumatra Selatan",
path: 'news/polda-jatim' path: '/news/polda-sumatra-selatan'
}, },
{ {
id: 15, id: 15,
img: "/temp/polda-jatim.svg", img: "/assets/polda/polda-sumsel.svg",
title: "Polda Jawa Timur", title: "Polda Kep.Bangka Belitung",
path: 'news/polda-jatim' path: '/news/polda-bangka-belitung'
}, },
{ {
id: 16, id: 16,
img: "/temp/polda-jatim.svg", img: "/assets/polda/polda-bengkulu.svg",
title: "Polda Jawa Timur", title: "Polda Bengkulu",
path: 'news/polda-jatim' path: '/news/polda-bengkulu'
}, },
{ {
id: 17, id: 17,
img: "/temp/polda-jatim.svg", img: "/assets/polda/polda-lampung.svg",
title: "Polda Jawa Timur", title: "Polda Lampung",
path: 'news/polda-jatim' path: '/news/polda-lampung'
}, },
{ {
id: 18, id: 18,
img: "/temp/polda-jatim.svg", img: "/assets/polda/polda-ntb.svg",
title: "Polda Jawa Timur", title: "Polda Nusa Tenggara Barat",
path: 'news/polda-jatim' path: '/news/polda-ntb'
}, },
{ {
id: 19, id: 19,
img: "/temp/polda-jatim.svg", img: "/assets/polda/polda-ntb.svg",
title: "Polda Jawa Timur", title: "Polda Nusa Tenggara Barat",
path: 'news/polda-jatim' path: '/news/polda-ntb'
}, },
{ {
id: 20, id: 20,
img: "/temp/polda-jatim.svg", img: "/assets/polda/polda-ntt.svg",
title: "Polda Jawa Timur", title: "Polda Nusa Tenggara Timur",
path: 'news/polda-jatim' path: '/news/polda-ntt'
}, },
{ {
id: 21, id: 21,
img: "/temp/polda-jatim.svg", img: "/assets/polda/polda-bali.svg",
title: "Polda Jawa Timur", title: "Polda Bali",
path: 'news/polda-jatim' path: '/news/polda-bali'
}, },
{ {
id: 22, id: 22,
img: "/temp/polda-jatim.svg", img: "/assets/polda/polda-kalbar.svg",
title: "Polda Jawa Timur", title: "Polda Kalimantan Barat",
path: 'news/polda-jatim' path: '/news/polda-kalimantan-barat'
}, },
{ {
id: 23, id: 23,
img: "/temp/polda-jatim.svg", img: "/assets/polda/polda-kalteng.svg",
title: "Polda Jawa Timur", title: "Polda Kalimantan Tengah",
path: 'news/polda-jatim' path: '/news/polda-kalimantan-tengah'
}, },
{ {
id: 24, id: 24,
img: "/temp/polda-jatim.svg", img: "/assets/polda/polda-kalsel.svg",
title: "Polda Jawa Timur", title: "Polda Kalimantan Selatan",
path: 'news/polda-jatim' path: '/news/polda-kalimantan-selatan'
}, },
{ {
id: 25, id: 25,
img: "/temp/polda-jatim.svg", img: "/assets/polda/polda-kaltim.svg",
title: "Polda Jawa Timur", title: "Polda Kalimantan Timur",
path: 'news/polda-jatim' path: '/news/polda-kalimantan-timur'
}, },
{ {
id: 26, id: 26,
img: "/temp/polda-jatim.svg", img: "/assets/polda/polda-kalut.svg",
title: "Polda Jawa Timur", title: "Polda Kalimantan Utara",
path: 'news/polda-jatim' path: '/news/polda-kalimantan-utara'
}, },
{ {
id: 27, id: 27,
img: "/temp/polda-jatim.svg", img: "/assets/polda/polda-sulteng.svg",
title: "Polda Jawa Timur", title: "Polda Sulawesi Tengah",
path: 'news/polda-jatim' path: '/news/polda-sulawesi-tengah'
}, },
{ {
id: 28, id: 28,
img: "/temp/polda-jatim.svg", img: "/assets/polda/polda-sulut.svg",
title: "Polda Jawa Timur", title: "Polda Sulawesi Utara",
path: 'news/polda-jatim' path: '/news/polda-sulawesi-utara'
}, },
{ {
id: 29, id: 29,
img: "/temp/polda-jatim.svg", img: "/assets/polda/polda-gorontalo.svg",
title: "Polda Jawa Timur", title: "Polda Gorontalo",
path: 'news/polda-jatim' path: '/news/polda-gorontalo'
}, },
{ {
id: 30, id: 30,
img: "/temp/polda-jatim.svg", img: "/assets/polda/polda-sulbar.svg",
title: "Polda Jawa Timur", title: "Polda Sulawesi Barat",
path: 'news/polda-jatim' path: '/news/polda-sulawesi-barat'
}, },
{ {
id: 31, id: 31,
img: "/temp/polda-jatim.svg", img: "/assets/polda/polda-sulsel.svg",
title: "Polda Jawa Timur", title: "Polda Sulawesi Selatan",
path: 'news/polda-jatim' path: '/news/polda-sulawesi-selatan'
}, },
{ {
id: 32, id: 32,
img: "/temp/polda-jatim.svg", img: "/assets/polda/polda-sultenggara.svg",
title: "Polda Jawa Timur", title: "Polda Sulawesi Tenggara",
path: 'news/polda-jatim' path: '/news/polda-sulawesi-tenggara'
}, },
{ {
id: 33, id: 33,
img: "/temp/polda-jatim.svg", img: "/assets/polda/polda-malut.svg",
title: "Polda Jawa Timur", title: "Polda Maluku Utara",
path: 'news/polda-jatim' path: '/news/polda-maluku-utara'
}, },
{ {
id: 34, id: 34,
img: "/temp/polda-jatim.svg", img: "/assets/polda/polda-maluku.svg",
title: "Polda Jawa Timur", title: "Polda Maluku",
path: 'news/polda-jatim' path: '/news/polda-maluku'
}, },
{
id: 35,
img: "/assets/polda/polda-papuabarat.svg",
title: "Polda Papua Barat",
path: '/news/polda-papua-barat'
},
{
id: 36,
img: "/assets/polda/polda-papua.svg",
title: "Polda Papua",
path: '/news/polda-papua'
},
]; ];
// useEffect(() => { // useEffect(() => {
@ -303,7 +316,7 @@ export default function RegionalNews() {
scrollBehavior={scrollBehavior} scrollBehavior={scrollBehavior}
placement={modalPlacement} placement={modalPlacement}
classNames={{ classNames={{
wrapper: "h-full bg-white", wrapper: "bg-white",
base: "bg-white min-h-full", base: "bg-white min-h-full",
// body: "w-full bg-white", // body: "w-full bg-white",
// footer: "bg-white" // footer: "bg-white"
@ -313,7 +326,7 @@ export default function RegionalNews() {
{(onClose) => ( {(onClose) => (
<> <>
<ModalHeader className="flex flex-col text-[#DD8306] items-center min-h mb- text-3xl font-semibold">Berita Wilayah</ModalHeader> <ModalHeader className="flex flex-col text-[#DD8306] items-center min-h mb- text-3xl font-semibold">Berita Wilayah</ModalHeader>
<ModalBody className='flex flex-row flex-wrap justify-center'> <ModalBody className='flex flex-row flex-wrap justify-center text-center'>
{listPoldaAll.map((item: any, index: any) => ( {listPoldaAll.map((item: any, index: any) => (
<Link href={item.path}> <Link href={item.path}>
<div key={index.id} className='w-[140px] h-[115px] flex flex-col items-center justify-evenly border-2 rounded-lg shadow-sm'> <div key={index.id} className='w-[140px] h-[115px] flex flex-col items-center justify-evenly border-2 rounded-lg shadow-sm'>

View File

@ -5,7 +5,7 @@ import { FbIcon, Hotline, IgIcon, Location, Mail, TtIcon, TwIcon, WorldIcon, YtI
export default function FooterPPID() { export default function FooterPPID() {
return ( return (
<> <>
<div className='w-full bg-[#1F1A17] flex flex-col md:grid md:grid-cols-3 lg:grid-cols-4 gap-0 md:gap-3 lg:gap-7 p-2 lg:p-16 text-sm'> <div id='footer-ppid' className='scroll-auto w-full bg-[#1F1A17] flex flex-col md:grid md:grid-cols-3 lg:grid-cols-4 gap-0 md:gap-3 lg:gap-7 p-2 lg:p-16 text-sm'>
<div className=' flex-col hidden lg:block'> <div className=' flex-col hidden lg:block'>
<img src="/e-ppid.png" alt="logo" /> <img src="/e-ppid.png" alt="logo" />
</div> </div>

View File

@ -55,38 +55,6 @@ export default function NavbarHumas() {
<Link href={'/'}> <Link href={'/'}>
<div>Beranda</div> <div>Beranda</div>
</Link> </Link>
<div className=''>
<Dropdown>
<DropdownTrigger>
<Button
>
Open Menu
</Button>
</DropdownTrigger>
<DropdownMenu aria-label="Static Actions" className='w-full'
classNames={{
base: "w-full",
emptyContent: "w-full",
list: "w-full"
}}
itemClasses={{
base: "w-full",
wrapper: "w-full",
title: "border-2 w-full"
}}
>
<DropdownItem classNames={{
base: "w-screen"
}} key="new">New file</DropdownItem>
<DropdownItem key="copy">Copy link</DropdownItem>
<DropdownItem key="edit">Edit file</DropdownItem>
<DropdownItem key="delete" className="text-danger" color="danger">
Delete file
</DropdownItem>
</DropdownMenu>
</Dropdown>
</div>
<div> <div>
<Dropdown className=' dark:bg-[#1F1A17]'> <Dropdown className=' dark:bg-[#1F1A17]'>
<NavbarItem> <NavbarItem>
@ -117,10 +85,11 @@ export default function NavbarHumas() {
}} }}
> >
<DropdownItem <DropdownItem
endContent={<ChevronRightWhite />} // endContent={<ChevronRightWhite />}
> >
<Link href='/tentang-humas-polri'> <Link href='/tentang-humas-polri' className='flex justify-between'>
Tentang Humas POLRI Tentang Humas POLRI
<ChevronRightWhite />
</Link> </Link>
</DropdownItem> </DropdownItem>
<DropdownItem <DropdownItem

View File

@ -26,7 +26,7 @@ export default function NavbarPPID() {
<div ><IdnIcon /></div> <div ><IdnIcon /></div>
</div> </div>
<div className='flex flex-wrap items-center justify-around'> <div className='flex flex-wrap items-center justify-around'>
<NavbarItem> <NavbarItem className='scroll-smooth'>
<Link href='/portal-ppid' color='foreground'> <Link href='/portal-ppid' color='foreground'>
Beranda Beranda
</Link> </Link>
@ -303,7 +303,7 @@ export default function NavbarPPID() {
</Link> </Link>
</NavbarItem> </NavbarItem>
<NavbarItem> <NavbarItem>
<Link href='/portal-ppid' color='foreground'> <Link href='#footer-ppid' color='foreground'>
Kontak Kontak
</Link> </Link>
</NavbarItem> </NavbarItem>