diff --git a/lib/notion/getNotionData.js b/lib/notion/getNotionData.js index 50c84696..11913b2d 100644 --- a/lib/notion/getNotionData.js +++ b/lib/notion/getNotionData.js @@ -215,6 +215,9 @@ async function getPageRecordMapByNotionAPI({ pageId, from }) { // 读取映射 配置 let postCount = 0 + // 获取page作为自定义菜单 + const customNav = getCustomNav({ allPages: collectionData.filter(post => post.type === 'Page' && post.status === 'Published') }) + const allPages = collectionData.filter(post => { if (post.type === 'Post' && post.status === 'Published') { postCount++ @@ -236,7 +239,6 @@ async function getPageRecordMapByNotionAPI({ pageId, from }) { }) } - const customNav = getCustomNav({ allPages }) const categories = getAllCategories({ allPages, categoryOptions, sliceCount: BLOG.PREVIEW_CATEGORY_COUNT }) const tags = getAllTags({ allPages, sliceCount: BLOG.PREVIEW_TAG_COUNT, tagOptions }) const latestPosts = getLatestPosts({ allPages, from, latestPostCount: 5 }) diff --git a/styles/notion.css b/styles/notion.css index c85608a9..92acdb96 100644 --- a/styles/notion.css +++ b/styles/notion.css @@ -1993,3 +1993,7 @@ thead, tbody tr { width:100%; table-layout:fixed; } + +.notion-collection-card{ + @apply dark:hover:text-gray-200 +} \ No newline at end of file diff --git a/themes/fukasawa/config_fuka.js b/themes/fukasawa/config_fuka.js index 777ecf18..a10fe869 100644 --- a/themes/fukasawa/config_fuka.js +++ b/themes/fukasawa/config_fuka.js @@ -4,7 +4,6 @@ const FUKA_CONFIG = { POST_LIST_PREVIEW: false, // 显示文章预览 // 菜单 - MENU_ABOUT: true, // 显示关于 MENU_CATEGORY: true, // 显示分类 MENU_TAG: true, // 显示标签 MENU_ARCHIVE: true, // 显示归档 diff --git a/themes/medium/LayoutArchive.js b/themes/medium/LayoutArchive.js index 2f4abb2a..78c73360 100644 --- a/themes/medium/LayoutArchive.js +++ b/themes/medium/LayoutArchive.js @@ -24,7 +24,7 @@ export const LayoutArchive = props => { }) return ( -
+
{Object.keys(archivePosts).map(archiveTitle => (
{
{/* 移动端顶部菜单 */} -
+
{slotTop} {children}
diff --git a/themes/medium/LayoutCategoryIndex.js b/themes/medium/LayoutCategoryIndex.js index 5dc91f81..745c2c78 100644 --- a/themes/medium/LayoutCategoryIndex.js +++ b/themes/medium/LayoutCategoryIndex.js @@ -6,7 +6,7 @@ export const LayoutCategoryIndex = (props) => { const { categories } = props const { locale } = useGlobal() return -
+
{locale.COMMON.CATEGORY}:
diff --git a/themes/medium/LayoutTagIndex.js b/themes/medium/LayoutTagIndex.js index 2c754495..1667dc63 100644 --- a/themes/medium/LayoutTagIndex.js +++ b/themes/medium/LayoutTagIndex.js @@ -7,7 +7,7 @@ export const LayoutTagIndex = props => { const { locale } = useGlobal() return ( -
+
{locale.COMMON.TAGS}: diff --git a/themes/medium/components/BlogPostCard.js b/themes/medium/components/BlogPostCard.js index 9ad4c46c..7cbadf83 100644 --- a/themes/medium/components/BlogPostCard.js +++ b/themes/medium/components/BlogPostCard.js @@ -15,7 +15,7 @@ const BlogPostCard = ({ post, showSummary }) => { key={post.id} className="animate__animated animate__fadeIn duration-300 mb-6 max-w-7xl border-b dark:border-gray-800 " > -
+
{/* 折叠菜单 */} -
+
-
+
{/* 图标Logo */} diff --git a/themes/medium/config_medium.js b/themes/medium/config_medium.js index 23d6ac52..66fbc948 100644 --- a/themes/medium/config_medium.js +++ b/themes/medium/config_medium.js @@ -9,7 +9,6 @@ const CONFIG_MEDIUM = { POST_DETAIL_TAG: true, // 文章显示标签 // 菜单 - MENU_ABOUT: true, // 显示关于 MENU_CATEGORY: true, // 显示分类 MENU_TAG: true, // 显示标签 MENU_ARCHIVE: true, // 显示归档 diff --git a/themes/next/components/MenuButtonGroup.js b/themes/next/components/MenuButtonGroup.js index b6930e5f..0afb83be 100644 --- a/themes/next/components/MenuButtonGroup.js +++ b/themes/next/components/MenuButtonGroup.js @@ -14,8 +14,7 @@ const MenuButtonGroup = (props) => { { icon: 'fas fa-home', name: locale.NAV.INDEX, to: '/' || '/', show: true }, { icon: 'fas fa-th', name: locale.COMMON.CATEGORY, to: '/category', show: CONFIG_NEXT.MENU_CATEGORY }, { icon: 'fas fa-tag', name: locale.COMMON.TAGS, to: '/tag', show: CONFIG_NEXT.MENU_TAG }, - { icon: 'fas fa-archive', name: locale.NAV.ARCHIVE, to: '/archive', slot: archiveSlot, show: CONFIG_NEXT.MENU_ARCHIVE }, - { icon: 'fas fa-user', name: locale.NAV.ABOUT, to: '/about', show: CONFIG_NEXT.MENU_ABOUT } + { icon: 'fas fa-archive', name: locale.NAV.ARCHIVE, to: '/archive', slot: archiveSlot, show: CONFIG_NEXT.MENU_ARCHIVE } ] let links = [].concat(defaultLinks) if (customNav) { diff --git a/themes/next/config_next.js b/themes/next/config_next.js index 37839b08..1368d436 100644 --- a/themes/next/config_next.js +++ b/themes/next/config_next.js @@ -23,7 +23,6 @@ const CONFIG_NEXT = { MENU_CATEGORY: true, // 显示分类 MENU_TAG: true, // 显示标签 MENU_ARCHIVE: true, // 显示归档 - MENU_ABOUT: false, // 显示关于 MENU_SEARCH: true, // 显示搜索 WIDGET_TO_TOP: true, // 是否显示回顶