2025-02-20 22:20:27 +07:00
|
|
|
import Breadcrumb from '~/components/ui/breadcrumb'
|
2025-02-20 07:01:36 +08:00
|
|
|
import { Card } from '~/components/ui/card'
|
2025-02-20 22:20:27 +07:00
|
|
|
import { Carousel } from '~/components/ui/carousel'
|
|
|
|
|
import IconsSocial from '~/components/ui/icons-social'
|
|
|
|
|
// eslint-disable-next-line no-restricted-imports
|
|
|
|
|
import { BERITA, CONTENT } from '~/pages/news-detail/data'
|
2025-02-20 07:01:36 +08:00
|
|
|
|
|
|
|
|
export const NewsDetailPage = () => {
|
2025-02-20 22:20:27 +07:00
|
|
|
const { title, content, featured, slug, author, date, tags } = CONTENT
|
2025-02-20 07:01:36 +08:00
|
|
|
return (
|
2025-02-20 22:20:27 +07:00
|
|
|
<div className="relative mx-5 sm:mx-10">
|
|
|
|
|
<Card>
|
|
|
|
|
<div className="py-5 sm:px-30">
|
|
|
|
|
<Breadcrumb slug={slug} />
|
|
|
|
|
<h2 className="text-xl font-extrabold text-[#2E2F7C] sm:text-4xl">
|
|
|
|
|
{title}
|
|
|
|
|
</h2>
|
|
|
|
|
|
|
|
|
|
{/* next planing create component for this section */}
|
|
|
|
|
<div className="my-5 flex w-full items-center justify-between align-middle">
|
|
|
|
|
<div className="flex items-center gap-2 align-middle">
|
|
|
|
|
<img
|
|
|
|
|
src={'https://placehold.co/50x50.png'}
|
|
|
|
|
alt={title}
|
|
|
|
|
className="h-12 w-12 rounded-full"
|
|
|
|
|
/>
|
|
|
|
|
<div>
|
|
|
|
|
<h4 className="text-md">{author}</h4>
|
|
|
|
|
<p className="text-sm">
|
|
|
|
|
{date.toJSON().slice(0, 10)} . 5 min read{' '}
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<IconsSocial className="ml-auto"></IconsSocial>
|
|
|
|
|
</div>
|
|
|
|
|
{/* end next planing create component for this section */}
|
|
|
|
|
<div className="w-full bg-amber-200">
|
|
|
|
|
<img
|
|
|
|
|
src={featured}
|
|
|
|
|
alt={title}
|
|
|
|
|
className="object-center"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
2025-02-22 15:15:04 +07:00
|
|
|
<article
|
|
|
|
|
className="prose prose-stone"
|
|
|
|
|
dangerouslySetInnerHTML={{ __html: content }}
|
|
|
|
|
/>
|
2025-02-20 22:20:27 +07:00
|
|
|
<div className="flex items-end justify-between border-b-3 border-b-gray-300 py-4">
|
|
|
|
|
<div className="flex flex-col">
|
|
|
|
|
<p className="mb-2">Share this post</p>
|
2025-02-22 15:15:04 +07:00
|
|
|
<IconsSocial className="a" />
|
2025-02-20 22:20:27 +07:00
|
|
|
</div>
|
|
|
|
|
<div className="flex flex-wrap items-end">
|
|
|
|
|
{tags?.map((tag) => (
|
|
|
|
|
<span
|
|
|
|
|
key={tag}
|
|
|
|
|
className="mx-2 rounded bg-gray-300 p-1"
|
|
|
|
|
>
|
|
|
|
|
{tag}
|
|
|
|
|
</span>
|
|
|
|
|
))}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="mt-5 flex items-center gap-2 align-middle">
|
|
|
|
|
<img
|
|
|
|
|
src={'https://placehold.co/50x50.png'}
|
|
|
|
|
alt={title}
|
|
|
|
|
className="h-12 w-12 rounded-full"
|
|
|
|
|
/>
|
|
|
|
|
<div>
|
|
|
|
|
<h4 className="text-md">{author}</h4>
|
|
|
|
|
<p className="text-sm">Job title, Company name</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</Card>
|
|
|
|
|
|
2025-02-20 07:01:36 +08:00
|
|
|
<Card>
|
2025-02-20 22:20:27 +07:00
|
|
|
<Carousel {...BERITA} />
|
2025-02-20 07:01:36 +08:00
|
|
|
</Card>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
}
|