+
{/* 标题 */}
{title}
@@ -24,7 +24,7 @@ const PostSimpleListHorizontal = ({ title, href, posts }) => {
{/* 列表 */}
-
+ )
+}
diff --git a/themes/magzine/config.js b/themes/magzine/config.js
index 201d2a18..f49dc000 100644
--- a/themes/magzine/config.js
+++ b/themes/magzine/config.js
@@ -29,6 +29,13 @@ const CONFIG = {
MAGZINE_POST_DETAIL_CATEGORY: true, // 文章显示分类
MAGZINE_POST_DETAIL_TAG: true, // 文章显示标签
+ // 文章页面联系卡
+ MAGZINE_SOCIAL_CARD: true, // 是否显示右侧,点击加入社群按钮
+ MAGZINE_SOCIAL_CARD_TITLE_1: '交流频道',
+ MAGZINE_SOCIAL_CARD_TITLE_2: '加入社群讨论分享',
+ MAGZINE_SOCIAL_CARD_TITLE_3: '点击加入社群',
+ MAGZINE_SOCIAL_CARD_URL: 'https://docs.tangly1024.com/article/chat-community',
+
// 页脚菜单
MAGZINE_FOOTER_LINKS: [
{
diff --git a/themes/magzine/index.js b/themes/magzine/index.js
index 14b737e1..65ec10cd 100644
--- a/themes/magzine/index.js
+++ b/themes/magzine/index.js
@@ -10,10 +10,9 @@ import Link from 'next/link'
import { useRouter } from 'next/router'
import { createContext, useContext, useEffect, useState } from 'react'
import Announcement from './components/Announcement'
-import ArchiveItem from './components/ArchiveItem'
-import ArticleAround from './components/ArticleAround'
import ArticleInfo from './components/ArticleInfo'
import { ArticleLock } from './components/ArticleLock'
+import BannerFullWidth from './components/BannerFullWidth'
import Catalog from './components/Catalog'
import CategoryGroup from './components/CategoryGroup'
import CategoryItem from './components/CategoryItem'
@@ -21,14 +20,16 @@ import Footer from './components/Footer'
import Header from './components/Header'
import Hero from './components/Hero'
import PostBannerGroupByCategory from './components/PostBannerGroupByCategory'
+import PostGroupArchive from './components/PostGroupArchive'
+import PostGroupLatest from './components/PostGroupLates'
import PostListPage from './components/PostListPage'
import PostListRecommend from './components/PostListRecommend'
import PostListScroll from './components/PostListScroll'
import PostSimpleListHorizontal from './components/PostListSimpleHorizontal'
-import SearchInput from './components/SearchInput'
import TagGroups from './components/TagGroups'
import TagItemMini from './components/TagItemMini'
import TocDrawer from './components/TocDrawer'
+import TouchMeCard from './components/TouchMeCard'
import CONFIG from './config'
import { Style } from './style'
@@ -118,14 +119,20 @@ const LayoutIndex = props => {
* @returns
*/
const LayoutPostList = props => {
+ // 当前筛选的分类或标签
+ const { category, tag } = props
+
return (
- <>
+
+ {/* 一个顶部条 */}
+
{category || tag}
+
{siteConfig('POST_LIST_STYLE') === 'page' ? (
) : (
)}
- >
+
)
}
@@ -135,15 +142,9 @@ const LayoutPostList = props => {
* @returns
*/
const LayoutSlug = props => {
- const { post, prev, next, lock, validPassword } = props
+ const { post, recommendPosts, prev, next, lock, validPassword } = props
const { locale } = useGlobal()
const router = useRouter()
- const slotRight = post?.toc && post?.toc?.length >= 3 && (
-
-
-
- )
- console.log('post-文章', post)
useEffect(() => {
// 404
@@ -165,47 +166,102 @@ const LayoutSlug = props => {
}, [post])
return (
-
- {/* 文章锁 */}
- {lock &&
}
+ <>
+
+ {/* 文章锁 */}
+ {lock &&
}
- {!lock && (
-
- {/* 文章信息 */}
-
+ {!lock && (
+
+ {/* 文章信息 */}
+
- {/* Notion文章主体 */}
-
-
-
+ {/* 文章区块分为三列 */}
+
+
+
+
- {/* 文章底部区域 */}
-
- {/* 分享 */}
-
- {/* 文章分类和标签信息 */}
-
- {siteConfig('MAGZINE_POST_DETAIL_CATEGORY') && post?.category && (
-
- )}
-
- {siteConfig('MAGZINE_POST_DETAIL_TAG') &&
- post?.tagItems?.map(tag => (
-
- ))}
+ {/* Notion文章主体 */}
+
+
+
+ {/* 文章底部区域 */}
+
+ {/* 分享 */}
+
+ {/* 文章分类和标签信息 */}
+
+ {siteConfig('MAGZINE_POST_DETAIL_CATEGORY') &&
+ post?.category && (
+
+ )}
+
+ {siteConfig('MAGZINE_POST_DETAIL_TAG') &&
+ post?.tagItems?.map(tag => (
+
+ ))}
+
+
+ {/* 评论区 */}
+
+
+
+
+
+ {/* meta信息 */}
+
+
+ {/*
+
+ {post?.publishDay}
+
*/}
+
+
+ {post?.lastEditedDay}
+
+
+
+
+
+
+
+
+ {/* 最新文章区块 */}
+
+
+ {/* 文章分类区块 */}
+
+
+
+
+
+
+
+
+ {/* 底部留白 */}
+
- {/* 上一篇下一篇文章 */}
- {post?.type === 'Post' &&
}
- {/* 评论区 */}
-
-
- {/* 移动端目录 */}
-
-
- )}
-
+ {/* 移动端目录 */}
+
+
+ )}
+
+ {/* 广告醒图 */}
+
+ {/* 最新文章区块 */}
+
+ >
)
}
@@ -234,11 +290,10 @@ const LayoutSearch = props => {
}, [])
return (
- <>
+
{/* 搜索导航栏 */}
{locale.NAV.SEARCH}
-
{!currentSearch && (
<>
@@ -257,7 +312,7 @@ const LayoutSearch = props => {
)}
)}
- >
+
)
}
@@ -270,12 +325,12 @@ const LayoutArchive = props => {
const { archivePosts } = props
return (
<>
-
+
{Object.keys(archivePosts)?.map(archiveTitle => (
-
))}
@@ -307,10 +362,10 @@ const LayoutCategoryIndex = props => {
const { categoryOptions } = props
const { locale } = useGlobal()
return (
- <>
+
-
-
+
+ {/* */}
{locale.COMMON.CATEGORY}:
@@ -325,7 +380,7 @@ const LayoutCategoryIndex = props => {
className={
'hover:text-black dark:hover:text-white dark:text-gray-300 dark:hover:bg-gray-600 px-5 cursor-pointer py-2 hover:bg-gray-100'
}>
-
+ {/* */}
{category.name}({category.count})
@@ -333,7 +388,7 @@ const LayoutCategoryIndex = props => {
})}
- >
+
)
}
@@ -346,10 +401,10 @@ const LayoutTagIndex = props => {
const { tagOptions } = props
const { locale } = useGlobal()
return (
- <>
+
-
-
+
+ {/* */}
{locale.COMMON.TAGS}:
@@ -362,7 +417,7 @@ const LayoutTagIndex = props => {
})}
- >
+
)
}