mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-03 15:10:19 +00:00
theme-plog
This commit is contained in:
23
themes/plog/components/BlogPost.js
Normal file
23
themes/plog/components/BlogPost.js
Normal file
@@ -0,0 +1,23 @@
|
||||
|
||||
/**
|
||||
* 博客照片卡牌
|
||||
* @param {*} props
|
||||
* @returns
|
||||
*/
|
||||
const BlogPost = (props) => {
|
||||
const { post, siteInfo } = props
|
||||
const pageThumbnail = post?.pageCoverThumbnail || siteInfo?.pageCover
|
||||
console.log('缩略图', pageThumbnail, siteInfo)
|
||||
return (
|
||||
<article key={post?.id} className='cursor-pointer relative'>
|
||||
{/* eslint-disable-next-line @next/next/no-img-element */}
|
||||
<img src={pageThumbnail} className='aspect-[16/9] w-full h-full object-cover' />
|
||||
<h2 className="text-md absolute left-0 bottom-0 mb-4 ml-4 text-black dark:text-gray-100 text-shadow">
|
||||
{post?.title}
|
||||
</h2>
|
||||
</article>
|
||||
|
||||
)
|
||||
}
|
||||
|
||||
export default BlogPost
|
||||
Reference in New Issue
Block a user