内存全文索引

This commit is contained in:
tangly1024
2022-03-01 16:45:16 +08:00
parent 1b1e0f9211
commit fa67a6c4ed
3 changed files with 19 additions and 23 deletions

View File

@@ -23,7 +23,7 @@ export const Layout404 = (props) => {
<div
className='md:-mt-20 text-black w-full h-screen text-center justify-center content-center items-center flex flex-col'>
<div className='dark:text-gray-200'>
<h2 className='inline-block border-r-2 border-gray-600 mr-2 px-3 py-2 align-top'><i className='mr-2 fa-spinner animate-spin'/>404</h2>
<h2 className='inline-block border-r-2 border-gray-600 mr-2 px-3 py-2 align-top'><i className='mr-2 fas fa-spinner animate-spin'/>404</h2>
<div className='inline-block text-left h-32 leading-10 items-center'>
<h2 className='m-0 p-0'>页面无法加载即将返回首页</h2>
</div>

View File

@@ -42,10 +42,10 @@ const BlogPostCard = ({ post, showSummary }) => {
</div>
{(!showPreview || showSummary) && <p className='mt-4 mb-24 text-gray-700 dark:text-gray-300 text-sm font-light leading-7'>
{post.summary}
{post.summary && !post.results}
{/* 搜索结果 */}
{post.results && <span className='mt-4 text-gray-700 dark:text-gray-300 text-sm font-light leading-7'>
{post.results.map(r => <span key={r}>...<span dangerouslySetInnerHTML={{ __html: r }}/>...</span>)}
{post.results.map(r => <span key={r}><span dangerouslySetInnerHTML={{ __html: r }}/>...</span>)}
</span>
}