From 7b88a11db30b11a05617e8a6aa5bba2eed1d2460 Mon Sep 17 00:00:00 2001 From: emengweb Date: Wed, 18 Oct 2023 19:08:49 +0800 Subject: [PATCH] stack card Add Default Image IMG_LAZY_LOAD_PLACEHOLDER --- themes/nav/components/BlogPostCard.js | 3 ++- themes/nav/style.js | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/themes/nav/components/BlogPostCard.js b/themes/nav/components/BlogPostCard.js index 127e2480..2d48f967 100755 --- a/themes/nav/components/BlogPostCard.js +++ b/themes/nav/components/BlogPostCard.js @@ -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 (
diff --git a/themes/nav/style.js b/themes/nav/style.js index 1630a910..9bc0c238 100755 --- a/themes/nav/style.js +++ b/themes/nav/style.js @@ -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;