最新文章排序;
输入框底边样式;
目录背景色高度;
夜间模式按钮颜色;
移动端隐藏悬浮Darkmode按钮;
This commit is contained in:
tangly
2021-11-06 11:37:20 +08:00
parent 106dc9820d
commit 46495f9fe6
7 changed files with 24 additions and 22 deletions

View File

@@ -20,14 +20,6 @@ import DarkModeButton from '@/components/DarkModeButton'
* @constructor
*/
const SideBar = ({ tags, currentTag, post, posts, categories, currentCategory }) => {
// 按时间排序
if (posts) {
posts = posts.sort((a, b) => {
const dateA = new Date(a?.lastEditedTime || a.createdTime)
const dateB = new Date(b?.lastEditedTime || b.createdTime)
return dateB - dateA
}).slice(0, 5)
}
return <aside id='sidebar' className='pt-10 bg-white dark:bg-gray-800 w-72 z-10 dark:border-gray-500 border-gray-200 scroll-hidden h-full'>
<section>