diff --git a/.env.local b/.env.local index 0c69e3c2..2450afdd 100644 --- a/.env.local +++ b/.env.local @@ -1,2 +1,2 @@ # 环境变量 @see https://www.nextjs.cn/docs/basic-features/environment-variables -NEXT_PUBLIC_VERSION=3.7.0 +NEXT_PUBLIC_VERSION=3.7.1 diff --git a/components/ThemeSwitch.js b/components/ThemeSwitch.js index 9ec3394d..4e84f36f 100644 --- a/components/ThemeSwitch.js +++ b/components/ThemeSwitch.js @@ -1,4 +1,5 @@ import { useGlobal } from '@/lib/global' +import { ALL_THEME } from '@/themes' import React from 'react' import { Draggable } from './Draggable' /** @@ -6,15 +7,24 @@ import { Draggable } from './Draggable' * @returns 主题切换 */ export function ThemeSwitch() { - const { theme, switchTheme } = useGlobal() + const { theme, changeTheme } = useGlobal() + + const onSelectChange = (e) => { + changeTheme(e.target.value) + } return (<>
- -
{theme}
- + + {/*
{theme}
*/} +
diff --git a/package.json b/package.json index 51237fd9..7540f8ab 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "notion-next", - "version": "3.7.0", + "version": "3.7.1", "homepage": "https://github.com/tangly1024/NotionNext.git", "license": "MIT", "repository": { diff --git a/styles/notion.css b/styles/notion.css index e7ab6173..2bb4470a 100644 --- a/styles/notion.css +++ b/styles/notion.css @@ -1981,3 +1981,7 @@ pre[class*="language-mermaid"] { code.language-mermaid { display:none } + +.code-toolbar{ + @apply w-full; +} \ No newline at end of file diff --git a/themes/hexo/LayoutBase.js b/themes/hexo/LayoutBase.js index 06399f52..cf438314 100644 --- a/themes/hexo/LayoutBase.js +++ b/themes/hexo/LayoutBase.js @@ -71,7 +71,7 @@ const LayoutBase = props => { id="container-inner" className="pt-14 w-full mx-auto lg:flex lg:space-x-4 justify-center" > -
+
{onLoading ? : children}
diff --git a/themes/hexo/components/BlogPostCard.js b/themes/hexo/components/BlogPostCard.js index 6e617b90..06f4d8c7 100644 --- a/themes/hexo/components/BlogPostCard.js +++ b/themes/hexo/components/BlogPostCard.js @@ -86,7 +86,7 @@ const BlogPostCard = ({ post, showSummary }) => { {CONFIG_HEXO.POST_LIST_COVER && !showPreview && post?.page_cover && !post.results && ( -
+
{/* eslint-disable-next-line @next/next/no-img-element */} { - const { category } = props - return -
- - {category} + const { category, categories } = props + return } > + +
+ +
+ +
+ {categories.map(e => { + const selected = e.name === category + return ( + +
+ + {e.name}({e.count}) +
+ + ) + })} +
+
+ + {BLOG.POST_LIST_STYLE === 'page' ? : } +
- {BLOG.POST_LIST_STYLE === 'page' ? : } +
} diff --git a/themes/matery/LayoutCategoryIndex.js b/themes/matery/LayoutCategoryIndex.js index 6d21da03..99c0f582 100644 --- a/themes/matery/LayoutCategoryIndex.js +++ b/themes/matery/LayoutCategoryIndex.js @@ -1,35 +1,32 @@ -import { useGlobal } from '@/lib/global' import Link from 'next/link' -import Card from './components/Card' +import HeaderArticle from './components/HeaderArticle' import LayoutBase from './LayoutBase' export const LayoutCategoryIndex = props => { const { categories } = props - const { locale } = useGlobal() + return ( - - -
- - {locale.COMMON.CATEGORY}: -
-
- {categories.map(category => { - return ( - -
- - {category.name}({category.count}) + } > + +
+ +
+ +
+ {categories.map(e => { + return ( + +
+ + {e.name}({e.count}) +
+ + ) + })} +
- - ) - })} -
- -
+ +
+ ) } diff --git a/themes/matery/LayoutTag.js b/themes/matery/LayoutTag.js index 5e26addd..3f3d4fbd 100644 --- a/themes/matery/LayoutTag.js +++ b/themes/matery/LayoutTag.js @@ -14,9 +14,9 @@ export const LayoutTag = (props) => { return } > -
+
-
+
{locale.COMMON.TAGS} @@ -33,8 +33,10 @@ export const LayoutTag = (props) => { })}
+ + {BLOG.POST_LIST_STYLE === 'page' ? : } +
- {BLOG.POST_LIST_STYLE === 'page' ? : } } diff --git a/themes/matery/components/ArticleInfo.js b/themes/matery/components/ArticleInfo.js index fd21e660..892e1c3e 100644 --- a/themes/matery/components/ArticleInfo.js +++ b/themes/matery/components/ArticleInfo.js @@ -28,15 +28,14 @@ export const ArticleInfo = (props) => { passHref > - 发布日期: {date} + 发布日期: {date} 更新日期: {post.lastEditedTime} - - + )} diff --git a/themes/matery/components/WordCount.js b/themes/matery/components/WordCount.js index 783e37c9..be39bff6 100644 --- a/themes/matery/components/WordCount.js +++ b/themes/matery/components/WordCount.js @@ -10,14 +10,15 @@ export default function WordCount() { }) return - - - 文章字数 - 0 - + + + 文章字数  + 0 + + 阅读时长: - 0 分钟 + 0分钟 }