mirror of
https://github.com/Lumither/nocturne.git
synced 2026-10-17 10:26:21 +00:00
fix(frontend/blog) fix compatability
This commit is contained in:
2 files changed
+6
-6
No files matched your search
@@ -17,7 +17,9 @@ function BlogPostCard({ post }: Props) {
|
|||||||
// let last_update = new Date((post as any)['last_update']);
|
// let last_update = new Date((post as any)['last_update']);
|
||||||
let first_update = new Date((post as any)['first_update']);
|
let first_update = new Date((post as any)['first_update']);
|
||||||
let post_id = (post as any)['post_id'];
|
let post_id = (post as any)['post_id'];
|
||||||
let pic_url = (post as any)['pic_url'];
|
let header_img = (post as any)['header_img'];
|
||||||
|
|
||||||
|
console.log(header_img);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
||||||
@@ -28,10 +30,10 @@ function BlogPostCard({ post }: Props) {
|
|||||||
isHoverable
|
isHoverable
|
||||||
>
|
>
|
||||||
|
|
||||||
{ pic_url !== '' && <div className={ `w-full overflow-visible` }>
|
{ header_img !== '' && <div className={ `w-full overflow-visible` }>
|
||||||
<Image
|
<Image
|
||||||
alt={ 'cover picture' }
|
alt={ 'cover picture' }
|
||||||
src={ pic_url }
|
src={ header_img }
|
||||||
className={ `z-20 h-80 w-full object-cover rounded-b-none` }
|
className={ `z-20 h-80 w-full object-cover rounded-b-none` }
|
||||||
style={ {
|
style={ {
|
||||||
'maskImage': 'linear-gradient(black 95%, transparent)',
|
'maskImage': 'linear-gradient(black 95%, transparent)',
|
||||||
@@ -44,7 +46,7 @@ function BlogPostCard({ post }: Props) {
|
|||||||
|
|
||||||
<CardBody className={ `overflow-visible` }>
|
<CardBody className={ `overflow-visible` }>
|
||||||
<div className={ `flex flex-row justify-between` }>
|
<div className={ `flex flex-row justify-between` }>
|
||||||
<div className={ `mx-2 ${ pic_url !== '' ? '-mt-8' : 'mt-2' }` }>
|
<div className={ `mx-2 ${ header_img !== '' ? '-mt-8' : 'mt-2' }` }>
|
||||||
<Chip className={ `mb-2 z-30` } radius={ `sm` } color={ `secondary` }
|
<Chip className={ `mb-2 z-30` } 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>
|
||||||
|
|||||||
@@ -7,5 +7,3 @@ export default async function fetch_posts_list(): Promise<any> {
|
|||||||
}
|
}
|
||||||
return response.data;
|
return response.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Reference in new issue
Block a user