- {siteConfig('TITLE')}
+ {siteInfo?.title || siteConfig('TITLE')}
diff --git a/themes/matery/components/Logo.js b/themes/matery/components/Logo.js
index 3e6542f4..a1082ae3 100644
--- a/themes/matery/components/Logo.js
+++ b/themes/matery/components/Logo.js
@@ -1,11 +1,20 @@
import { siteConfig } from '@/lib/config'
import Link from 'next/link'
-
+/**
+ * 站点logo
+ * 这里默认只支持纯文字
+ * @param {*} props
+ * @returns
+ */
const Logo = props => {
+ const { siteInfo } = props
return (
-
{siteConfig('TITLE') }
+
+ {' '}
+ {siteInfo?.title || siteConfig('TITLE')}
+
)
diff --git a/themes/matery/components/MenuItemCollapse.js b/themes/matery/components/MenuItemCollapse.js
index 6cd373f6..0094fa86 100644
--- a/themes/matery/components/MenuItemCollapse.js
+++ b/themes/matery/components/MenuItemCollapse.js
@@ -72,7 +72,7 @@ export const MenuItemCollapse = ({ link }) => {
return (
+ className='cursor-pointer whitespace-nowrap dark:text-gray-200 w-full font-extralight dark:bg-black text-left px-5 justify-start bg-gray-100 hover:bg-indigo-500 dark:hover:bg-indigo-500 hover:text-white tracking-widest transition-all duration-200 border-b dark:border-gray-800 py-3 pr-6'>
diff --git a/themes/matery/components/MenuItemDrop.js b/themes/matery/components/MenuItemDrop.js
index f7373f7c..93dfe7c6 100644
--- a/themes/matery/components/MenuItemDrop.js
+++ b/themes/matery/components/MenuItemDrop.js
@@ -1,6 +1,9 @@
import Link from 'next/link'
import { useState } from 'react'
-
+/**
+ * 菜单
+ * 支持二级展开的菜单
+ */
export const MenuItemDrop = ({ link }) => {
const [show, changeShow] = useState(false)
const hasSubMenu = link?.subMenus?.length > 0
@@ -42,7 +45,7 @@ export const MenuItemDrop = ({ link }) => {
return (
+ className='cursor-pointer hover:bg-indigo-500 text-gray-900 hover:text-white tracking-widest transition-all duration-200 dark:border-gray-800 py-1 pr-6 pl-3'>
{link?.icon && }
diff --git a/themes/matery/components/MenuListTop.js b/themes/matery/components/MenuListTop.js
index 506f9c59..04897f7b 100644
--- a/themes/matery/components/MenuListTop.js
+++ b/themes/matery/components/MenuListTop.js
@@ -1,17 +1,42 @@
+import { siteConfig } from '@/lib/config'
import { useGlobal } from '@/lib/global'
import CONFIG from '../config'
import { MenuItemDrop } from './MenuItemDrop'
-import { siteConfig } from '@/lib/config'
-
-export const MenuListTop = (props) => {
+/**
+ * 菜单列表
+ * 顶部导航栏用
+ * @param {*} props
+ * @returns
+ */
+export const MenuListTop = props => {
const { customNav, customMenu } = props
const { locale } = useGlobal()
let links = [
- { icon: 'fas fa-archive', name: locale.NAV.ARCHIVE, to: '/archive', show: siteConfig('MATERY_MENU_ARCHIVE', null, CONFIG) },
- { icon: 'fas fa-search', name: locale.NAV.SEARCH, to: '/search', show: siteConfig('MATERY_MENU_SEARCH', null, CONFIG) },
- { icon: 'fas fa-folder', name: locale.COMMON.CATEGORY, to: '/category', show: siteConfig('MATERY_MENU_CATEGORY', null, CONFIG) },
- { icon: 'fas fa-tag', name: locale.COMMON.TAGS, to: '/tag', show: siteConfig('MATERY_MENU_TAG', null, CONFIG) }
+ {
+ icon: 'fas fa-archive',
+ name: locale.NAV.ARCHIVE,
+ to: '/archive',
+ show: siteConfig('MATERY_MENU_ARCHIVE', null, CONFIG)
+ },
+ {
+ icon: 'fas fa-search',
+ name: locale.NAV.SEARCH,
+ to: '/search',
+ show: siteConfig('MATERY_MENU_SEARCH', null, CONFIG)
+ },
+ {
+ icon: 'fas fa-folder',
+ name: locale.COMMON.CATEGORY,
+ to: '/category',
+ show: siteConfig('MATERY_MENU_CATEGORY', null, CONFIG)
+ },
+ {
+ icon: 'fas fa-tag',
+ name: locale.COMMON.TAGS,
+ to: '/tag',
+ show: siteConfig('MATERY_MENU_TAG', null, CONFIG)
+ }
]
if (customNav) {
@@ -29,7 +54,9 @@ export const MenuListTop = (props) => {
return (
)
}
diff --git a/themes/matery/style.js b/themes/matery/style.js
index 711670c9..32918e92 100644
--- a/themes/matery/style.js
+++ b/themes/matery/style.js
@@ -5,27 +5,54 @@
* @returns
*/
const Style = () => {
- return
+ background: linear-gradient(
+ to bottom,
+ rgba(0, 0, 0, 0.5) 0%,
+ rgba(0, 0, 0, 0.2) 10%,
+ rgba(0, 0, 0, 0) 25%,
+ rgba(0, 0, 0, 0.2) 75%,
+ rgba(0, 0, 0, 0.5) 100%
+ );
+ }
+
+ // 自定义滚动条
+ ::-webkit-scrollbar {
+ width: 5px;
+ height: 5px;
+ }
+
+ ::-webkit-scrollbar-track {
+ background: transparent;
+ }
+
+ ::-webkit-scrollbar-thumb {
+ background-color: #4338ca;
+ }
+
+ * {
+ scrollbar-width: thin;
+ scrollbar-color: #4338ca transparent;
+ }
+ `}
+ )
}
export { Style }