diff --git a/themes/magzine/components/SocialButton.js b/themes/magzine/components/SocialButton.js
index 97aa6824..5ef31889 100644
--- a/themes/magzine/components/SocialButton.js
+++ b/themes/magzine/components/SocialButton.js
@@ -7,14 +7,14 @@ import { siteConfig } from '@/lib/config'
*/
const SocialButton = () => {
return (
-
+
{siteConfig('CONTACT_GITHUB') && (
-
+
)}
{siteConfig('CONTACT_TWITTER') && (
@@ -23,7 +23,7 @@ const SocialButton = () => {
rel='noreferrer'
title={'twitter'}
href={siteConfig('CONTACT_TWITTER')}>
-
+
)}
{siteConfig('CONTACT_TELEGRAM') && (
@@ -32,7 +32,7 @@ const SocialButton = () => {
rel='noreferrer'
href={siteConfig('CONTACT_TELEGRAM')}
title={'telegram'}>
-
+
)}
{siteConfig('CONTACT_LINKEDIN') && (
@@ -50,7 +50,7 @@ const SocialButton = () => {
rel='noreferrer'
title={'weibo'}
href={siteConfig('CONTACT_WEIBO')}>
-
+
)}
{siteConfig('CONTACT_INSTAGRAM') && (
@@ -59,7 +59,7 @@ const SocialButton = () => {
rel='noreferrer'
title={'instagram'}
href={siteConfig('CONTACT_INSTAGRAM')}>
-
+
)}
{siteConfig('CONTACT_EMAIL') && (
@@ -68,7 +68,7 @@ const SocialButton = () => {
rel='noreferrer'
title={'email'}
href={`mailto:${siteConfig('CONTACT_EMAIL')}`}>
-
+
)}
{JSON.parse(siteConfig('ENABLE_RSS')) && (
@@ -77,7 +77,7 @@ const SocialButton = () => {
rel='noreferrer'
title={'RSS'}
href={'/rss/feed.xml'}>
-
+
)}
{siteConfig('CONTACT_BILIBILI') && (
@@ -86,7 +86,7 @@ const SocialButton = () => {
rel='noreferrer'
title={'bilibili'}
href={siteConfig('CONTACT_BILIBILI')}>
-
+
)}
{siteConfig('CONTACT_YOUTUBE') && (
@@ -95,7 +95,7 @@ const SocialButton = () => {
rel='noreferrer'
title={'youtube'}
href={siteConfig('CONTACT_YOUTUBE')}>
-
+
)}
diff --git a/themes/magzine/components/TopNavBar.js b/themes/magzine/components/TopNavBar.js
index ef22aa2d..370e542a 100644
--- a/themes/magzine/components/TopNavBar.js
+++ b/themes/magzine/components/TopNavBar.js
@@ -2,7 +2,6 @@ import Collapse from '@/components/Collapse'
import { siteConfig } from '@/lib/config'
import { useGlobal } from '@/lib/global'
import { useRef, useState } from 'react'
-import CONFIG from '../config'
import LogoBar from './LogoBar'
import { MenuBarMobile } from './MenuBarMobile'
import { MenuItemDrop } from './MenuItemDrop'
@@ -24,25 +23,25 @@ export default function TopNavBar(props) {
icon: 'fas fa-th',
name: locale.COMMON.CATEGORY,
href: '/category',
- show: siteConfig('MAGZINE_MENU_CATEGORY', null, CONFIG)
+ show: siteConfig('MAGZINE_MENU_CATEGORY')
},
{
icon: 'fas fa-tag',
name: locale.COMMON.TAGS,
href: '/tag',
- show: siteConfig('MAGZINE_MENU_TAG', null, CONFIG)
+ show: siteConfig('MAGZINE_MENU_TAG')
},
{
icon: 'fas fa-archive',
name: locale.NAV.ARCHIVE,
href: '/archive',
- show: siteConfig('MAGZINE_MENU_ARCHIVE', null, CONFIG)
+ show: siteConfig('MAGZINE_MENU_ARCHIVE')
},
{
icon: 'fas fa-search',
name: locale.NAV.SEARCH,
href: '/search',
- show: siteConfig('MAGZINE_MENU_SEARCH', null, CONFIG)
+ show: siteConfig('MAGZINE_MENU_SEARCH')
}
]
diff --git a/themes/magzine/config.js b/themes/magzine/config.js
index 6ef5e66e..201d2a18 100644
--- a/themes/magzine/config.js
+++ b/themes/magzine/config.js
@@ -5,11 +5,19 @@ const CONFIG = {
MAGZINE_HOME_BUTTON_URL: '/about',
MAGZINE_HOME_BUTTON_TEXT: '了解更多',
+ MAGZINE_HOME_HIDDEN_CATEGORY: '分享杂文', //不希望在首页展示的文章分类,用英文逗号隔开
+
MAGZINE_HOME_TITLE: '立即开创您的在线业务。完全免费。',
MAGZINE_HOME_DESCRIPTION:
'借助NotionNext,获得助您开创、经营和扩展业务所需的全部工具和帮助。',
MAGZINE_HOME_TIPS: 'AI时代来临,这是属于超级个体的狂欢盛宴!',
+ // 首页底部推荐文章标签, 例如 [推荐] , 最多六篇文章; 若留空白'',则推荐最近更新文章
+ MAGZINE_RECOMMEND_POST_TAG: '推荐',
+ MAGZINE_RECOMMEND_POST_COUNT: 6,
+ MAGZINE_RECOMMEND_POST_TITLE: '推荐文章',
+ MAGZINE_RECOMMEND_POST_SORT_BY_UPDATE_TIME: false, // 推荐文章排序,为`true`时将强制按最后修改时间倒序
+
// Style
MAGZINE_RIGHT_PANEL_DARK: process.env.NEXT_PUBLIC_MAGZINE_RIGHT_DARK || false, // 右侧面板深色模式
@@ -21,15 +29,95 @@ const CONFIG = {
MAGZINE_POST_DETAIL_CATEGORY: true, // 文章显示分类
MAGZINE_POST_DETAIL_TAG: true, // 文章显示标签
- // 菜单
+ // 页脚菜单
+ MAGZINE_FOOTER_LINKS: [
+ {
+ name: '友情链接',
+ menus: [
+ { title: '尘世の歌', href: 'https://chenge.ink' },
+ {
+ title: '设计狮网址导航',
+ href: 'https://ct.ued.cat/'
+ },
+ {
+ title: '积极的长腿怪',
+ href: 'https://jjdctg.com'
+ },
+ {
+ title: '自动驾驶小白说',
+ href: 'https://www.helloxiaobai.cn/about'
+ },
+ {
+ title: 'AI-皇帝',
+ href: 'https://www.ai-hd.com/'
+ },
+ {
+ title: 'Andy`s Pro',
+ href: 'https://tw.andys.pro/'
+ },
+ { title: 'LUCEN', href: 'https://www.lucenczz.top/' }
+ ]
+ },
+ {
+ name: '开发者',
+ menus: [
+ { title: 'Github', href: 'https://github.com/tangly1024/NotionNext' },
+ {
+ title: '开发帮助',
+ href: 'https://docs.tangly1024.com/article/how-to-develop-with-notion-next'
+ },
+ {
+ title: '功能反馈',
+ href: 'https://github.com/tangly1024/NotionNext/issues/new/choose'
+ },
+ {
+ title: '技术讨论',
+ href: 'https://github.com/tangly1024/NotionNext/discussions'
+ },
+ {
+ title: '关于作者',
+ href: 'https://blog.tangly1024.com/about'
+ }
+ ]
+ },
+
+ {
+ name: '支持',
+ menus: [
+ {
+ title: '站长社群',
+ href: 'https://docs.tangly1024.com/article/chat-community'
+ },
+ {
+ title: '咨询与定制',
+ href: 'https://docs.tangly1024.com/article/my-service'
+ },
+ {
+ title: '升级手册',
+ href: 'https://docs.tangly1024.com/article/my-service'
+ },
+ {
+ title: '安装教程',
+ href: 'https://docs.tangly1024.com/article/how-to-update-notionnext'
+ },
+ { title: 'SEO推广', href: 'https://seo.tangly1024.com/' }
+ ]
+ },
+ {
+ name: '解决方案',
+ menus: [
+ { title: '建站工具', href: 'https://www.tangly1024.com/' },
+ { title: 'NotionNext', href: 'https://docs.tangly1024.com/about' }
+ ]
+ }
+ ],
+
+ // 旧版本顶部菜单
MAGZINE_MENU_CATEGORY: true, // 显示分类
MAGZINE_MENU_TAG: true, // 显示标签
MAGZINE_MENU_ARCHIVE: true, // 显示归档
MAGZINE_MENU_SEARCH: true, // 显示搜索
- // Widget
- MAGZINE_WIDGET_REVOLVER_MAPS:
- process.env.NEXT_PUBLIC_WIDGET_REVOLVER_MAPS || 'false', // 地图插件
MAGZINE_WIDGET_TO_TOP: true // 跳回顶部
}
export default CONFIG
diff --git a/themes/magzine/index.js b/themes/magzine/index.js
index 5845e01c..14b737e1 100644
--- a/themes/magzine/index.js
+++ b/themes/magzine/index.js
@@ -1,4 +1,5 @@
import Comment from '@/components/Comment'
+import LoadingCover from '@/components/LoadingCover'
import replaceSearchResult from '@/components/Mark'
import NotionPage from '@/components/NotionPage'
import ShareBar from '@/components/ShareBar'
@@ -8,6 +9,7 @@ import { isBrowser } from '@/lib/utils'
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'
@@ -18,8 +20,9 @@ import CategoryItem from './components/CategoryItem'
import Footer from './components/Footer'
import Header from './components/Header'
import Hero from './components/Hero'
-import PostListHorizontal from './components/PostListHorizontal'
+import PostBannerGroupByCategory from './components/PostBannerGroupByCategory'
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'
@@ -40,7 +43,7 @@ export const useMagzineGlobal = () => useContext(ThemeGlobalMagzine)
* @constructor
*/
const LayoutBase = props => {
- const { children, showInfoCard = true, post, notice } = props
+ const { children, notice, showInfoCard = true, post } = props
const { locale } = useGlobal()
const router = useRouter()
const [tocVisible, changeTocVisible] = useState(false)
@@ -65,9 +68,14 @@ const LayoutBase = props => {
{children}