diff --git a/components/BlogPostCard.js b/components/BlogPostCard.js index cbe94dbd..82a1b5ff 100644 --- a/components/BlogPostCard.js +++ b/components/BlogPostCard.js @@ -1,12 +1,12 @@ import BLOG from '@/blog.config' +import { useGlobal } from '@/lib/global' +import { faAngleRight, faFolder } from '@fortawesome/free-solid-svg-icons' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import Image from 'next/image' import Link from 'next/link' import React from 'react' -import Image from 'next/image' -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' -import { faAngleDoubleRight, faFolder } from '@fortawesome/free-solid-svg-icons' -import TagItemMini from './TagItemMini' import { Code, Collection, CollectionRow, Equation, NotionRenderer } from 'react-notion-x' -import { useGlobal } from '@/lib/global' +import TagItemMini from './TagItemMini' const BlogPostCard = ({ post, showSummary }) => { const { locale } = useGlobal() @@ -17,7 +17,7 @@ const BlogPostCard = ({ post, showSummary }) => {
- + {post.title} @@ -43,7 +43,7 @@ const BlogPostCard = ({ post, showSummary }) => { {post.summary}

} - {showPreview && post?.blockMap &&
+ {showPreview && post?.blockMap &&
{ />
} -
- -
+
- {locale.COMMON.ARTICLE_DETAIL} - + + {locale.COMMON.ARTICLE_DETAIL} +
diff --git a/components/StickyBar.js b/components/StickyBar.js index b52c581b..b54f1d43 100644 --- a/components/StickyBar.js +++ b/components/StickyBar.js @@ -1,3 +1,4 @@ +import BLOG from '@/blog.config' import throttle from 'lodash.throttle' import { useCallback, useEffect } from 'react' @@ -13,6 +14,9 @@ let windowTop = 0 const StickyBar = ({ children }) => { if (!children) return <> const scrollTrigger = useCallback(throttle(() => { + if (BLOG.topNavType === 'normal') { + return + } const scrollS = window.scrollY if (scrollS >= windowTop && scrollS > 10) { const stickyBar = document.querySelector('#sticky-bar') @@ -35,7 +39,7 @@ const StickyBar = ({ children }) => { }, []) return ( -