diff --git a/themes/next/components/ArticleDetail.js b/themes/next/components/ArticleDetail.js index bdd677ef..f461b5f7 100644 --- a/themes/next/components/ArticleDetail.js +++ b/themes/next/components/ArticleDetail.js @@ -1,20 +1,20 @@ -import BlogAround from './BlogAround' import Comment from '@/components/Comment' -import RecommendPosts from './RecommendPosts' +import LazyImage from '@/components/LazyImage' +import NotionIcon from '@/components/NotionIcon' +import NotionPage from '@/components/NotionPage' import ShareBar from '@/components/ShareBar' -import TagItem from './TagItem' +import WWAds from '@/components/WWAds' +import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' +import { formatDateFmt } from '@/lib/utils/formatDate' import Link from 'next/link' import { useRouter } from 'next/router' -import ArticleCopyright from './ArticleCopyright' -import WordCount from './WordCount' -import NotionPage from '@/components/NotionPage' import CONFIG from '../config' -import NotionIcon from '@/components/NotionIcon' -import LazyImage from '@/components/LazyImage' -import { formatDateFmt } from '@/lib/utils/formatDate' -import { siteConfig } from '@/lib/config' -import WWAds from '@/components/WWAds' +import ArticleCopyright from './ArticleCopyright' +import BlogAround from './BlogAround' +import RecommendPosts from './RecommendPosts' +import TagItem from './TagItem' +import WordCount from './WordCount' /** * @@ -35,105 +35,135 @@ export default function ArticleDetail(props) { } return ( -
-
- - {showArticleInfo &&
- {/* 头图 */} - {siteConfig('NEXT_POST_HEADER_IMAGE_VISIBLE', null, CONFIG) && post?.type && !post?.type !== 'Page' && post?.pageCover && ( -
- -
- )} - - {/* title */} -
- {siteConfig('POST_TITLE_ICON') && }{post.title} -
- - {/* meta */} -
-
- {post?.type !== 'Page' && (<> - -
- {post?.publishDay} -
- - | {post.lastEditedDay} - -
- - -
- - )} -
- - -
- -
} - - {/* Notion内容主体 */} -
- - {post && ()} - -
- - {showArticleInfo && <> - - {/* 分享 */} - - - {/* 版权声明 */} - {post?.type === 'Post' && } - - {/* 推荐文章 */} - {post?.type === 'Post' && } - -
- {/* 分类 */} - {post.category && <> - - } - - {/* 标签列表 */} - {post?.type === 'Post' && ( - <> - {post.tagItems && ( -
-
- {locale.COMMON.TAGS}:  -
- {post.tagItems.map(tag => ( - - ))} -
- )} - - )} -
- {post?.type === 'Post' && } - } - - {/* 评论互动 */} -
- +
+
+ {showArticleInfo && ( +
+ {/* 头图 */} + {siteConfig('NEXT_POST_HEADER_IMAGE_VISIBLE', null, CONFIG) && + post?.type && + !post?.type !== 'Page' && + post?.pageCover && ( +
+
+ )} + + {/* title */} +
+ {siteConfig('POST_TITLE_ICON') && ( + + )} + {post.title}
+ {/* meta */} +
+
+ {post?.type !== 'Page' && ( + <> + +
+ {' '} + {post?.publishDay} +
+ + + {' '} + | + {post.lastEditedDay}{' '} + + +
+ + +
+ + )} +
+ + +
+
+ )} + + {/* Notion内容主体 */} +
+ + {post && } + +
+ + {showArticleInfo && ( + <> + {/* 分享 */} + + + {/* 版权声明 */} + {post?.type === 'Post' && ( + + )} + + {/* 推荐文章 */} + {post?.type === 'Post' && ( + + )} + +
+ {/* 分类 */} + {post.category && ( + <> + + + )} + + {/* 标签列表 */} + {post?.type === 'Post' && ( + <> + {post.tagItems && ( +
+
+ {locale.COMMON.TAGS}:  +
+ {post.tagItems.map(tag => ( + + ))} +
+ )} + + )} +
+ {post?.type === 'Post' && } + + )} + + {/* 评论互动 */} +
+
+
+
) } diff --git a/themes/next/style.js b/themes/next/style.js index daf6af46..41746f9a 100644 --- a/themes/next/style.js +++ b/themes/next/style.js @@ -5,35 +5,31 @@ * @returns */ const Style = () => { - return + // 菜单下划线动画 + #theme-next .menu-link { + text-decoration: none; + background-image: linear-gradient(#4e80ee, #4e80ee); + background-repeat: no-repeat; + background-position: bottom center; + background-size: 0 2px; + transition: background-size 100ms ease-in-out; + } + #theme-next .menu-link:hover { + background-size: 100% 2px; + color: #4e80ee; + } + `} + ) } export { Style }