fix:landing
This commit is contained in:
parent
c065569c28
commit
0e87d7d627
|
|
@ -21,7 +21,7 @@ export default function BasicPage() {
|
|||
};
|
||||
|
||||
return (
|
||||
<div className="overflow-x-hidden overflow-y-scroll rounded-lg border-2">
|
||||
<div className="overflow-x-hidden overflow-y-scroll">
|
||||
<div className="px-2 md:px-4 w-full">
|
||||
<div className="rounded-md my-5 px-5 py-2 bg-white dark:bg-[#18181b] flex flex-row gap-3">
|
||||
<Link href="/admin/article/create">
|
||||
|
|
@ -30,7 +30,7 @@ export default function BasicPage() {
|
|||
<AddIcon />
|
||||
</Button>
|
||||
</Link>
|
||||
<Button
|
||||
{/* <Button
|
||||
size="md"
|
||||
color="primary"
|
||||
className="bg-[#F07C00] text-white"
|
||||
|
|
@ -38,9 +38,9 @@ export default function BasicPage() {
|
|||
>
|
||||
<AddIcon />
|
||||
Generate Article
|
||||
</Button>
|
||||
</Button> */}
|
||||
</div>
|
||||
<div className="bg-white dark:bg-[#18181b] rounded-xl my-5 p-2">
|
||||
<div className="bg-white dark:bg-[#18181b] rounded-xl p-2">
|
||||
<ArticleTable />
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import DashboardContainer from "@/components/main/dashboard/dashboard-container"
|
|||
|
||||
export default function AdminPage() {
|
||||
return (
|
||||
<div className="h-[96vh] overflow-x-hidden overflow-y-scroll gap-0 grid rounded-lg border-small">
|
||||
<div className="h-[96vh] overflow-x-hidden overflow-y-scroll gap-0 grid">
|
||||
<div className="px-4">
|
||||
<DashboardContainer />
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,4 @@
|
|||
"use client";
|
||||
export default function MasterCategory() {
|
||||
return <div>master category</div>;
|
||||
}
|
||||
|
|
@ -15,7 +15,14 @@ export const MenuBurgerIcon = ({
|
|||
width={size || width}
|
||||
{...props}
|
||||
>
|
||||
<path fill="none" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2.5" d="M3 6h18M3 12h18M3 18h18" />
|
||||
<path
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
strokeWidth="2.5"
|
||||
d="M3 6h18M3 12h18M3 18h18"
|
||||
/>
|
||||
</svg>
|
||||
);
|
||||
|
||||
|
|
@ -33,7 +40,10 @@ export const DashboardIcon = ({
|
|||
width={size || width}
|
||||
{...props}
|
||||
>
|
||||
<path fill="currentColor" d="M13 9V3h8v6zM3 13V3h8v10zm10 8V11h8v10zM3 21v-6h8v6z" />
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M13 9V3h8v6zM3 13V3h8v10zm10 8V11h8v10zM3 21v-6h8v6z"
|
||||
/>
|
||||
</svg>
|
||||
);
|
||||
|
||||
|
|
@ -74,8 +84,15 @@ export const Submenu1Icon = ({
|
|||
>
|
||||
<defs>
|
||||
<mask id="ipTData0">
|
||||
<g fill="none" stroke="#fff" strokeLinecap="round" strokeLinejoin="round" strokeWidth="4">
|
||||
<path d="M44 11v27c0 3.314-8.954 6-20 6S4 41.314 4 38V11" /><path d="M44 29c0 3.314-8.954 6-20 6S4 32.314 4 29m40-9c0 3.314-8.954 6-20 6S4 23.314 4 20" />
|
||||
<g
|
||||
fill="none"
|
||||
stroke="#fff"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
strokeWidth="4"
|
||||
>
|
||||
<path d="M44 11v27c0 3.314-8.954 6-20 6S4 41.314 4 38V11" />
|
||||
<path d="M44 29c0 3.314-8.954 6-20 6S4 32.314 4 29m40-9c0 3.314-8.954 6-20 6S4 23.314 4 20" />
|
||||
<ellipse cx="24" cy="10" fill="#555" rx="20" ry="6" />
|
||||
</g>
|
||||
</mask>
|
||||
|
|
@ -98,7 +115,10 @@ export const Submenu2Icon = ({
|
|||
width={size || width}
|
||||
{...props}
|
||||
>
|
||||
<path fill="currentColor" d="M230.93 220a8 8 0 0 1-6.93 4H32a8 8 0 0 1-6.92-12c15.23-26.33 38.7-45.21 66.09-54.16a72 72 0 1 1 73.66 0c27.39 8.95 50.86 27.83 66.09 54.16a8 8 0 0 1 .01 8" />
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M230.93 220a8 8 0 0 1-6.93 4H32a8 8 0 0 1-6.92-12c15.23-26.33 38.7-45.21 66.09-54.16a72 72 0 1 1 73.66 0c27.39 8.95 50.86 27.83 66.09 54.16a8 8 0 0 1 .01 8"
|
||||
/>
|
||||
</svg>
|
||||
);
|
||||
|
||||
|
|
@ -116,13 +136,17 @@ export const InfoCircleIcon = ({
|
|||
width={size || width}
|
||||
{...props}
|
||||
>
|
||||
<path fill="currentColor" d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448s448-200.6 448-448S759.4 64 512 64m0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372s372 166.6 372 372s-166.6 372-372 372" />
|
||||
<path fill="currentColor" d="M464 336a48 48 0 1 0 96 0a48 48 0 1 0-96 0m72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8" />
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448s448-200.6 448-448S759.4 64 512 64m0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372s372 166.6 372 372s-166.6 372-372 372"
|
||||
/>
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M464 336a48 48 0 1 0 96 0a48 48 0 1 0-96 0m72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8"
|
||||
/>
|
||||
</svg>
|
||||
|
||||
);
|
||||
|
||||
|
||||
export const MinusCircleIcon = ({
|
||||
size,
|
||||
height = 24,
|
||||
|
|
@ -142,8 +166,6 @@ export const MinusCircleIcon = ({
|
|||
<path d="M4 8a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7A.5.5 0 0 1 4 8" />
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
|
||||
);
|
||||
|
||||
export const TableIcon = ({
|
||||
|
|
@ -158,10 +180,237 @@ export const TableIcon = ({
|
|||
height={size || height}
|
||||
viewBox="0 0 24 22"
|
||||
width={size || width}
|
||||
stroke-width="1.5"
|
||||
strokeWidth="1.5"
|
||||
stroke="currentColor"
|
||||
{...props}
|
||||
>
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M3.375 19.5h17.25m-17.25 0a1.125 1.125 0 0 1-1.125-1.125M3.375 19.5h7.5c.621 0 1.125-.504 1.125-1.125m-9.75 0V5.625m0 12.75v-1.5c0-.621.504-1.125 1.125-1.125m18.375 2.625V5.625m0 12.75c0 .621-.504 1.125-1.125 1.125m1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125m0 3.75h-7.5A1.125 1.125 0 0 1 12 18.375m9.75-12.75c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125m19.5 0v1.5c0 .621-.504 1.125-1.125 1.125M2.25 5.625v1.5c0 .621.504 1.125 1.125 1.125m0 0h17.25m-17.25 0h7.5c.621 0 1.125.504 1.125 1.125M3.375 8.25c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125m17.25-3.75h-7.5c-.621 0-1.125.504-1.125 1.125m8.625-1.125c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125m-17.25 0h7.5m-7.5 0c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125M12 10.875v-1.5m0 1.5c0 .621-.504 1.125-1.125 1.125M12 10.875c0 .621.504 1.125 1.125 1.125m-2.25 0c.621 0 1.125.504 1.125 1.125M13.125 12h7.5m-7.5 0c-.621 0-1.125.504-1.125 1.125M20.625 12c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125m-17.25 0h7.5M12 14.625v-1.5m0 1.5c0 .621-.504 1.125-1.125 1.125M12 14.625c0 .621.504 1.125 1.125 1.125m-2.25 0c.621 0 1.125.504 1.125 1.125m0 1.5v-1.5m0 0c0-.621.504-1.125 1.125-1.125m0 0h7.5" />
|
||||
<path
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
d="M3.375 19.5h17.25m-17.25 0a1.125 1.125 0 0 1-1.125-1.125M3.375 19.5h7.5c.621 0 1.125-.504 1.125-1.125m-9.75 0V5.625m0 12.75v-1.5c0-.621.504-1.125 1.125-1.125m18.375 2.625V5.625m0 12.75c0 .621-.504 1.125-1.125 1.125m1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125m0 3.75h-7.5A1.125 1.125 0 0 1 12 18.375m9.75-12.75c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125m19.5 0v1.5c0 .621-.504 1.125-1.125 1.125M2.25 5.625v1.5c0 .621.504 1.125 1.125 1.125m0 0h17.25m-17.25 0h7.5c.621 0 1.125.504 1.125 1.125M3.375 8.25c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125m17.25-3.75h-7.5c-.621 0-1.125.504-1.125 1.125m8.625-1.125c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125m-17.25 0h7.5m-7.5 0c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125M12 10.875v-1.5m0 1.5c0 .621-.504 1.125-1.125 1.125M12 10.875c0 .621.504 1.125 1.125 1.125m-2.25 0c.621 0 1.125.504 1.125 1.125M13.125 12h7.5m-7.5 0c-.621 0-1.125.504-1.125 1.125M20.625 12c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125m-17.25 0h7.5M12 14.625v-1.5m0 1.5c0 .621-.504 1.125-1.125 1.125M12 14.625c0 .621.504 1.125 1.125 1.125m-2.25 0c.621 0 1.125.504 1.125 1.125m0 1.5v-1.5m0 0c0-.621.504-1.125 1.125-1.125m0 0h7.5"
|
||||
/>
|
||||
</svg>
|
||||
);
|
||||
export const ArticleIcon = ({
|
||||
size,
|
||||
height = 20,
|
||||
width = 20,
|
||||
fill = "currentColor",
|
||||
...props
|
||||
}: IconSvgProps) => (
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
height={size || height}
|
||||
width={size || width}
|
||||
viewBox="0 0 20 20"
|
||||
{...props}
|
||||
>
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M5 1a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2zm0 3h5v1H5zm0 2h5v1H5zm0 2h5v1H5zm10 7H5v-1h10zm0-2H5v-1h10zm0-2H5v-1h10zm0-2h-4V4h4z"
|
||||
/>
|
||||
</svg>
|
||||
);
|
||||
export const MagazineIcon = ({
|
||||
size,
|
||||
height = 20,
|
||||
width = 20,
|
||||
fill = "currentColor",
|
||||
...props
|
||||
}: IconSvgProps) => (
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
height={size || height}
|
||||
width={size || width}
|
||||
viewBox="0 0 128 128"
|
||||
{...props}
|
||||
>
|
||||
<path
|
||||
fill="#bdbdbd"
|
||||
d="M-125.7 124.54V11.79c29.36 1.85 58.81 1.91 88.18.19c1.77-.1 3.21 1.08 3.21 2.66v107.04c0 1.58-1.44 2.94-3.21 3.05a727 727 0 0 1-88.18-.19"
|
||||
/>
|
||||
<path
|
||||
fill="#e0e0e0"
|
||||
d="M-125.7 124.54V11.79c27.11-5.31 54.34-8.57 81.45-9.76c1.64-.07 2.96 1.15 2.96 2.73V111.8c0 1.58-1.33 2.9-2.96 2.98c-27.11 1.19-54.34 4.45-81.45 9.76"
|
||||
/>
|
||||
<g fill="#757575">
|
||||
<path d="M-92.84 42.86c-7.46 1-14.91 2.16-22.36 3.47v-3.22c7.45-1.31 14.9-2.47 22.36-3.47zm-12.76-15.72c-3.2.51-6.4 1.04-9.6 1.6v-8.47c3.2-.56 6.4-1.1 9.6-1.6zm12.17-1.78c-3.2.43-6.4.9-9.6 1.39v-8.47c3.2-.49 6.4-.95 9.6-1.39zm12.17-1.52q-4.8.54-9.6 1.17v-8.47q4.8-.63 9.6-1.17zm12.17-1.23c-3.2.29-6.4.61-9.6.95v-8.47c3.2-.35 6.4-.66 9.6-.95zm17.21 5.12a548 548 0 0 0-63.31 7.42v-.81c21.09-3.72 42.23-6.19 63.31-7.42zm-32.67 14.08c-2.21.26-4.41.54-6.62.83v-3.22c2.21-.29 4.41-.57 6.62-.83z" />
|
||||
<path d="M-75.06 40.77c-3.6.37-7.21.77-10.81 1.2v-3.22c3.6-.44 7.21-.84 10.81-1.2zm12.29-1.11l-3.66.3v-3.22l3.66-.3z" />
|
||||
<path d="M-65.38 39.87c-2.47.21-4.95.43-7.42.67v-3.22c2.47-.24 4.95-.46 7.42-.67zm10.32-.76c-2.02.13-4.05.27-6.07.42v-3.22c2.02-.15 4.05-.29 6.07-.42zm-49.89 14.57c-3.42.54-6.83 1.11-10.25 1.71v-3.22c3.41-.6 6.83-1.17 10.25-1.71zm9.51-1.4c-2.63.37-5.26.75-7.89 1.16v-3.22c2.63-.41 5.26-.79 7.89-1.16z" />
|
||||
<path d="M-84.55 50.87c-3.95.47-7.89.98-11.84 1.54v-3.22c3.95-.56 7.89-1.07 11.84-1.54z" />
|
||||
<path d="M-75.06 49.82c-3.6.37-7.21.77-10.81 1.2V47.8c3.6-.44 7.21-.84 10.81-1.2zm12.29-1.1l-3.66.3V45.8l3.66-.3z" />
|
||||
<path d="M-61.13 48.59c-3.89.29-7.78.63-11.67 1.01v-3.22c3.89-.38 7.78-.71 11.67-1.01z" />
|
||||
<path d="M-51.89 47.97c-3.08.18-6.16.39-9.25.62v-3.22c3.08-.23 6.17-.44 9.25-.62zm-49.5 14.22q-6.9 1.035-13.8 2.25v-3.22q6.9-1.215 13.8-2.25z" />
|
||||
<path d="M-95.44 61.33c-2.63.37-5.26.75-7.89 1.16v-3.22c2.63-.41 5.26-.79 7.89-1.16zm10.89-1.4c-2.76.33-5.53.68-8.29 1.05v-3.22c2.76-.37 5.53-.72 8.29-1.05z" />
|
||||
<path d="M-78.26 59.21c-2.54.27-5.07.56-7.61.87v-3.22c2.54-.31 5.07-.6 7.61-.87zm26.37 24.99q-12.075.705-24.18 1.95V55.76q12.09-1.245 24.18-1.95zm-38.55-14.48c-8.25 1.07-16.51 2.34-24.75 3.79v-3.22c8.24-1.45 16.5-2.72 24.75-3.79z" />
|
||||
<path d="M-95.44 70.39c-1.31.18-2.63.37-3.94.56v-3.22c1.31-.19 2.63-.38 3.94-.56zm10.89-1.41c-2.21.26-4.41.54-6.62.83v-3.22c2.21-.29 4.41-.57 6.62-.83z" />
|
||||
<path d="M-78.32 68.28c-2.51.27-5.03.56-7.54.86v-3.22c2.51-.31 5.03-.59 7.54-.86zm-23.07 12.03q-6.9 1.035-13.8 2.25v-3.22q6.9-1.215 13.8-2.25z" />
|
||||
<path d="M-98.16 79.83c-1.72.25-3.44.51-5.17.77v-3.22c1.72-.27 3.44-.52 5.17-.77zm13.61-1.79q-5.445.645-10.89 1.41v-3.22c3.63-.51 7.26-.97 10.89-1.41z" />
|
||||
<path d="M-80.46 77.57c-1.8.2-3.6.41-5.41.63v-3.22c1.8-.22 3.6-.43 5.41-.63zm-16.95 11.21c-5.93.85-11.86 1.79-17.79 2.84V88.4c5.92-1.04 11.85-1.99 17.79-2.84z" />
|
||||
<path d="M-92.54 88.1c-2.28.31-4.56.62-6.84.96v-3.22q3.42-.495 6.84-.96zm7.99-1.01c-1.75.21-3.5.43-5.25.65v-3.22c1.75-.23 3.5-.44 5.25-.65z" />
|
||||
<path d="M-78.32 86.39c-2.51.27-5.03.56-7.54.86v-3.22c2.51-.31 5.03-.59 7.54-.86zm-23.07 12.03q-6.9 1.035-13.8 2.25v-3.22q6.9-1.215 13.8-2.25zm14.22-1.95q-6.105.75-12.21 1.65V94.9q6.105-.9 12.21-1.65z" />
|
||||
<path d="M-84.55 96.15c-2.21.26-4.41.54-6.62.83v-3.22c2.21-.29 4.41-.57 6.62-.83z" />
|
||||
<path d="M-75.06 95.1c-3.6.37-7.21.77-10.81 1.2v-3.22c3.6-.44 7.21-.84 10.81-1.2zm12.29-1.1l-3.66.3v-3.22l3.66-.3zm-5.64.47c-1.46.13-2.93.27-4.39.41v-3.22c1.46-.14 2.93-.28 4.39-.41z" />
|
||||
<path d="M-51.89 93.25c-6 .35-12.01.8-18.01 1.35v-3.22c6.01-.55 12.01-1 18.01-1.35zm-43.56 13.36c-6.59.92-13.17 1.96-19.75 3.11v-3.22c6.58-1.16 13.16-2.2 19.75-3.11zm22.09-2.62c-3.48.34-6.96.72-10.44 1.13v-3.22c3.48-.41 6.96-.78 10.44-1.13zm-13.53 1.5c-2.18.27-4.36.55-6.55.85v-3.22c2.18-.3 4.36-.58 6.55-.85z" />
|
||||
</g>
|
||||
<path
|
||||
fill="#eee"
|
||||
d="M15.71 280.41V170.86h76.08a2.77 2.77 0 0 1 2.77 2.77v104.01a2.77 2.77 0 0 1-2.77 2.77z"
|
||||
/>
|
||||
<g fill="#757575">
|
||||
<path d="M25.53 203.19h20.88v3.13H25.53zm0-22.19h8.96v8.23h-8.96zm11.36 0h8.96v8.23h-8.96zm11.36 0h8.96v8.23h-8.96zm11.36 0h8.96v8.23h-8.96zm-34.08 13.66h59.12v.79H25.53zm22.44 8.53h6.18v3.13h-6.18z" />
|
||||
<path d="M52.92 203.19h10.09v3.13H52.92zm18.14 0h3.42v3.13h-3.42z" />
|
||||
<path d="M65.11 203.19h6.93v3.13h-6.93zm10.9 0h5.67v3.13h-5.67zm-50.48 8.8h9.57v3.13h-9.57zm11.08 0h7.37v3.13h-7.37z" />
|
||||
<path d="M43.1 211.99h11.05v3.13H43.1z" />
|
||||
<path d="M52.92 211.99h10.09v3.13H52.92zm18.14 0h3.42v3.13h-3.42z" />
|
||||
<path d="M65.11 211.99H76v3.13H65.11zm10.9 0h8.64v3.13h-8.64zm-50.48 8.8h12.89v3.13H25.53z" />
|
||||
<path d="M36.61 220.79h7.37v3.13h-7.37zm9.8 0h7.74v3.13h-7.74z" />
|
||||
<path d="M52.92 220.79h7.1v3.13h-7.1zm9.15 0h22.58v29.53H62.07zm-36.54 8.8h23.11v3.13H25.53z" />
|
||||
<path d="M40.3 229.59h3.68v3.13H40.3zm7.67 0h6.18v3.13h-6.18z" />
|
||||
<path d="M52.92 229.59h7.04v3.13h-7.04zm-27.39 8.8h12.89v3.13H25.53z" />
|
||||
<path d="M36.61 238.39h4.82v3.13h-4.82zm7.37 0h10.17v3.13H43.98z" />
|
||||
<path d="M52.92 238.39h5.04v3.13h-5.04zm-27.39 8.79h16.61v3.13H25.53z" />
|
||||
<path d="M40.3 247.18h6.38v3.13H40.3zm8.95 0h4.9v3.13h-4.9z" />
|
||||
<path d="M52.92 247.18h7.04v3.13h-7.04zm-27.39 8.8h12.89v3.13H25.53zm14.77 0h11.39v3.13H40.3z" />
|
||||
<path d="M47.97 255.98h6.18v3.13h-6.18z" />
|
||||
<path d="M52.92 255.98h10.09v3.13H52.92zm18.14 0h3.42v3.13h-3.42zm-5.95 0h4.1v3.13h-4.1z" />
|
||||
<path d="M67.82 255.98h16.82v3.13H67.82zm-42.29 8.8h18.44v3.13H25.53zm29.32 0h9.74v3.13h-9.74zm-9 0h6.11v3.13h-6.11z" />
|
||||
</g>
|
||||
<path
|
||||
fill="#bdbdbd"
|
||||
d="M16.62 124.27V14.04c30.52 2.2 61.18 2.27 91.71.21c1.68-.11 3.05 1.04 3.05 2.58v104.65c0 1.54-1.36 2.89-3.05 3a659 659 0 0 1-91.71-.21"
|
||||
/>
|
||||
<path
|
||||
fill="#e0e0e0"
|
||||
d="M16.62 124.25V14.02C44.36 7.91 72.21 3.9 99.95 2.03c1.53-.1 2.77 1.07 2.77 2.61v104.65c0 1.54-1.24 2.87-2.77 2.97c-27.74 1.87-55.59 5.88-83.33 11.99"
|
||||
/>
|
||||
<path
|
||||
fill="none"
|
||||
stroke="#616161"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
strokeMiterlimit="10"
|
||||
strokeWidth="5"
|
||||
d="M28.75 49.34c20.6-4.08 41.25-7 61.84-8.74M28.75 63.23a565 565 0 0 1 26.45-4.6M28.75 77.11a565 565 0 0 1 26.45-4.6m-26.45 33.06c20.6-4.08 41.25-7 61.84-8.74M28.75 91a565 565 0 0 1 26.45-4.6"
|
||||
/>
|
||||
<path
|
||||
fill="#616161"
|
||||
d="M64.86 87.55a560 560 0 0 1 24.67-2.69c1.49-.13 2.69-1.44 2.69-2.94V54.54c0-1.5-1.21-2.61-2.69-2.48c-8.22.71-16.44 1.61-24.67 2.69c-1.49.2-2.7 1.58-2.7 3.07V85.2c.01 1.5 1.21 2.55 2.7 2.35m-34.4-52.14c2.03-.4 4.05-.78 6.08-1.15c1.49-.27 2.69-1.7 2.69-3.2v-7.02c0-1.5-1.21-2.49-2.69-2.22c-2.03.37-4.05.76-6.08 1.15c-1.49.29-2.69 1.75-2.69 3.24v7.02c-.01 1.5 1.2 2.47 2.69 2.18m15.96-2.88c2.03-.34 4.05-.66 6.08-.97c1.49-.23 2.7-1.62 2.7-3.12v-7.02c0-1.5-1.21-2.53-2.7-2.3c-2.03.31-4.06.64-6.08.97c-1.49.25-2.69 1.67-2.69 3.16v7.02c0 1.5 1.2 2.51 2.69 2.26m15.97-2.41c2.03-.28 4.06-.54 6.08-.8c1.49-.19 2.7-1.54 2.7-3.04v-7.02c0-1.5-1.21-2.57-2.7-2.38c-2.03.25-4.06.52-6.08.8c-1.49.2-2.7 1.59-2.7 3.08v7.02c.01 1.5 1.22 2.54 2.7 2.34"
|
||||
/>
|
||||
<path
|
||||
fill="#e0e0e0"
|
||||
d="M374.07 165.73V44.63h92.1a3.06 3.06 0 0 1 3.06 3.06v114.98a3.06 3.06 0 0 1-3.06 3.06z"
|
||||
/>
|
||||
<path
|
||||
fill="none"
|
||||
stroke="#616161"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
strokeMiterlimit="10"
|
||||
strokeWidth="5"
|
||||
d="M387.48 86.21h68.34m-68.34 15.26h29.23m-29.23 15.26h29.23M387.48 148h68.34m-68.34-16.01h29.23"
|
||||
/>
|
||||
<path
|
||||
fill="#616161"
|
||||
d="M427.38 134.75h27.26c1.64 0 2.98-1.33 2.98-2.98v-30.08c0-1.64-1.33-2.98-2.98-2.98h-27.26c-1.64 0-2.98 1.33-2.98 2.98v30.08a2.987 2.987 0 0 0 2.98 2.98m-38.01-63.47h6.72c1.64 0 2.98-1.33 2.98-2.98v-7.71c0-1.64-1.33-2.98-2.98-2.98h-6.72c-1.64 0-2.98 1.33-2.98 2.98v7.71c0 1.65 1.33 2.98 2.98 2.98m17.64 0h6.72c1.64 0 2.98-1.33 2.98-2.98v-7.71c0-1.64-1.33-2.98-2.98-2.98h-6.72c-1.64 0-2.98 1.33-2.98 2.98v7.71a2.987 2.987 0 0 0 2.98 2.98m17.65 0h6.72c1.64 0 2.98-1.33 2.98-2.98v-7.71c0-1.64-1.33-2.98-2.98-2.98h-6.72c-1.64 0-2.98 1.33-2.98 2.98v7.71c0 1.65 1.33 2.98 2.98 2.98"
|
||||
/>
|
||||
<path
|
||||
fill="#bdbdbd"
|
||||
d="M479.86 165.73V44.63h92.1a3.06 3.06 0 0 1 3.06 3.06v114.98a3.06 3.06 0 0 1-3.06 3.06z"
|
||||
/>
|
||||
</svg>
|
||||
);
|
||||
|
||||
export const StaticPageIcon = ({
|
||||
size,
|
||||
height = 20,
|
||||
width = 20,
|
||||
fill = "currentColor",
|
||||
...props
|
||||
}: IconSvgProps) => (
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width={size || width}
|
||||
height={size || height}
|
||||
viewBox="0 0 2048 2048"
|
||||
{...props}
|
||||
>
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M1755 512h-475V37zm37 128v1408H128V0h1024v640z"
|
||||
/>
|
||||
</svg>
|
||||
);
|
||||
export const MasterUsersIcon = ({
|
||||
size,
|
||||
height = 24,
|
||||
width = 24,
|
||||
fill = "currentColor",
|
||||
...props
|
||||
}: IconSvgProps) => (
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width={size || width}
|
||||
height={size || height}
|
||||
viewBox="0 0 640 512"
|
||||
{...props}
|
||||
>
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M144 0a80 80 0 1 1 0 160a80 80 0 1 1 0-160m368 0a80 80 0 1 1 0 160a80 80 0 1 1 0-160M0 298.7C0 239.8 47.8 192 106.7 192h42.7c15.9 0 31 3.5 44.6 9.7c-1.3 7.2-1.9 14.7-1.9 22.3c0 38.2 16.8 72.5 43.3 96H21.3C9.6 320 0 310.4 0 298.7M405.3 320h-.7c26.6-23.5 43.3-57.8 43.3-96c0-7.6-.7-15-1.9-22.3c13.6-6.3 28.7-9.7 44.6-9.7h42.7c58.9 0 106.7 47.8 106.7 106.7c0 11.8-9.6 21.3-21.3 21.3H405.4zM224 224a96 96 0 1 1 192 0a96 96 0 1 1-192 0m-96 261.3c0-73.6 59.7-133.3 133.3-133.3h117.3c73.7 0 133.4 59.7 133.4 133.3c0 14.7-11.9 26.7-26.7 26.7H154.6c-14.7 0-26.7-11.9-26.7-26.7z"
|
||||
/>
|
||||
</svg>
|
||||
);
|
||||
export const MasterRoleIcon = ({
|
||||
size,
|
||||
height = 24,
|
||||
width = 24,
|
||||
fill = "currentColor",
|
||||
...props
|
||||
}: IconSvgProps) => (
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width={size || width}
|
||||
height={size || height}
|
||||
viewBox="0 0 24 24"
|
||||
{...props}
|
||||
>
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M15 21h-2a2 2 0 0 1 0-4h2v-2h-2a4 4 0 0 0 0 8h2Zm8-2a4 4 0 0 1-4 4h-2v-2h2a2 2 0 0 0 0-4h-2v-2h2a4 4 0 0 1 4 4"
|
||||
/>
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M14 18h4v2h-4zm-7 1a6 6 0 0 1 .09-1H3v-1.4c0-2 4-3.1 6-3.1a8.6 8.6 0 0 1 1.35.125A5.95 5.95 0 0 1 13 13h5V4a2.006 2.006 0 0 0-2-2h-4.18a2.988 2.988 0 0 0-5.64 0H2a2.006 2.006 0 0 0-2 2v14a2.006 2.006 0 0 0 2 2h5.09A6 6 0 0 1 7 19M9 2a1 1 0 1 1-1 1a1.003 1.003 0 0 1 1-1m0 4a3 3 0 1 1-3 3a2.996 2.996 0 0 1 3-3"
|
||||
/>
|
||||
</svg>
|
||||
);
|
||||
export const MasterCategoryIcon = ({
|
||||
size,
|
||||
height = 24,
|
||||
width = 24,
|
||||
fill = "currentColor",
|
||||
...props
|
||||
}: IconSvgProps) => (
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width={size || width}
|
||||
height={size || height}
|
||||
viewBox="0 0 48 48"
|
||||
{...props}
|
||||
>
|
||||
<defs>
|
||||
<mask id="ipSTag0">
|
||||
<g fill="none" strokeLinejoin="round" strokeWidth="4">
|
||||
<path
|
||||
fill="#fff"
|
||||
stroke="#fff"
|
||||
d="M8 44V6a2 2 0 0 1 2-2h28a2 2 0 0 1 2 2v38l-16-8.273z"
|
||||
/>
|
||||
<path stroke="#000" strokeLinecap="round" d="M16 18h16" />
|
||||
</g>
|
||||
</mask>
|
||||
</defs>
|
||||
<path fill="currentColor" d="M0 0h48v48H0z" mask="url(#ipSTag0)" />
|
||||
</svg>
|
||||
);
|
||||
|
|
@ -8,10 +8,10 @@ export default function BannerHumas() {
|
|||
<img
|
||||
src="headerbanner1.png"
|
||||
alt="humasbanner"
|
||||
className="w-full relative h-[33vh] lg:h-[95vh] object-cover"
|
||||
className="w-full relative h-[78vh] lg:h-[95vh] object-cover"
|
||||
/>
|
||||
<div className="absolute lg:mt-[50px] top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 text-center w-full lg:w-[75%]">
|
||||
<p className="lg:text-[42px] lg:leading-10 font-bold pb-1 md:pb-5">
|
||||
<p className="text-[30px] lg:text-[42px] lg:leading-10 font-bold pb-1 md:pb-5">
|
||||
{t("jumbotron")}
|
||||
</p>
|
||||
<p className="text-xs md:text-medium">{`"${t("phrase")}"`}</p>
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ export default function ENewsPolri() {
|
|||
const req = { page: 1, search: "", limit: "10" };
|
||||
|
||||
const response = await getListArticle(req);
|
||||
console.log("res", response?.data?.data);
|
||||
setArticle(response?.data?.data);
|
||||
}
|
||||
getArticle();
|
||||
|
|
@ -38,10 +37,6 @@ export default function ENewsPolri() {
|
|||
<Swiper
|
||||
centeredSlides={false}
|
||||
spaceBetween={10}
|
||||
autoplay={{
|
||||
delay: 5000,
|
||||
disableOnInteraction: false,
|
||||
}}
|
||||
navigation={true}
|
||||
modules={[Autoplay, Navigation]}
|
||||
className="mySwiper"
|
||||
|
|
@ -52,6 +47,22 @@ export default function ENewsPolri() {
|
|||
slidesPerView: 3, // Set slidesPerView to 1 on mobile
|
||||
},
|
||||
}}
|
||||
onSwiper={(swiper) => {
|
||||
swiper.navigation.nextEl?.classList.add(
|
||||
"bg-white/70",
|
||||
"!text-black",
|
||||
"rounded-full",
|
||||
"!w-[40px]",
|
||||
"!h-[40px]"
|
||||
);
|
||||
swiper.navigation.prevEl?.classList.add(
|
||||
"bg-white/70",
|
||||
"!text-black",
|
||||
"rounded-full",
|
||||
"!w-[40px]",
|
||||
"!h-[40px]"
|
||||
);
|
||||
}}
|
||||
>
|
||||
{article?.map((newsItem: any) => (
|
||||
<SwiperSlide key={newsItem.id}>
|
||||
|
|
@ -68,14 +79,17 @@ export default function ENewsPolri() {
|
|||
{textEllipsis(newsItem.title, 40)}
|
||||
</p>
|
||||
</Link>
|
||||
<p className="py-[2px] text-left text-sm">
|
||||
<div className="flex flex-row gap-1">
|
||||
{" "}
|
||||
<p className="py-[2px] text-left text-xs">
|
||||
{convertDateFormat(newsItem.createdAt)} WIB
|
||||
</p>
|
||||
<p className="flex items-center gap-1 text-sm">
|
||||
<p className="flex items-center gap-1 text-xs">
|
||||
<EyeIcon className="text-white" />
|
||||
{newsItem.viewCount === null ? 0 : newsItem.viewCount}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</CardFooter>
|
||||
</Card>
|
||||
</SwiperSlide>
|
||||
|
|
|
|||
|
|
@ -1,13 +1,18 @@
|
|||
"use client";
|
||||
import { Button, Card, CardFooter, ScrollShadow } from "@nextui-org/react";
|
||||
import {
|
||||
Button,
|
||||
Card,
|
||||
CardFooter,
|
||||
CircularProgress,
|
||||
ScrollShadow,
|
||||
} from "@nextui-org/react";
|
||||
import Image from "next/image";
|
||||
import { EyeIcon } from "../icons";
|
||||
import { Swiper, SwiperSlide } from "swiper/react";
|
||||
import { ChevronLeftIcon, ChevronRightIcon, EyeIcon } from "../icons";
|
||||
import { Swiper, SwiperSlide, useSwiper } from "swiper/react";
|
||||
import "swiper/css";
|
||||
import "swiper/css/pagination";
|
||||
import "swiper/css/effect-fade";
|
||||
import "swiper/css/navigation";
|
||||
import { Autoplay, Pagination, Navigation } from "swiper/modules";
|
||||
|
||||
import { Autoplay, Pagination, Navigation, Controller } from "swiper/modules";
|
||||
import Link from "next/link";
|
||||
import GPRKominfo from "../ui/social-media/gpr-kominfo";
|
||||
import { useEffect, useState } from "react";
|
||||
|
|
@ -15,6 +20,8 @@ import { getListArticle } from "@/service/article";
|
|||
import { convertDateFormat, textEllipsis } from "@/utils/global";
|
||||
import { useTranslations } from "next-intl";
|
||||
import { data } from "autoprefixer";
|
||||
import { Controller as FormController } from "react-hook-form";
|
||||
import { Nabla } from "next/font/google";
|
||||
|
||||
export default function HeaderNews() {
|
||||
const [article, setArticle] = useState<any>([]);
|
||||
|
|
@ -30,8 +37,9 @@ export default function HeaderNews() {
|
|||
}, []);
|
||||
|
||||
return (
|
||||
<div className="flex flex-col lg:flex-row gap-3 bg-white p-1 lg:p-8 lg:h-[70vh]">
|
||||
<div className="flex flex-col lg:flex-row gap-3 lg:gap-8 bg-white p-1 lg:p-8 lg:h-[70vh]">
|
||||
<div className="lg:hidden w-full h-full">
|
||||
{article ? (
|
||||
<Swiper
|
||||
centeredSlides={true}
|
||||
autoplay={{
|
||||
|
|
@ -39,8 +47,24 @@ export default function HeaderNews() {
|
|||
disableOnInteraction: false,
|
||||
}}
|
||||
navigation={true}
|
||||
modules={[Navigation]}
|
||||
className="mySwiper"
|
||||
modules={[Autoplay, Controller, Navigation]}
|
||||
onSwiper={(swiper) => {
|
||||
swiper.navigation.nextEl?.classList.add(
|
||||
"bg-white/70",
|
||||
"!text-black",
|
||||
"rounded-full",
|
||||
"!w-[24px]",
|
||||
"!h-[24px]"
|
||||
);
|
||||
swiper.navigation.prevEl?.classList.add(
|
||||
"bg-white/70",
|
||||
"!text-black",
|
||||
"rounded-full",
|
||||
"!w-[24px]",
|
||||
"!h-[24px]"
|
||||
);
|
||||
}}
|
||||
>
|
||||
{article?.map((newsItem: any) => (
|
||||
<SwiperSlide key={newsItem.id}>
|
||||
|
|
@ -50,9 +74,12 @@ export default function HeaderNews() {
|
|||
src="/headernews.png"
|
||||
className="h-[25vh] object-cover"
|
||||
/>
|
||||
|
||||
<CardFooter className="before:bg-white/10 border-white/20 border-1 overflow-hidden py-1 md:absolute before:rounded-xl rounded-large bottom-1 w-[calc(100%_-_8px)] shadow-small ml-1 z-10">
|
||||
<div className="text-black dark:text-white">
|
||||
<Link href={`news/detail/${newsItem.id}-${newsItem?.slug}`}>
|
||||
<Link
|
||||
href={`news/detail/${newsItem.id}-${newsItem?.slug}`}
|
||||
>
|
||||
<p className="text-left font-semibold">
|
||||
{textEllipsis(newsItem.title, 40)}
|
||||
</p>
|
||||
|
|
@ -70,6 +97,9 @@ export default function HeaderNews() {
|
|||
</SwiperSlide>
|
||||
))}
|
||||
</Swiper>
|
||||
) : (
|
||||
<CircularProgress aria-label="Loading..." size="lg" />
|
||||
)}
|
||||
</div>
|
||||
<div className="w-auto lg:w-[25%] p-2 dark:bg-stone-800 bg-[#f0f0f0] shadow-lg dark:text-white text-black rounded-xl mb-2 md:mb-0 h-[50vh] lg:h-[67vh]">
|
||||
<p className="text-lg font-bold h-10 text-center dark:text-white text-black">
|
||||
|
|
@ -84,7 +114,7 @@ export default function HeaderNews() {
|
|||
<img
|
||||
alt="headernews"
|
||||
src="/headernews.png"
|
||||
className="object-cover w-[18%]"
|
||||
className="object-cover w-[18%] rounded-md"
|
||||
/>
|
||||
<div>
|
||||
<Link
|
||||
|
|
@ -101,22 +131,23 @@ export default function HeaderNews() {
|
|||
>
|
||||
{data.title}{" "}
|
||||
</Link>
|
||||
|
||||
<div className="flex flex-row gap-2 text-[10px]">
|
||||
<p className="py-[2px]">
|
||||
{convertDateFormat(data.createdAt)} WIB
|
||||
</p>
|
||||
<p className="flex items-center gap-1">
|
||||
<EyeIcon />
|
||||
<EyeIcon size={14} />
|
||||
{data.viewCount === null ? 0 : data.viewCount}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</ScrollShadow>
|
||||
<div className="m-2">
|
||||
<Link href="/news/all">
|
||||
<Button
|
||||
className="w-full bg-[#DD8306] text-white font-bold rounded-bl-md rounded-br-md focus:outline-none"
|
||||
className="w-full bg-[#DD8306] text-white font-bold rounded-md focus:outline-none"
|
||||
radius="none"
|
||||
>
|
||||
{t("semua")}
|
||||
|
|
@ -126,34 +157,56 @@ export default function HeaderNews() {
|
|||
</div>
|
||||
|
||||
<div className="hidden lg:block w-full lg:w-[50%] h-[67vh]">
|
||||
{article ? (
|
||||
<Swiper
|
||||
centeredSlides={true}
|
||||
autoplay={{
|
||||
delay: 5000,
|
||||
disableOnInteraction: false,
|
||||
}}
|
||||
navigation={true}
|
||||
modules={[Autoplay, Navigation]}
|
||||
modules={[Autoplay, Controller, Navigation]}
|
||||
className="mySwiper"
|
||||
onSwiper={(swiper) => {
|
||||
swiper.navigation.nextEl?.classList.add(
|
||||
"bg-white/70",
|
||||
"!text-black",
|
||||
"rounded-full",
|
||||
"!w-[48px]",
|
||||
"!h-[48px]"
|
||||
);
|
||||
swiper.navigation.prevEl?.classList.add(
|
||||
"bg-white/70",
|
||||
"!text-black",
|
||||
"rounded-full",
|
||||
"!w-[48px]",
|
||||
"!h-[48px]"
|
||||
);
|
||||
}}
|
||||
>
|
||||
{article?.map((newsItem: any) => (
|
||||
<SwiperSlide key={newsItem.id} className="h-[67vh]">
|
||||
<Card
|
||||
isFooterBlurred
|
||||
radius="lg"
|
||||
className="border-none h-[67vh]"
|
||||
className="border-none h-[67vh] shadow-none"
|
||||
>
|
||||
<img
|
||||
alt="headernews"
|
||||
src="/headernews.png"
|
||||
className="w-full h-[67vh] object-cover"
|
||||
className="w-full h-[67vh] object-cover rounded-lg"
|
||||
/>
|
||||
<CardFooter className="before:bg-white/10 border-white/20 border-1 overflow-hidden py-1 md:absolute before:rounded-xl rounded-large bottom-1 w-[calc(100%_-_8px)] shadow-small ml-1 z-10">
|
||||
|
||||
<CardFooter className="mb-1 max-h-[20vh] before:bg-white/10 border-white/20 border-1 overflow-hidden py-1 md:absolute before:rounded-xl rounded-large bottom-1 w-[calc(100%_-_8px)] shadow-small ml-1 z-10">
|
||||
<div className="text-white">
|
||||
<Link href={`news/detail/${newsItem.id}-${newsItem?.slug}`}>
|
||||
<p className="text-left font-semibold">
|
||||
<Link
|
||||
href={`news/detail/${newsItem.id}-${newsItem?.slug}`}
|
||||
>
|
||||
<p className="text-left font-semibold text-2xl">
|
||||
{newsItem.title}
|
||||
</p>
|
||||
</Link>
|
||||
<div className="flex flex-row gap-1">
|
||||
<p className="py-[2px] text-left text-sm">
|
||||
{convertDateFormat(newsItem.createdAt)} WIB
|
||||
</p>
|
||||
|
|
@ -162,11 +215,15 @@ export default function HeaderNews() {
|
|||
{newsItem.viewCount === null ? 0 : newsItem.viewCount}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</CardFooter>
|
||||
</Card>
|
||||
</SwiperSlide>
|
||||
))}
|
||||
</Swiper>
|
||||
) : (
|
||||
<CircularProgress aria-label="Loading..." size="lg" />
|
||||
)}
|
||||
</div>
|
||||
<div className="lg:w-[25%] rounded-md text-white dark:text-black ">
|
||||
<GPRKominfo />
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ export default function NewsTicker() {
|
|||
}`}
|
||||
>
|
||||
<Link
|
||||
href={`news/detail/${article[currentNewsIndex]?.id}`}
|
||||
href={`news/detail/${article[currentNewsIndex]?.id}-${article[currentNewsIndex]?.slug}`}
|
||||
className="hidden lg:block"
|
||||
>
|
||||
<p className="text-sm lg:text-base">
|
||||
|
|
@ -65,7 +65,7 @@ export default function NewsTicker() {
|
|||
</p>
|
||||
</Link>
|
||||
<Link
|
||||
href={`news/detail/${article[currentNewsIndex]?.id}`}
|
||||
href={`news/detail/${article[currentNewsIndex]?.id}-${article[currentNewsIndex]?.slug}`}
|
||||
className="lg:hidden"
|
||||
>
|
||||
<p className="text-sm lg:text-base">
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ import Link from "next/link";
|
|||
import { useTranslations } from "next-intl";
|
||||
|
||||
export default function RegionalNews() {
|
||||
const [limitedData, setLimitedData] = useState<any>([]);
|
||||
const { isOpen, onOpen, onOpenChange } = useDisclosure();
|
||||
const [scrollBehavior, setScrollBehavior] =
|
||||
React.useState<ModalProps["scrollBehavior"]>("inside");
|
||||
|
|
@ -54,6 +53,12 @@ export default function RegionalNews() {
|
|||
title: "Polda Jawa Timur",
|
||||
path: "news/polda-jatim",
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
img: "/assets/polda/polda-jawa-barat.svg",
|
||||
title: "Polda Jawa Barat",
|
||||
path: "/news/polda-jawa-barat",
|
||||
},
|
||||
];
|
||||
|
||||
const listPoldaAll = [
|
||||
|
|
@ -305,7 +310,7 @@ export default function RegionalNews() {
|
|||
{/* <div>
|
||||
<ChevronLeftWhite color="orange" />
|
||||
</div> */}
|
||||
<div className="gap-2 md:gap-4 lg:gap-6 grid grid-cols-2 md:grid-cols-3 lg:grid-cols-5">
|
||||
<div className="gap-2 md:gap-4 lg:gap-6 grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6">
|
||||
{listPolda.map((item: any, index: any) => (
|
||||
<Link href={item.path} key={item.path}>
|
||||
<div
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ export default function SidebarNav() {
|
|||
<Link href={`news/detail/${list?.id}`}>
|
||||
<p className="text-left font-semibold">{list?.title}</p>
|
||||
</Link>
|
||||
<div className="flex flex-row gap-1">
|
||||
<p className="py-[2px] text-left text-xs">
|
||||
{convertDateFormat(list?.createdAt)} WIB
|
||||
</p>
|
||||
|
|
@ -66,10 +67,11 @@ export default function SidebarNav() {
|
|||
{list?.viewCount === null ? 0 : list?.viewCount}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</ScrollShadow>
|
||||
<Button
|
||||
className="w-full bg-[#DD8306] text-white font-bold rounded-bl-md rounded-br-md focus:outline-none"
|
||||
className="w-full bg-[#DD8306] text-white font-bold rounded-md focus:outline-none"
|
||||
radius="none"
|
||||
>
|
||||
Lihat Semua
|
||||
|
|
|
|||
|
|
@ -27,9 +27,9 @@ export const AdminLayout = ({ children }: Props) => {
|
|||
|
||||
return (
|
||||
<SidebarProvider>
|
||||
<div className="h-screen flex items-center flex-row p-1 md:p-4">
|
||||
<div className="h-screen flex items-center flex-row">
|
||||
<Sidebar sidebarData={isOpen} updateSidebarData={updateSidebarData} />
|
||||
<div className={`w-full h-full flex flex-col gap-4`}>
|
||||
<div className={`w-full h-full flex flex-col`}>
|
||||
<Breadcrumb />
|
||||
{children}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -13,10 +13,16 @@ import {
|
|||
FormVerticalIcon,
|
||||
} from "../../icons";
|
||||
import {
|
||||
ArticleIcon,
|
||||
DashboardIcon,
|
||||
HomeIcon,
|
||||
InfoCircleIcon,
|
||||
MagazineIcon,
|
||||
MasterCategoryIcon,
|
||||
MasterRoleIcon,
|
||||
MasterUsersIcon,
|
||||
MinusCircleIcon,
|
||||
StaticPageIcon,
|
||||
TableIcon,
|
||||
} from "../../icons/sidebar-icon";
|
||||
import { ThemeSwitch } from "../../theme-switch";
|
||||
|
|
@ -100,7 +106,21 @@ const sideBarDummyData = [
|
|||
moduleName: "Dashboard",
|
||||
modulePathUrl: "/admin/article",
|
||||
parentId: -1,
|
||||
icon: <TableIcon />,
|
||||
icon: <ArticleIcon size={24} />,
|
||||
position: 1,
|
||||
statusId: 1,
|
||||
childMenu: [],
|
||||
statusName: "Active",
|
||||
childModule: null,
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: "Majalah",
|
||||
moduleId: 652,
|
||||
moduleName: "Apps",
|
||||
modulePathUrl: "/admin/magazine",
|
||||
parentId: -1,
|
||||
icon: <MagazineIcon />,
|
||||
position: 1,
|
||||
statusId: 1,
|
||||
childMenu: [],
|
||||
|
|
@ -114,7 +134,7 @@ const sideBarDummyData = [
|
|||
moduleName: "Dashboard",
|
||||
modulePathUrl: "/admin/static-page",
|
||||
parentId: -1,
|
||||
icon: <FormValidationIcon />,
|
||||
icon: <StaticPageIcon />,
|
||||
position: 1,
|
||||
statusId: 1,
|
||||
childMenu: [],
|
||||
|
|
@ -178,6 +198,20 @@ const sideBarDummyData = [
|
|||
// statusName: "Active",
|
||||
// childModule: null,
|
||||
// },
|
||||
{
|
||||
id: 30,
|
||||
name: "Master Category",
|
||||
moduleId: 654,
|
||||
moduleName: "Master",
|
||||
modulePathUrl: "/admin/master-category",
|
||||
parentId: -1,
|
||||
icon: <MasterCategoryIcon />,
|
||||
position: 1,
|
||||
statusId: 1,
|
||||
childMenu: [],
|
||||
statusName: "Active",
|
||||
childModule: null,
|
||||
},
|
||||
{
|
||||
id: 8,
|
||||
name: "Master User",
|
||||
|
|
@ -185,7 +219,7 @@ const sideBarDummyData = [
|
|||
moduleName: "Form Vertical",
|
||||
modulePathUrl: "/admin/master-user",
|
||||
parentId: -1,
|
||||
icon: <FormVerticalIcon />,
|
||||
icon: <MasterUsersIcon />,
|
||||
position: 1,
|
||||
statusId: 1,
|
||||
childMenu: [],
|
||||
|
|
@ -200,7 +234,7 @@ const sideBarDummyData = [
|
|||
moduleName: "Form Validation",
|
||||
modulePathUrl: "/admin/master-role",
|
||||
parentId: -1,
|
||||
icon: <FormValidationIcon />,
|
||||
icon: <MasterRoleIcon />,
|
||||
position: 1,
|
||||
statusId: 1,
|
||||
childMenu: [],
|
||||
|
|
@ -237,12 +271,12 @@ const Sidebar: React.FC<SidebarProps> = ({ updateSidebarData }) => {
|
|||
return (
|
||||
<div
|
||||
className={`hidden md:flex h-full flex-grow ${
|
||||
isOpen ? "min-w-[290px]" : "min-w-[80px]"
|
||||
isOpen ? "min-w-[240px]" : "min-w-[80px]"
|
||||
}`}
|
||||
>
|
||||
<div
|
||||
className={` flex h-full flex-col rounded-lg p-4 mb-0 bg-gray-100 dark:bg-stone-950 z-40 transition-width !ease-in-out justify-between ${
|
||||
isOpen ? "w-[288px]" : "w-[80px]"
|
||||
className={` flex h-full flex-col rounded-lg p-4 mb-0 bg-gray-100 dark:bg-stone-900 z-40 transition-width !ease-in-out justify-between ${
|
||||
isOpen ? "w-[238px]" : "w-[80px]"
|
||||
}`}
|
||||
>
|
||||
<div>
|
||||
|
|
@ -302,10 +336,10 @@ const Sidebar: React.FC<SidebarProps> = ({ updateSidebarData }) => {
|
|||
}`}
|
||||
> */}
|
||||
<div
|
||||
className={`px-3.5 py-2 mr-4 rounded-lg hover:bg-[#f07c00] hover:text-white dark:hover:text-white flex flex-row gap-2 ${
|
||||
className={`px-3.5 py-2 mr-4 rounded-lg flex flex-row gap-2 ${
|
||||
pathname.includes(list.modulePathUrl)
|
||||
? "bg-[#f07c00] dark:bg-[#c46602] text-white font-bold"
|
||||
: "text-zinc-600 dark:text-zinc-400"
|
||||
? "bg-black dark:bg-white text-white dark:text-black font-bold"
|
||||
: "text-black dark:text-white hover:bg-stone-900 hover:text-white dark:hover:bg-gray-200 dark:hover:text-black"
|
||||
}`}
|
||||
>
|
||||
{list.icon} {isOpen && list.name}
|
||||
|
|
|
|||
|
|
@ -86,9 +86,13 @@ export default function ListNews() {
|
|||
key={news?.id}
|
||||
>
|
||||
<div className="">
|
||||
<img src="/headernews.png" alt="thumbnail" />
|
||||
<img
|
||||
src="/headernews.png"
|
||||
alt="thumbnail"
|
||||
className="rounded-md"
|
||||
/>
|
||||
</div>
|
||||
<div className="p-2 lg:p-5 bg-[#f0f0f0] h-[220px]">
|
||||
<div className="p-2 lg:p-5 bg-[#f0f0f0] rounded-md">
|
||||
<div className="font-semibold text-lg">{news?.title}</div>
|
||||
<div className="flex flex-row items-center py-1 text-xs gap-2">
|
||||
<div className="flex flex-row items-center gap-1">
|
||||
|
|
|
|||
|
|
@ -91,6 +91,16 @@ export default function DetailNews(props: { data: any; listArticle: any }) {
|
|||
setNextArticle(nextString);
|
||||
}
|
||||
}, [data, listArticle]);
|
||||
|
||||
function removeImgTags(htmlString?: { __html: string }) {
|
||||
const parser = new DOMParser();
|
||||
const doc = parser.parseFromString(String(htmlString?.__html), "text/html");
|
||||
|
||||
const images = doc.querySelectorAll("img");
|
||||
images.forEach((img) => img.remove());
|
||||
|
||||
return { __html: doc.body.innerHTML };
|
||||
}
|
||||
return (
|
||||
<div className="flex flex-col gap-2 py-4">
|
||||
<p className="font-semibold text-xl lg:text-3xl">{data?.title}</p>
|
||||
|
|
@ -130,7 +140,9 @@ export default function DetailNews(props: { data: any; listArticle: any }) {
|
|||
/>
|
||||
</div>
|
||||
<div
|
||||
dangerouslySetInnerHTML={formatTextToHtmlTag(data?.htmlDescription)}
|
||||
dangerouslySetInnerHTML={removeImgTags(
|
||||
formatTextToHtmlTag(data?.htmlDescription)
|
||||
)}
|
||||
className="text-sm lg:text-xl lg:leading-8"
|
||||
/>
|
||||
|
||||
|
|
|
|||
|
|
@ -32,15 +32,11 @@ export default function RelatedNews() {
|
|||
<UnderLine />
|
||||
</div>
|
||||
</div>
|
||||
<div className="w-[90vw] lg:w-full bg-[#f0f0f0]">
|
||||
<div className="w-[90vw] lg:w-full">
|
||||
<div>
|
||||
<Swiper
|
||||
centeredSlides={false}
|
||||
spaceBetween={10}
|
||||
autoplay={{
|
||||
delay: 5000,
|
||||
disableOnInteraction: false,
|
||||
}}
|
||||
navigation={true}
|
||||
modules={[Autoplay, Navigation]}
|
||||
className="mySwiper"
|
||||
|
|
@ -51,6 +47,22 @@ export default function RelatedNews() {
|
|||
slidesPerView: 4, // Set slidesPerView to 1 on mobile
|
||||
},
|
||||
}}
|
||||
onSwiper={(swiper) => {
|
||||
swiper.navigation.nextEl?.classList.add(
|
||||
"bg-white/70",
|
||||
"!text-black",
|
||||
"rounded-full",
|
||||
"!w-[40px]",
|
||||
"!h-[40px]"
|
||||
);
|
||||
swiper.navigation.prevEl?.classList.add(
|
||||
"bg-white/70",
|
||||
"!text-black",
|
||||
"rounded-full",
|
||||
"!w-[40px]",
|
||||
"!h-[40px]"
|
||||
);
|
||||
}}
|
||||
>
|
||||
{article?.map((newsItem: any) => (
|
||||
<SwiperSlide key={newsItem.id}>
|
||||
|
|
@ -65,11 +77,11 @@ export default function RelatedNews() {
|
|||
<Link
|
||||
href={`/news/detail/${newsItem.id}-${newsItem.slug}`}
|
||||
>
|
||||
<p className="text-left font-semibold text-sm">
|
||||
{textEllipsis(newsItem.title, 40)}
|
||||
<p className="text-left font-bold text-sm">
|
||||
{textEllipsis(newsItem.title, 33)}
|
||||
</p>
|
||||
</Link>
|
||||
<p className="py-[2px] text-left text-sm">
|
||||
<p className="py-[2px] text-left text-xs">
|
||||
{convertDateFormat(newsItem.createdAt)} WIB
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -53,16 +53,16 @@ export default function SidebarDetail() {
|
|||
>
|
||||
{article?.map((newsItem: any) => (
|
||||
<SwiperSlide key={newsItem.id}>
|
||||
<div className="h-[230px] lg:h-[180px] flex flex-col gap-2 bg-gray-50 dark:bg-stone-900 p-5">
|
||||
<div className="h-[230px] lg:h-[180px] flex flex-col gap-2 bg-gray-50 dark:bg-stone-900 p-5 rounded-lg">
|
||||
<img
|
||||
alt="headernews"
|
||||
src="/headernews.png"
|
||||
className="object-cover !h-[70%]"
|
||||
className="object-cover !h-[70%] rounded-lg"
|
||||
/>
|
||||
<div className="text-black dark:text-white flex flex-col">
|
||||
<Link href={`/news/detail/${newsItem.id}-${newsItem.slug}`}>
|
||||
<p className="text-left font-semibold text-xs">
|
||||
{textEllipsis(newsItem.title, 40)}
|
||||
<p className="text-left font-bold text-sm">
|
||||
{textEllipsis(newsItem.title, 30)}
|
||||
</p>
|
||||
</Link>
|
||||
<p className="py-[2px] text-left text-xs">
|
||||
|
|
@ -103,11 +103,11 @@ export default function SidebarDetail() {
|
|||
>
|
||||
{article?.map((newsItem: any) => (
|
||||
<SwiperSlide key={newsItem.id}>
|
||||
<div className="h-[230px] lg:h-[180px] flex flex-col gap-2 bg-gray-50 dark:bg-stone-900 p-5">
|
||||
<div className="h-[230px] lg:h-[180px] flex flex-col gap-2 bg-gray-50 dark:bg-stone-900 p-5 rounded-lg">
|
||||
<img
|
||||
alt="headernews"
|
||||
src="/headernews.png"
|
||||
className="object-cover !h-[70%]"
|
||||
className="object-cover !h-[70%] rounded-lg"
|
||||
/>
|
||||
<div className="text-black dark:text-white flex flex-col">
|
||||
<Link href={`/news/detail/${newsItem.id}-${newsItem.slug}`}>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,11 @@ import {
|
|||
SearchIcon,
|
||||
} from "@/components/icons";
|
||||
import { error, success } from "@/config/swal";
|
||||
import { deleteArticle, getListArticle } from "@/service/article";
|
||||
import {
|
||||
deleteArticle,
|
||||
getArticleByCategory,
|
||||
getListArticle,
|
||||
} from "@/service/article";
|
||||
import { Article } from "@/types/globals";
|
||||
import { convertDateFormat } from "@/utils/global";
|
||||
import { Button } from "@nextui-org/button";
|
||||
|
|
@ -58,6 +62,8 @@ export default function ArticleTable() {
|
|||
const [article, setArticle] = useState<ArticleData[]>([]);
|
||||
const [showData, setShowData] = useState("10");
|
||||
const [search, setSearch] = useState("");
|
||||
const [categories, setCategoies] = useState<any>([]);
|
||||
const [selectedCategories, setSelectedCategories] = useState<any>([]);
|
||||
const [startDateValue, setStartDateValue] = useState({
|
||||
startDate: null,
|
||||
endDate: null,
|
||||
|
|
@ -67,6 +73,17 @@ export default function ArticleTable() {
|
|||
initState();
|
||||
}, [page, showData, startDateValue]);
|
||||
|
||||
useEffect(() => {
|
||||
getCategories();
|
||||
}, []);
|
||||
|
||||
async function getCategories() {
|
||||
const res = await getArticleByCategory();
|
||||
const data = res?.data?.data;
|
||||
console.log("datass", res?.data?.data);
|
||||
setCategoies(data);
|
||||
}
|
||||
|
||||
async function initState() {
|
||||
const req = {
|
||||
limit: showData,
|
||||
|
|
@ -105,7 +122,8 @@ export default function ArticleTable() {
|
|||
return false;
|
||||
}
|
||||
close();
|
||||
success("Success Deleted");
|
||||
success("Berhasil Hapus");
|
||||
initState();
|
||||
}
|
||||
|
||||
const handleDelete = (id: any) => {
|
||||
|
|
@ -123,19 +141,6 @@ export default function ArticleTable() {
|
|||
});
|
||||
};
|
||||
|
||||
function successSubmit() {
|
||||
MySwal.fire({
|
||||
title: "Sukses",
|
||||
icon: "success",
|
||||
confirmButtonColor: "#3085d6",
|
||||
confirmButtonText: "OK",
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
// initStete();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const renderCell = useCallback((article: ArticleData, columnKey: Key) => {
|
||||
const cellValue = article[columnKey as keyof ArticleData];
|
||||
const statusColorMap: Record<string, ChipProps["color"]> = {
|
||||
|
|
@ -224,7 +229,7 @@ export default function ArticleTable() {
|
|||
<div className="flex flex-col items-start rounded-2xl gap-3">
|
||||
<div className="flex flex-col md:flex-row gap-3 w-full">
|
||||
<div className="flex flex-col gap-1 w-1/3">
|
||||
<p className="font-semibold text-sm">Search</p>
|
||||
<p className="font-semibold text-sm">Pencarian</p>
|
||||
<Input
|
||||
aria-label="Search"
|
||||
classNames={{
|
||||
|
|
@ -242,7 +247,7 @@ export default function ArticleTable() {
|
|||
/>
|
||||
</div>
|
||||
<div className="flex flex-col gap-1 w-[72px]">
|
||||
<p className="font-semibold text-sm">Show</p>
|
||||
<p className="font-semibold text-sm">Data</p>
|
||||
<Select
|
||||
label=""
|
||||
variant="bordered"
|
||||
|
|
@ -250,6 +255,7 @@ export default function ArticleTable() {
|
|||
placeholder="Select"
|
||||
selectedKeys={[showData]}
|
||||
className="w-full"
|
||||
classNames={{ trigger: "border-1" }}
|
||||
onChange={(e) =>
|
||||
e.target.value === "" ? "" : setShowData(e.target.value)
|
||||
}
|
||||
|
|
@ -262,29 +268,33 @@ export default function ArticleTable() {
|
|||
</SelectItem>
|
||||
</Select>
|
||||
</div>
|
||||
<div className="flex flex-col gap-1 w-[170px]">
|
||||
<p className="font-semibold text-sm">Category</p>
|
||||
<div className="flex flex-col gap-1 w-[230px]">
|
||||
<p className="font-semibold text-sm">Kategori</p>
|
||||
<Select
|
||||
label=""
|
||||
variant="bordered"
|
||||
labelPlacement="outside"
|
||||
placeholder="Select"
|
||||
selectedKeys={[showData]}
|
||||
selectionMode="multiple"
|
||||
selectedKeys={[selectedCategories]}
|
||||
className="w-full"
|
||||
onChange={(e) =>
|
||||
e.target.value === "" ? "" : setShowData(e.target.value)
|
||||
}
|
||||
classNames={{ trigger: "border-1" }}
|
||||
onChange={(e) => {
|
||||
e.target.value === ""
|
||||
? ""
|
||||
: setSelectedCategories(e.target.value);
|
||||
console.log("eeess", e.target.value);
|
||||
}}
|
||||
>
|
||||
<SelectItem key="10" value="10">
|
||||
Polda Metro Jaya
|
||||
</SelectItem>
|
||||
<SelectItem key="5" value="5">
|
||||
Polda Sumatera Utara
|
||||
{categories?.map((category: any) => (
|
||||
<SelectItem key={category?.id} value={category?.id}>
|
||||
{category?.title}
|
||||
</SelectItem>
|
||||
))}
|
||||
</Select>
|
||||
</div>
|
||||
<div className="flex flex-col gap-1 w-full md:w-[340px]">
|
||||
<p className="font-semibold text-sm">Date</p>
|
||||
<div className="flex flex-col gap-1 w-full md:w-[240px]">
|
||||
<p className="font-semibold text-sm">Tanggal</p>
|
||||
<Datepicker
|
||||
value={startDateValue}
|
||||
displayFormat="DD/MM/YYYY"
|
||||
|
|
|
|||
|
|
@ -34,10 +34,10 @@ export const Breadcrumb = () => {
|
|||
};
|
||||
|
||||
return (
|
||||
<div className="h-[100px] rounded-lg border-small">
|
||||
<div className="h-[100px] border-b-2">
|
||||
<div className="px-4 md:px-8">
|
||||
<div className="flex flex-row justify-between items-center">
|
||||
<div className="pt-1">
|
||||
<div className="flex flex-row justify-between items-center py-3">
|
||||
<div className="">
|
||||
<p className="text-2xl font-semibold mb-2">
|
||||
{pathnameTransformed[pathnameTransformed.length - 1]}
|
||||
</p>
|
||||
|
|
@ -45,21 +45,22 @@ export const Breadcrumb = () => {
|
|||
underline="active"
|
||||
onAction={(key) => handleAction(key)}
|
||||
>
|
||||
{pathnameTransformed?.map((item, index) => (
|
||||
{pathnameTransformed?.map(
|
||||
(item, index) =>
|
||||
item !== "Admin" && (
|
||||
<BreadcrumbItem
|
||||
key={pathnameSplit[index]}
|
||||
isCurrent={pathnameSplit[index] === currentPage}
|
||||
>
|
||||
{item}
|
||||
</BreadcrumbItem>
|
||||
))}
|
||||
)
|
||||
)}
|
||||
</Breadcrumbs>
|
||||
</div>
|
||||
<div className="pt-2">
|
||||
<FormLayoutIcon width={50} height={50} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -56,6 +56,18 @@
|
|||
object-fit: cover;
|
||||
}
|
||||
|
||||
.swiper-button-next::after,
|
||||
.swiper-button-prev::after {
|
||||
font-size: 28px !important;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.swiper-button-next::after,
|
||||
.swiper-button-prev::after {
|
||||
font-size: 14px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@layer utilities {
|
||||
.clip-path-triangle {
|
||||
clip-path: polygon(0 0, 100% 50%, 0 100%);
|
||||
|
|
|
|||
Loading…
Reference in New Issue