feature: 字数统计调整

This commit is contained in:
tangly1024
2021-12-24 16:44:05 +08:00
parent 4935831e26
commit 13b0c03b4f
2 changed files with 4 additions and 2 deletions

View File

@@ -92,7 +92,7 @@ export default function ArticleDetail ({ post, blockMap, recommendPosts, prev, n
{post.summary}
</h2>
<section className='flex justify-end py-2 pl-1 dark:text-white items-center font-light italic text-sm'>
<section className='flex justify-end py-2 pl-1 text-gray-600 dark:text-gray-400 items-center font-light text-sm'>
<WordCount/>
</section>

View File

@@ -1,3 +1,5 @@
import { faClock, faFileWord } from '@fortawesome/free-solid-svg-icons'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { useEffect } from 'react'
/**
@@ -10,7 +12,7 @@ export default function WordCount () {
})
return <div id='wordCountWrapper' className='hidden'>
本文共<strong id='wordCount'>0</strong><strong id='readTime'>0</strong>
<FontAwesomeIcon icon={faFileWord}/> 本文字数 <strong id='wordCount'>0</strong> &nbsp;|&nbsp; <FontAwesomeIcon icon={faClock}/> 阅读时长 <strong id='readTime'>0</strong>
</div>
}