mirror of
https://github.com/Lumither/nocturne.git
synced 2026-10-17 10:26:21 +00:00
feat(frontend/blog) even better post card
This commit is contained in:
1 parent
fd4bdb4a6f
commit
a11d859f40
2 files changed
+20
-9
No files matched your search
@@ -23,32 +23,43 @@ function BlogPostCard({ post }: Props) {
|
|||||||
|
|
||||||
<div>
|
<div>
|
||||||
<Card as={ Link } href={ `/blog/post/${ post_id }` }
|
<Card as={ Link } href={ `/blog/post/${ post_id }` }
|
||||||
className={ `mx-7` }
|
className={ `mx-7 group` }
|
||||||
isPressable
|
isPressable
|
||||||
isHoverable
|
isHoverable
|
||||||
>
|
>
|
||||||
|
|
||||||
{ pic_url !== '' && <div className={ `w-full overflow-visible` }>
|
{ pic_url !== '' && <div className={ `w-full overflow-visible` }>
|
||||||
<Image
|
<Image
|
||||||
isZoomed
|
|
||||||
isBlurred
|
|
||||||
alt={ 'cover picture' }
|
alt={ 'cover picture' }
|
||||||
src={ pic_url }
|
src={ pic_url }
|
||||||
className={ `h-80 w-full object-cover` }
|
className={ `z-20 h-80 w-full object-cover rounded-b-none` }
|
||||||
|
style={ {
|
||||||
|
'maskImage': 'linear-gradient(black 95%, transparent)',
|
||||||
|
'backdropFilter': 'blur(20px)'
|
||||||
|
} }
|
||||||
width={ `100%` }
|
width={ `100%` }
|
||||||
|
removeWrapper
|
||||||
></Image>
|
></Image>
|
||||||
</div> }
|
</div> }
|
||||||
|
|
||||||
<CardBody>
|
<CardBody className={ `overflow-visible` }>
|
||||||
<div className={ `flex flex-row justify-between` }>
|
<div className={ `flex flex-row justify-between` }>
|
||||||
<div className={ `mx-2 mt-2` }>
|
<div className={ `mx-2 ${ pic_url !== '' ? '-mt-8' : 'mt-2' }` }>
|
||||||
<Chip className={ `mb-2` } radius={ `sm` } color={ `secondary` }
|
<Chip className={ `mb-2 z-50` } radius={ `sm` } color={ `secondary` }
|
||||||
variant={ `solid` }>{ category }</Chip>
|
variant={ `solid` }>{ category }</Chip>
|
||||||
<p className={ `text-4xl font-bold` }> { title }</p>
|
<p className={ `text-4xl font-bold` }> { title }</p>
|
||||||
<p className={ `text-xl` }> { sub_title }</p>
|
<p className={ `text-xl` }> { sub_title }</p>
|
||||||
</div>
|
</div>
|
||||||
<MdNorthEast className={ `mt-4 mr-2` } size={ `40px` } />
|
<MdNorthEast className={ `mt-1 mr-2` } size={ `40px` } />
|
||||||
</div>
|
</div>
|
||||||
</CardBody>
|
</CardBody>
|
||||||
|
|
||||||
|
{/* <CardBody className={ `transition-all duration-300 hidden group-hover:block` }>
|
||||||
|
<div className={ `mx-2` }>
|
||||||
|
<p>{ summary }</p>
|
||||||
|
</div>
|
||||||
|
</CardBody>*/}
|
||||||
|
|
||||||
<CardFooter>
|
<CardFooter>
|
||||||
<div className={ `flex flex-row flex-wrap justify-between w-full` }>
|
<div className={ `flex flex-row flex-wrap justify-between w-full` }>
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
+1
-1
@@ -17,7 +17,7 @@ export default function RootLayout({
|
|||||||
}>) {
|
}>) {
|
||||||
return (
|
return (
|
||||||
<html lang="en" suppressHydrationWarning>
|
<html lang="en" suppressHydrationWarning>
|
||||||
<body>
|
<body className={`dark:bg-[#282830]`}>
|
||||||
<NextThemesProvider attribute="class" defaultTheme="dark">
|
<NextThemesProvider attribute="class" defaultTheme="dark">
|
||||||
<Navbar />
|
<Navbar />
|
||||||
{ children }
|
{ children }
|
||||||
|
|||||||
Reference in new issue
Block a user