mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
stack card Add Default Image IMG_LAZY_LOAD_PLACEHOLDER
This commit is contained in:
@@ -7,7 +7,8 @@ import React from 'react'
|
||||
const BlogPostCard = ({ post, className }) => {
|
||||
const router = useRouter()
|
||||
const currentSelected = router.asPath.split('?')[0] === '/' + post.slug
|
||||
const pageIcon = post.pageIcon.indexOf("amazonaws.com")!=-1 ? post.pageIcon+"&width=88" : post.pageIcon
|
||||
let pageIcon = post.pageIcon !== '' ? post.pageIcon : BLOG.IMG_LAZY_LOAD_PLACEHOLDER
|
||||
pageIcon = post.pageIcon.indexOf("amazonaws.com")!=-1 ? post.pageIcon+"&width=88" : post.pageIcon
|
||||
return (
|
||||
<Link href={`${removeHttp(post.slug)}`} target={(checkRemoveHttp(post.slug) ? '_blank' : '_self')} passHref>
|
||||
<div key={post.id} className={`${className} h-full rounded-lg p-4 dark:bg-neutral-800 cursor-pointer bg-white hover:bg-white rounded-2xl dark:hover:bg-gray-800 ${currentSelected ? 'bg-green-50 text-green-500' : ''}`}>
|
||||
|
||||
@@ -84,6 +84,10 @@ const Style = () => {
|
||||
.card:hover {
|
||||
box-shadow: 0 14px 25px rgba(0, 0, 0, 0.16);
|
||||
}
|
||||
.card .stack-entry>img{
|
||||
width:40px;
|
||||
height:40px;
|
||||
}
|
||||
.notion-gallery-grid {
|
||||
padding-left: 4px;
|
||||
padding-right: 4px;
|
||||
|
||||
Reference in New Issue
Block a user