heo搜索

This commit is contained in:
tangly1024.com
2023-08-03 19:15:26 +08:00
parent 81938c3e4b
commit 3b96f210fa
2 changed files with 4 additions and 11 deletions

View File

@@ -50,21 +50,12 @@ const BlogPostCard = ({ index, post, showSummary, siteInfo }) => {
</div>
{/* 摘要 */}
{(!showPreview || showSummary) && !post.results && (
{(!showPreview || showSummary) && (
<p className="line-clamp-2 replace my-3 2xl:my-1 text-gray-700 dark:text-gray-300 text-sm font-light leading-tight">
{post.summary}
</p>
)}
{/* 搜索结果 */}
{post.results && (
<p className="line-clamp-2 mt-4 text-gray-700 dark:text-gray-300 text-sm font-light leading-7">
{post.results.map((r, index) => (
<span key={index}>{r}</span>
))}
</p>
)}
<div className="md:flex-nowrap flex-wrap md:justify-start inline-block">
<div>
{' '}

View File

@@ -158,7 +158,9 @@ const LayoutSearch = props => {
<div id='post-outer-wrapper' className='px-5 md:px-0'>
{!currentSearch
? <SearchNav {...props} />
: <div id="posts-wrapper"> {BLOG.POST_LIST_STYLE === 'page' ? <BlogPostListPage {...props} /> : <BlogPostListScroll {...props} />} </div>}
: <div id="posts-wrapper">
{BLOG.POST_LIST_STYLE === 'page' ? <BlogPostListPage {...props} /> : <BlogPostListScroll {...props} />}
</div>}
</div>
</LayoutBase>
)