From 784baed739afb6cbe27fc62041ab4e14803b67a4 Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Tue, 21 Feb 2023 13:09:57 +0800 Subject: [PATCH] =?UTF-8?q?Nobelium=20=E6=94=AF=E6=8C=81=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E5=A4=B4=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/nobelium/components/Nav.js | 40 +++++++-------------------- themes/nobelium/components/SvgIcon.js | 29 +++++++++++++++++++ themes/nobelium/config_nobelium.js | 5 +++- 3 files changed, 43 insertions(+), 31 deletions(-) create mode 100644 themes/nobelium/components/SvgIcon.js diff --git a/themes/nobelium/components/Nav.js b/themes/nobelium/components/Nav.js index f35b60b1..6c6951ea 100644 --- a/themes/nobelium/components/Nav.js +++ b/themes/nobelium/components/Nav.js @@ -3,9 +3,10 @@ import Link from 'next/link' import BLOG from '@/blog.config' import { useGlobal } from '@/lib/global' import CONFIG_NOBELIUM from '../config_nobelium' +import { SvgIcon } from './SvgIcon' const Nav = props => { - const { navBarTitle, fullWidth } = props + const { navBarTitle, fullWidth, siteInfo } = props const useSticky = !BLOG.autoCollapsedNavBar const navRef = useRef(null) const sentinalRef = useRef([]) @@ -42,33 +43,12 @@ const Nav = props => {
- - - - - - - - - - + {/* */} + {CONFIG_NOBELIUM.NAV_NOTION_ICON + /* eslint-disable-next-line @next/next/no-img-element */ + ? {BLOG.AUTHOR}/ + : } +
@@ -80,8 +60,8 @@ const Nav = props => { ) : (

- {BLOG.title},{' '} - {BLOG.description} + {siteInfo?.title} + {/* ,{' '}{siteInfo?.description} */}

)} diff --git a/themes/nobelium/components/SvgIcon.js b/themes/nobelium/components/SvgIcon.js new file mode 100644 index 00000000..1ae326ca --- /dev/null +++ b/themes/nobelium/components/SvgIcon.js @@ -0,0 +1,29 @@ +export const SvgIcon = () => { + return + + + + + + + + + +} diff --git a/themes/nobelium/config_nobelium.js b/themes/nobelium/config_nobelium.js index 5ceff76c..0385e9d7 100644 --- a/themes/nobelium/config_nobelium.js +++ b/themes/nobelium/config_nobelium.js @@ -5,6 +5,9 @@ const CONFIG_NOBELIUM = { MENU_TAG: true, // 显示标签 MENU_ARCHIVE: false, // 显示归档 MENU_SEARCH: true, // 显示搜索 - MENU_RSS: false // 显示订阅 + MENU_RSS: false, // 显示订阅 + + NAV_NOTION_ICON: true // 是否读取Notion图标作为站点头像 + } export default CONFIG_NOBELIUM