From 5f782d8314d836c66b72ed5a872f8cf9d0ccab07 Mon Sep 17 00:00:00 2001 From: emengweb Date: Wed, 18 Oct 2023 11:29:02 +0800 Subject: [PATCH] optimize icon width by url --- themes/nav/components/BlogPostCard.js | 3 ++- themes/nav/components/LogoBar.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/themes/nav/components/BlogPostCard.js b/themes/nav/components/BlogPostCard.js index 0b64cb40..41d654d3 100755 --- a/themes/nav/components/BlogPostCard.js +++ b/themes/nav/components/BlogPostCard.js @@ -7,11 +7,12 @@ import React from 'react' const BlogPostCard = ({ post, className }) => { const router = useRouter() const currentSelected = router.asPath.split('?')[0] === '/' + post.slug + const pageIcon = post.pageIcon.startsWith("http") ? post.pageIcon+"&width=88" : post.pageIcon return (
- +

{post.title}

{post.summary ? post.summary : '暂无简介'}

diff --git a/themes/nav/components/LogoBar.js b/themes/nav/components/LogoBar.js index 771992bf..ffef14ee 100755 --- a/themes/nav/components/LogoBar.js +++ b/themes/nav/components/LogoBar.js @@ -12,6 +12,7 @@ import CONFIG from '../config' export default function LogoBar(props) { const { siteInfo } = props const { pageNavVisible, changePageNavVisible } = useNavGlobal() + // const logo = siteInfo?.icon?.replaceAll("width=400", "width=280") const togglePageNavVisible = () => { changePageNavVisible(!pageNavVisible) @@ -23,7 +24,7 @@ export default function LogoBar(props) {
*/}