diff --git a/components/BlogPost.js b/components/BlogPost.js index f8cd86be..e66580ed 100644 --- a/components/BlogPost.js +++ b/components/BlogPost.js @@ -4,11 +4,11 @@ import TagItem from '@/components/TagItem' const BlogPost = ({ post }) => { return (
+ className='inline-block border dark:border-gray-600 my-2 shadow-card w-full md:max-w-md bg-white dark:bg-gray-700 dark:hover:bg-gray-600 overflow-hidden'> {/* 封面图 */} {post.page_cover && post.page_cover.length > 1 && ( - {post.title} + {post.title} )} diff --git a/components/BlogPostMini.js b/components/BlogPostMini.js index 9b155ba2..9955c5b8 100644 --- a/components/BlogPostMini.js +++ b/components/BlogPostMini.js @@ -3,7 +3,7 @@ import BLOG from '@/blog.config' const BlogPostMini = ({ post }) => { return ( + className='md:flex w-full border dark:border-gray-500 my-2 duration-200 transform hover:scale-105 hover:shadow-2xl bg-white dark:bg-gray-800 dark:hover:bg-gray-600'> {/* 封面图 */} {post.page_cover && post.page_cover.length > 1 && ( {post.title} diff --git a/components/Comment.js b/components/Comment.js index 421738a7..3bdfa55c 100644 --- a/components/Comment.js +++ b/components/Comment.js @@ -24,8 +24,8 @@ const CusdisComponent = dynamic( const Comment = ({ frontMatter }) => { const router = useRouter() - return
-
留下评论
+ return
+
留下评论
{/* 评论插件 */} {BLOG.comment.provider === 'gitalk' && ( diff --git a/components/DarkModeButton.js b/components/DarkModeButton.js index 27bbd75e..313c50b9 100644 --- a/components/DarkModeButton.js +++ b/components/DarkModeButton.js @@ -8,10 +8,8 @@ const DarkModeButton = () => { changeTheme(newTheme) localStorage.setItem('theme', newTheme) } - return
- -
+ return
+ +
} export default DarkModeButton diff --git a/components/Footer.js b/components/Footer.js index 2e53a3db..e17bc537 100644 --- a/components/Footer.js +++ b/components/Footer.js @@ -10,16 +10,6 @@ const Footer = ({ fullWidth = true }) => {
- - + {/* */} {/* */} {/* */} - - {/* 右侧内容 */} - - + diff --git a/layouts/DefaultLayout.js b/layouts/DefaultLayout.js index 40900e1c..dbe21327 100644 --- a/layouts/DefaultLayout.js +++ b/layouts/DefaultLayout.js @@ -44,12 +44,12 @@ const DefaultLayout = ({ tags, posts, page, currentTag, ...customMeta }) => { showNext = page * BLOG.postsPerPage < totalPosts } - // 首页隐藏看板娘 useEffect(() => { - const ref = document.getElementById('waifu') - if (ref) { - ref.remove() - } + // 首页隐藏看板娘 + // const ref = document.getElementById('waifu') + // if (ref) { + // ref.remove() + // } window.addEventListener('resize', resizeWindowHideToc) resizeWindowHideToc() return () => { @@ -58,7 +58,11 @@ const DefaultLayout = ({ tags, posts, page, currentTag, ...customMeta }) => { }, []) const resizeWindowHideToc = throttle(() => { - if (window.innerWidth > 1300) { + if (window.innerWidth > 2500) { + changeColumn(5) + } else if (window.innerWidth > 1800) { + changeColumn(4) + } else if (window.innerWidth > 1300) { changeColumn(3) } else if (window.innerWidth < 768) { changeColumn(1) @@ -80,7 +84,7 @@ const DefaultLayout = ({ tags, posts, page, currentTag, ...customMeta }) => {
-
+
{(!page || page === 1) && (
) @@ -110,7 +114,7 @@ const DefaultLayout = ({ tags, posts, page, currentTag, ...customMeta }) => { {/* 文章列表 */}
{/*
*/} -
+
{!postsToShow.length && (

No posts found.

)}