From 31cee127b149a08a640739372717e3518cbea15a Mon Sep 17 00:00:00 2001 From: Vixcity <2091283625@qq.com> Date: Tue, 3 Jan 2023 20:03:58 +0800 Subject: [PATCH 01/11] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- blog.config.js | 38 +++++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/blog.config.js b/blog.config.js index 297d373a..37a843fa 100644 --- a/blog.config.js +++ b/blog.config.js @@ -1,25 +1,25 @@ // 注: process.env.XX是Vercel的环境变量,配置方式见:https://docs.tangly1024.com/zh/features/personality const BLOG = { // Important page_id!!!Duplicate Template from https://www.notion.so/tanghh/02ab3b8678004aa69e9e415905ef32a5 - NOTION_PAGE_ID: process.env.NOTION_PAGE_ID || '02ab3b8678004aa69e9e415905ef32a5', + NOTION_PAGE_ID: process.env.NOTION_PAGE_ID || 'fb7bf0cd0563410e862e5ee67b8a8d33', PSEUDO_STATIC: false, // 伪静态路径,开启后所有文章URL都以 .html 结尾。 NEXT_REVALIDATE_SECOND: 5, // 更新内容缓存间隔 单位(秒);即每个页面有5秒的纯静态期、此期间无论多少次访问都不会抓取notion数据;调大该值有助于节省Vercel资源、同时提升访问速率,但也会使文章更新有延迟。 THEME: process.env.NEXT_PUBLIC_THEME || 'hexo', // 主题, 支持 ['next','hexo',"fukasawa','medium','example'] @see https://preview.tangly1024.com THEME_SWITCH: process.env.NEXT_PUBLIC_THEME_SWITCH || false, // 是否显示切换主题按钮 LANG: 'zh-CN', // e.g 'zh-CN','en-US' see /lib/lang.js for more. - SINCE: 2021, // e.g if leave this empty, current year will be used. - APPEARANCE: 'light', // ['light', 'dark', 'auto'], // light 日间模式 , dark夜间模式, auto根据时间和主题自动夜间模式 + SINCE: 2022, // e.g if leave this empty, current year will be used. + APPEARANCE: 'auto', // ['light', 'dark', 'auto'], // light 日间模式 , dark夜间模式, auto根据时间和主题自动夜间模式 - AUTHOR: 'tangly1024', // 作者 + AUTHOR: 'Vixcity', // 作者 BIO: '一个普通的干饭人🍚', // 作者简介 - LINK: 'https://tangly1024.com', // 网站地址 + LINK: 'https://bolg.vixcitycc.top/', // 网站地址 KEYWORDS: 'Notion, 博客', // 网站关键词 英文逗号隔开 // 社交链接,不需要可留空白,例如 CONTACT_WEIBO:'' - CONTACT_EMAIL: 'mail@tangly1024.com', // 邮箱 + CONTACT_EMAIL: '2091283625@qq.com', // 邮箱 CONTACT_WEIBO: '', // 你的微博个人主页 CONTACT_TWITTER: '', // 你的twitter个人主页 - CONTACT_GITHUB: 'https://github.com/tangly1024', // 你的github个人主页 - CONTACT_TELEGRAM: 'https://t.me/tangly_1024', // 你的telegram 地址 例如 https://t.me/tangly_1024 + CONTACT_GITHUB: 'https://github.com/Vixcity', // 你的github个人主页 + CONTACT_TELEGRAM: '', // 你的telegram 地址 例如 https://t.me/tangly_1024 CONTACT_LINKEDIN: '', // 你的linkedIn 首页 // 网站默认使用PingFangSC及NotoSansSC, @@ -52,21 +52,29 @@ const BLOG = { POST_LIST_PREVIEW: process.env.NEXT_PUBLIC_POST_PREVIEW || 'false', // 是否在列表加载文章预览 POST_PREVIEW_LINES: 12, // 预览博客行数 POST_RECOMMEND_COUNT: 6, // 推荐文章数量 - POSTS_PER_PAGE: 12, // post counts per page - POSTS_SORT_BY: 'notion', // 排序方式 'date'按时间,'notion'由notion控制 + POSTS_PER_PAGE: 10, // post counts per page + POSTS_SORT_BY: 'date', // 排序方式 'date'按时间,'notion'由notion控制 PREVIEW_CATEGORY_COUNT: 16, // 首页最多展示的分类数量,0为不限制 PREVIEW_TAG_COUNT: 16, // 首页最多展示的标签数量,0为不限制 // 鼠标点击烟花特效 - FIREWORKS: process.env.NEXT_PUBLIC_FIREWORKS || false, // 鼠标点击烟花特效 + FIREWORKS: process.env.NEXT_PUBLIC_FIREWORKS || true, // 鼠标点击烟花特效 // 是否启用彩色的烟花 FIREWORKSCOLOR: true, // 悬浮挂件 WIDGET_PET: process.env.NEXT_PUBLIC_WIDGET_PET || true, // 是否显示宠物挂件 - WIDGET_PET_LINK: 'https://cdn.jsdelivr.net/npm/live2d-widget-model-wanko@1.0.5/assets/wanko.model.json', // 挂件模型地址 @see https://github.com/xiazeyu/live2d-widget-models - WIDGET_PET_SWITCH_THEME: true, // 点击宠物挂件切换博客主题 + WIDGET_PET_LINK: 'https://cdn.jsdelivr.net/npm/live2d-widget-model-unitychan@1.0.5/assets/unitychan.model.json', // 挂件模型地址 @see https://github.com/xiazeyu/live2d-widget-models + // 好看的主题 + // https://cdn.jsdelivr.net/npm/live2d-widget-model-ni-j@1.0.5/assets/ni-j.model.json + // https://cdn.jsdelivr.net/npm/live2d-widget-model-nipsilon@1.0.5/assets/nipsilon.model.json + // https://cdn.jsdelivr.net/npm/live2d-widget-model-nito@1.0.5/assets/nito.model.json + // https://cdn.jsdelivr.net/npm/live2d-widget-model-shizuku@1.0.5/assets/shizuku.model.json + // https://cdn.jsdelivr.net/npm/live2d-widget-model-unitychan@1.0.5/assets/unitychan.model.json + // https://cdn.jsdelivr.net/npm/live2d-widget-model-koharu@1.0.5/assets/koharu.model.json + // https://cdn.jsdelivr.net/npm/live2d-widget-model-haruto@1.0.5/assets/haruto.model.json + WIDGET_PET_SWITCH_THEME: false, // 点击宠物挂件切换博客主题 // ----> 评论互动 可同时开启多个支持 WALINE VALINE GISCUS CUSDIS UTTERRANCES GITALK @@ -147,9 +155,9 @@ const BLOG = { // 作废配置 AVATAR: '/avatar.png', // 作者头像,被notion中的ICON覆盖。若无ICON则取public目录下的avatar.png - TITLE: process.env.NEXT_PUBLIC_TITLE || 'NotionNext BLOG', // 站点标题 ,被notion中的页面标题覆盖 + TITLE: process.env.NEXT_PUBLIC_TITLE || 'VIXCITY BLOG', // 站点标题 ,被notion中的页面标题覆盖 HOME_BANNER_IMAGE: './bg_image.jpg', // 首页背景大图, 会被notion中的封面图覆盖,若无封面图则会使用代码中的 /public/bg_image.jpg 文件 - DESCRIPTION: process.env.NEXT_PUBLIC_DESCRIPTION || '这是一个由NotionNext生成的站点', // 站点描述,被notion中的页面描述覆盖 + DESCRIPTION: process.env.NEXT_PUBLIC_DESCRIPTION || '我的小破博客', // 站点描述,被notion中的页面描述覆盖 // 开发相关 NOTION_ACCESS_TOKEN: process.env.NOTION_ACCESS_TOKEN || '', // Useful if you prefer not to make your database public From 57f343b06c93c4e1b4e23449ad2664211784f679 Mon Sep 17 00:00:00 2001 From: Vixcity <2091283625@qq.com> Date: Tue, 3 Jan 2023 20:14:54 +0800 Subject: [PATCH 02/11] =?UTF-8?q?config=20=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- blog.config.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/blog.config.js b/blog.config.js index 81ab94d1..5250e8ef 100644 --- a/blog.config.js +++ b/blog.config.js @@ -59,7 +59,7 @@ const BLOG = { PREVIEW_TAG_COUNT: 16, // 首页最多展示的标签数量,0为不限制 // 鼠标点击烟花特效 - FIREWORKS: process.env.NEXT_PUBLIC_FIREWORKS || false, // 开关 + FIREWORKS: process.env.NEXT_PUBLIC_FIREWORKS || true, // 鼠标点击烟花特效 // 烟花色彩,感谢 https://github.com/Vixcity 提交的色彩 FIREWORKS_COLOR: ['255, 20, 97', '24, 255, 146', '90, 135, 255', '251, 243, 140'], @@ -155,7 +155,6 @@ const BLOG = { // 作废配置 AVATAR: '/avatar.png', // 作者头像,被notion中的ICON覆盖。若无ICON则取public目录下的avatar.png - TITLE: process.env.NEXT_PUBLIC_TITLE || 'NotionNext BLOG', // 站点标题 ,被notion中的页面标题覆盖 TITLE: process.env.NEXT_PUBLIC_TITLE || 'VIXCITY BLOG', // 站点标题 ,被notion中的页面标题覆盖 HOME_BANNER_IMAGE: './bg_image.jpg', // 首页背景大图, 会被notion中的封面图覆盖,若无封面图则会使用代码中的 /public/bg_image.jpg 文件 DESCRIPTION: process.env.NEXT_PUBLIC_DESCRIPTION || '我的小破博客', // 站点描述,被notion中的页面描述覆盖 From 494c5dbc4f81a163d7821ef13b97891f2a2c7648 Mon Sep 17 00:00:00 2001 From: Vixcity <2091283625@qq.com> Date: Tue, 3 Jan 2023 20:37:19 +0800 Subject: [PATCH 03/11] =?UTF-8?q?=E6=8F=90=E4=BA=A4=20=E6=96=B0=E5=88=86?= =?UTF-8?q?=E6=94=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- blog.config.js | 38 +++++++++++++++----------------------- components/Fireworks.js | 2 +- public/favicon.ico | Bin 4286 -> 254558 bytes 3 files changed, 16 insertions(+), 24 deletions(-) diff --git a/blog.config.js b/blog.config.js index 1fd64309..0dc79180 100644 --- a/blog.config.js +++ b/blog.config.js @@ -1,25 +1,25 @@ // 注: process.env.XX是Vercel的环境变量,配置方式见:https://docs.tangly1024.com/zh/features/personality const BLOG = { // Important page_id!!!Duplicate Template from https://www.notion.so/tanghh/02ab3b8678004aa69e9e415905ef32a5 - NOTION_PAGE_ID: process.env.NOTION_PAGE_ID || 'fb7bf0cd0563410e862e5ee67b8a8d33', + NOTION_PAGE_ID: process.env.NOTION_PAGE_ID || '02ab3b8678004aa69e9e415905ef32a5', PSEUDO_STATIC: false, // 伪静态路径,开启后所有文章URL都以 .html 结尾。 NEXT_REVALIDATE_SECOND: 5, // 更新内容缓存间隔 单位(秒);即每个页面有5秒的纯静态期、此期间无论多少次访问都不会抓取notion数据;调大该值有助于节省Vercel资源、同时提升访问速率,但也会使文章更新有延迟。 THEME: process.env.NEXT_PUBLIC_THEME || 'hexo', // 主题, 支持 ['next','hexo',"fukasawa','medium','example'] @see https://preview.tangly1024.com THEME_SWITCH: process.env.NEXT_PUBLIC_THEME_SWITCH || false, // 是否显示切换主题按钮 LANG: 'zh-CN', // e.g 'zh-CN','en-US' see /lib/lang.js for more. - SINCE: 2022, // e.g if leave this empty, current year will be used. - APPEARANCE: 'auto', // ['light', 'dark', 'auto'], // light 日间模式 , dark夜间模式, auto根据时间和主题自动夜间模式 + SINCE: 2021, // e.g if leave this empty, current year will be used. + APPEARANCE: 'light', // ['light', 'dark', 'auto'], // light 日间模式 , dark夜间模式, auto根据时间和主题自动夜间模式 - AUTHOR: 'Vixcity', // 作者 + AUTHOR: 'tangly1024', // 作者 BIO: '一个普通的干饭人🍚', // 作者简介 - LINK: 'https://bolg.vixcitycc.top/', // 网站地址 + LINK: 'https://tangly1024.com', // 网站地址 KEYWORDS: 'Notion, 博客', // 网站关键词 英文逗号隔开 // 社交链接,不需要可留空白,例如 CONTACT_WEIBO:'' - CONTACT_EMAIL: '2091283625@qq.com', // 邮箱 + CONTACT_EMAIL: 'mail@tangly1024.com', // 邮箱 CONTACT_WEIBO: '', // 你的微博个人主页 CONTACT_TWITTER: '', // 你的twitter个人主页 - CONTACT_GITHUB: 'https://github.com/Vixcity', // 你的github个人主页 - CONTACT_TELEGRAM: '', // 你的telegram 地址 例如 https://t.me/tangly_1024 + CONTACT_GITHUB: 'https://github.com/tangly1024', // 你的github个人主页 + CONTACT_TELEGRAM: 'https://t.me/tangly_1024', // 你的telegram 地址 例如 https://t.me/tangly_1024 CONTACT_LINKEDIN: '', // 你的linkedIn 首页 // 网站默认使用PingFangSC及NotoSansSC, @@ -55,29 +55,21 @@ const BLOG = { POST_LIST_PREVIEW: process.env.NEXT_PUBLIC_POST_PREVIEW || 'false', // 是否在列表加载文章预览 POST_PREVIEW_LINES: 12, // 预览博客行数 POST_RECOMMEND_COUNT: 6, // 推荐文章数量 - POSTS_PER_PAGE: 10, // post counts per page - POSTS_SORT_BY: 'date', // 排序方式 'date'按时间,'notion'由notion控制 + POSTS_PER_PAGE: 12, // post counts per page + POSTS_SORT_BY: 'notion', // 排序方式 'date'按时间,'notion'由notion控制 PREVIEW_CATEGORY_COUNT: 16, // 首页最多展示的分类数量,0为不限制 PREVIEW_TAG_COUNT: 16, // 首页最多展示的标签数量,0为不限制 // 鼠标点击烟花特效 - FIREWORKS: process.env.NEXT_PUBLIC_FIREWORKS || true, // 鼠标点击烟花特效 + FIREWORKS: process.env.NEXT_PUBLIC_FIREWORKS || false, // 开关 // 烟花色彩,感谢 https://github.com/Vixcity 提交的色彩 FIREWORKS_COLOR: ['255, 20, 97', '24, 255, 146', '90, 135, 255', '251, 243, 140'], // 悬浮挂件 WIDGET_PET: process.env.NEXT_PUBLIC_WIDGET_PET || true, // 是否显示宠物挂件 - WIDGET_PET_LINK: 'https://cdn.jsdelivr.net/npm/live2d-widget-model-unitychan@1.0.5/assets/unitychan.model.json', // 挂件模型地址 @see https://github.com/xiazeyu/live2d-widget-models - // 好看的主题 - // https://cdn.jsdelivr.net/npm/live2d-widget-model-ni-j@1.0.5/assets/ni-j.model.json - // https://cdn.jsdelivr.net/npm/live2d-widget-model-nipsilon@1.0.5/assets/nipsilon.model.json - // https://cdn.jsdelivr.net/npm/live2d-widget-model-nito@1.0.5/assets/nito.model.json - // https://cdn.jsdelivr.net/npm/live2d-widget-model-shizuku@1.0.5/assets/shizuku.model.json - // https://cdn.jsdelivr.net/npm/live2d-widget-model-unitychan@1.0.5/assets/unitychan.model.json - // https://cdn.jsdelivr.net/npm/live2d-widget-model-koharu@1.0.5/assets/koharu.model.json - // https://cdn.jsdelivr.net/npm/live2d-widget-model-haruto@1.0.5/assets/haruto.model.json - WIDGET_PET_SWITCH_THEME: false, // 点击宠物挂件切换博客主题 + WIDGET_PET_LINK: 'https://cdn.jsdelivr.net/npm/live2d-widget-model-wanko@1.0.5/assets/wanko.model.json', // 挂件模型地址 @see https://github.com/xiazeyu/live2d-widget-models + WIDGET_PET_SWITCH_THEME: true, // 点击宠物挂件切换博客主题 // 音乐播放插件 MUSIC_PLAYER: process.env.NEXT_PUBLIC_MUSIC_PLAYER || false, // 是否使用音乐播放插件 @@ -182,9 +174,9 @@ const BLOG = { // 作废配置 AVATAR: '/avatar.png', // 作者头像,被notion中的ICON覆盖。若无ICON则取public目录下的avatar.png - TITLE: process.env.NEXT_PUBLIC_TITLE || 'VIXCITY BLOG', // 站点标题 ,被notion中的页面标题覆盖 + TITLE: process.env.NEXT_PUBLIC_TITLE || 'NotionNext BLOG', // 站点标题 ,被notion中的页面标题覆盖 HOME_BANNER_IMAGE: './bg_image.jpg', // 首页背景大图, 会被notion中的封面图覆盖,若无封面图则会使用代码中的 /public/bg_image.jpg 文件 - DESCRIPTION: process.env.NEXT_PUBLIC_DESCRIPTION || '我的小破博客', // 站点描述,被notion中的页面描述覆盖 + DESCRIPTION: process.env.NEXT_PUBLIC_DESCRIPTION || '这是一个由NotionNext生成的站点', // 站点描述,被notion中的页面描述覆盖 // 开发相关 NOTION_ACCESS_TOKEN: process.env.NOTION_ACCESS_TOKEN || '', // Useful if you prefer not to make your database public diff --git a/components/Fireworks.js b/components/Fireworks.js index 6d80772e..8235baa7 100644 --- a/components/Fireworks.js +++ b/components/Fireworks.js @@ -19,7 +19,7 @@ export const Fireworks = () => { */ function createFireworks(config) { const defaultConfig = { - colors: BLOG.FIREWORKSCOLOR, + colors: BLOG.FIREWORKS_COLOR, numberOfParticules: 20, orbitRadius: { min: 50, diff --git a/public/favicon.ico b/public/favicon.ico index eef9fbcacecd080452995e0e8861586e7cfabb0d..b0b448fc47f839128f74ce2f9816cf43c633fd12 100644 GIT binary patch literal 254558 zcmeI537nN>+5evb6cqteQ*#O0)XMCyroDgPbXx51RxXw1E{dScoONaZ!DU7i3D-m_ zajy`>B^7g51Qqp7ODp@kWJM~L8!0L~bG_f|nK`qb1(@xe=lpIyKb|w^KF@Mr*Y9^- z_kBNG5LECl_#oi_;lV+#^$)fQf?!wRU%v+Y`>;IGKlt44L5QX=^nXuSAbzg})pIOJ zK4w9>8MTi#e}0^08;tv%^{ZWILu($l9r%71e!myXN^l_f9ykIV1&#%$f+`2UKaJ%G z;NKqueh7{Phk$Q_efZ68smJZJsmE+vF!-l`vc zK4-r5glV)*Ss;=Y7>8~qF0`Q5^_9^)OElOIZEak$z&7Rk?a|-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A3z#&m{^X(O$wF_RTzrlyRkv`kuU zTdB_vb!ziN-P-)NZl$}eQ|Z>)l}@dNOx8Q~DbuM}OuJq^hg908I-N;coo+FHD}YAG Mq$NOFkacQr04g;Y_y7O^ From d84f9b9297c96d85b7c05324adf8feae6c0536c9 Mon Sep 17 00:00:00 2001 From: Vixcity <2091283625@qq.com> Date: Tue, 3 Jan 2023 20:52:25 +0800 Subject: [PATCH 04/11] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- blog.config.js | 65 ++++++++++++++++++-------------------------------- 1 file changed, 23 insertions(+), 42 deletions(-) diff --git a/blog.config.js b/blog.config.js index 0dc79180..5250e8ef 100644 --- a/blog.config.js +++ b/blog.config.js @@ -1,25 +1,25 @@ // 注: process.env.XX是Vercel的环境变量,配置方式见:https://docs.tangly1024.com/zh/features/personality const BLOG = { // Important page_id!!!Duplicate Template from https://www.notion.so/tanghh/02ab3b8678004aa69e9e415905ef32a5 - NOTION_PAGE_ID: process.env.NOTION_PAGE_ID || '02ab3b8678004aa69e9e415905ef32a5', + NOTION_PAGE_ID: process.env.NOTION_PAGE_ID || 'fb7bf0cd0563410e862e5ee67b8a8d33', PSEUDO_STATIC: false, // 伪静态路径,开启后所有文章URL都以 .html 结尾。 NEXT_REVALIDATE_SECOND: 5, // 更新内容缓存间隔 单位(秒);即每个页面有5秒的纯静态期、此期间无论多少次访问都不会抓取notion数据;调大该值有助于节省Vercel资源、同时提升访问速率,但也会使文章更新有延迟。 THEME: process.env.NEXT_PUBLIC_THEME || 'hexo', // 主题, 支持 ['next','hexo',"fukasawa','medium','example'] @see https://preview.tangly1024.com THEME_SWITCH: process.env.NEXT_PUBLIC_THEME_SWITCH || false, // 是否显示切换主题按钮 LANG: 'zh-CN', // e.g 'zh-CN','en-US' see /lib/lang.js for more. - SINCE: 2021, // e.g if leave this empty, current year will be used. - APPEARANCE: 'light', // ['light', 'dark', 'auto'], // light 日间模式 , dark夜间模式, auto根据时间和主题自动夜间模式 + SINCE: 2022, // e.g if leave this empty, current year will be used. + APPEARANCE: 'auto', // ['light', 'dark', 'auto'], // light 日间模式 , dark夜间模式, auto根据时间和主题自动夜间模式 - AUTHOR: 'tangly1024', // 作者 + AUTHOR: 'Vixcity', // 作者 BIO: '一个普通的干饭人🍚', // 作者简介 - LINK: 'https://tangly1024.com', // 网站地址 + LINK: 'https://bolg.vixcitycc.top/', // 网站地址 KEYWORDS: 'Notion, 博客', // 网站关键词 英文逗号隔开 // 社交链接,不需要可留空白,例如 CONTACT_WEIBO:'' - CONTACT_EMAIL: 'mail@tangly1024.com', // 邮箱 + CONTACT_EMAIL: '2091283625@qq.com', // 邮箱 CONTACT_WEIBO: '', // 你的微博个人主页 CONTACT_TWITTER: '', // 你的twitter个人主页 - CONTACT_GITHUB: 'https://github.com/tangly1024', // 你的github个人主页 - CONTACT_TELEGRAM: 'https://t.me/tangly_1024', // 你的telegram 地址 例如 https://t.me/tangly_1024 + CONTACT_GITHUB: 'https://github.com/Vixcity', // 你的github个人主页 + CONTACT_TELEGRAM: '', // 你的telegram 地址 例如 https://t.me/tangly_1024 CONTACT_LINKEDIN: '', // 你的linkedIn 首页 // 网站默认使用PingFangSC及NotoSansSC, @@ -30,9 +30,6 @@ const BLOG = { CUSTOM_FONT_SANS: ['LXGW WenKai'], // 自定义无衬线字体 CUSTOM_FONT_SERIF: ['LXGW WenKai'], // 自定义衬线字体 - // 侧栏布局 是否反转(左变右,右变左) 已支持主题: hexo next medium fukasawa example - LAYOUT_SIDEBAR_REVERSE: false, - // 一个小插件展示你的facebook fan page~ @see https://tw.andys.pro/article/add-facebook-fanpage-notionnext FACEBOOK_PAGE_TITLE: process.env.NEXT_PUBLIC_FACEBOOK_PAGE_TITLE || null, // 邊欄 Facebook Page widget 的標題欄,填''則無標題欄 e.g FACEBOOK 粉絲團' FACEBOOK_PAGE: process.env.NEXT_PUBLIC_FACEBOOK_PAGE || null, // Facebook Page 的連結 e.g https://www.facebook.com/tw.andys.pro @@ -55,45 +52,29 @@ const BLOG = { POST_LIST_PREVIEW: process.env.NEXT_PUBLIC_POST_PREVIEW || 'false', // 是否在列表加载文章预览 POST_PREVIEW_LINES: 12, // 预览博客行数 POST_RECOMMEND_COUNT: 6, // 推荐文章数量 - POSTS_PER_PAGE: 12, // post counts per page - POSTS_SORT_BY: 'notion', // 排序方式 'date'按时间,'notion'由notion控制 + POSTS_PER_PAGE: 10, // post counts per page + POSTS_SORT_BY: 'date', // 排序方式 'date'按时间,'notion'由notion控制 PREVIEW_CATEGORY_COUNT: 16, // 首页最多展示的分类数量,0为不限制 PREVIEW_TAG_COUNT: 16, // 首页最多展示的标签数量,0为不限制 // 鼠标点击烟花特效 - FIREWORKS: process.env.NEXT_PUBLIC_FIREWORKS || false, // 开关 + FIREWORKS: process.env.NEXT_PUBLIC_FIREWORKS || true, // 鼠标点击烟花特效 // 烟花色彩,感谢 https://github.com/Vixcity 提交的色彩 FIREWORKS_COLOR: ['255, 20, 97', '24, 255, 146', '90, 135, 255', '251, 243, 140'], // 悬浮挂件 WIDGET_PET: process.env.NEXT_PUBLIC_WIDGET_PET || true, // 是否显示宠物挂件 - WIDGET_PET_LINK: 'https://cdn.jsdelivr.net/npm/live2d-widget-model-wanko@1.0.5/assets/wanko.model.json', // 挂件模型地址 @see https://github.com/xiazeyu/live2d-widget-models - WIDGET_PET_SWITCH_THEME: true, // 点击宠物挂件切换博客主题 - - // 音乐播放插件 - MUSIC_PLAYER: process.env.NEXT_PUBLIC_MUSIC_PLAYER || false, // 是否使用音乐播放插件 - MUSIC_PLAYER_VISIBLE: process.env.NEXT_PUBLIC_MUSIC_PLAYER_VISIBLE || true, // 是否在左下角显示播放和切换,如果使用播放器,打开自动播放再隐藏,就会以类似背景音乐的方式播放,无法取消和暂停 - MUSIC_PLAYER_AUTO_PLAY: process.env.NEXT_PUBLIC_MUSIC_PLAYER_AUTO_PLAY || true, // 是否自动播放,不过自动播放时常不生效(移动设备不支持自动播放) - MUSIC_PLAYER_SHOW_LRC: process.env.NEXT_PUBLIC_MUSIC_PLAYER_SHOW_LRC || false, // 是否展示歌词(前提是有配置歌词路径,对 meting 无效) - MUSIC_PLAYER_ORDER: 'list', // 默认播放方式,顺序 list,随机 random - MUSIC_PLAYER_AUDIO_LIST: [ // 示例音乐列表。除了以下配置外,还可配置歌词,具体配置项看此文档 https://aplayer.js.org/#/zh-Hans/ - { - name: '风を共に舞う気持ち', - artist: 'Falcom Sound Team jdk', - url: 'https://music.163.com/song/media/outer/url?id=731419.mp3', - cover: 'https://p2.music.126.net/kn6ugISTonvqJh3LHLaPtQ==/599233837187278.jpg' - }, - { - name: '王都グランセル', - artist: 'Falcom Sound Team jdk', - url: 'https://music.163.com/song/media/outer/url?id=731355.mp3', - cover: 'https://p1.music.126.net/kn6ugISTonvqJh3LHLaPtQ==/599233837187278.jpg' - } - ], - MUSIC_PLAYER_METING: process.env.NEXT_PUBLIC_MUSIC_PLAYER_METING || false, // 是否要开启 MetingJS,从平台获取歌单。会覆盖自定义的 MUSIC_PLAYER_AUDIO_LIST,更多配置信息:https://github.com/metowolf/MetingJS - MUSIC_PLAYER_METING_SERVER: process.env.NEXT_PUBLIC_MUSIC_PLAYER_METING_SERVER || 'netease', // 音乐平台,[netease, tencent, kugou, xiami, baidu] - MUSIC_PLAYER_METING_ID: process.env.NEXT_PUBLIC_MUSIC_PLAYER_METING_ID || '60198', // 对应歌单的 id + WIDGET_PET_LINK: 'https://cdn.jsdelivr.net/npm/live2d-widget-model-unitychan@1.0.5/assets/unitychan.model.json', // 挂件模型地址 @see https://github.com/xiazeyu/live2d-widget-models + // 好看的主题 + // https://cdn.jsdelivr.net/npm/live2d-widget-model-ni-j@1.0.5/assets/ni-j.model.json + // https://cdn.jsdelivr.net/npm/live2d-widget-model-nipsilon@1.0.5/assets/nipsilon.model.json + // https://cdn.jsdelivr.net/npm/live2d-widget-model-nito@1.0.5/assets/nito.model.json + // https://cdn.jsdelivr.net/npm/live2d-widget-model-shizuku@1.0.5/assets/shizuku.model.json + // https://cdn.jsdelivr.net/npm/live2d-widget-model-unitychan@1.0.5/assets/unitychan.model.json + // https://cdn.jsdelivr.net/npm/live2d-widget-model-koharu@1.0.5/assets/koharu.model.json + // https://cdn.jsdelivr.net/npm/live2d-widget-model-haruto@1.0.5/assets/haruto.model.json + WIDGET_PET_SWITCH_THEME: false, // 点击宠物挂件切换博客主题 // ----> 评论互动 可同时开启多个支持 WALINE VALINE GISCUS CUSDIS UTTERRANCES GITALK @@ -174,9 +155,9 @@ const BLOG = { // 作废配置 AVATAR: '/avatar.png', // 作者头像,被notion中的ICON覆盖。若无ICON则取public目录下的avatar.png - TITLE: process.env.NEXT_PUBLIC_TITLE || 'NotionNext BLOG', // 站点标题 ,被notion中的页面标题覆盖 + TITLE: process.env.NEXT_PUBLIC_TITLE || 'VIXCITY BLOG', // 站点标题 ,被notion中的页面标题覆盖 HOME_BANNER_IMAGE: './bg_image.jpg', // 首页背景大图, 会被notion中的封面图覆盖,若无封面图则会使用代码中的 /public/bg_image.jpg 文件 - DESCRIPTION: process.env.NEXT_PUBLIC_DESCRIPTION || '这是一个由NotionNext生成的站点', // 站点描述,被notion中的页面描述覆盖 + DESCRIPTION: process.env.NEXT_PUBLIC_DESCRIPTION || '我的小破博客', // 站点描述,被notion中的页面描述覆盖 // 开发相关 NOTION_ACCESS_TOKEN: process.env.NOTION_ACCESS_TOKEN || '', // Useful if you prefer not to make your database public From 7da44bd0def8ce3667a286d92b8596577ca0c280 Mon Sep 17 00:00:00 2001 From: Vixcity <2091283625@qq.com> Date: Tue, 3 Jan 2023 20:56:55 +0800 Subject: [PATCH 05/11] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.local | 2 +- components/ThemeSwitch.js | 5 +- next.config.js | 3 + package.json | 10 +- pages/404.js | 2 +- pages/[...slug].js | 2 +- themes/example/LayoutArchive.js | 8 +- themes/example/LayoutCategoryIndex.js | 32 ++- themes/example/LayoutTagIndex.js | 38 ++-- themes/example/components/ArticleInfo.js | 63 +++--- themes/example/components/BlogListPage.js | 84 ++++---- themes/example/components/BlogListScroll.js | 60 +++--- .../components/ExampleRecentComments.js | 4 +- themes/example/components/Header.js | 22 +- themes/example/components/Nav.js | 35 ++- themes/example/components/SideBar.js | 80 +++---- themes/fukasawa/LayoutCategoryIndex.js | 40 ++-- themes/fukasawa/components/ArticleAround.js | 28 +-- themes/fukasawa/components/ArticleDetail.js | 147 +++++++------ themes/fukasawa/components/BlogCard.js | 19 +- themes/fukasawa/components/BlogPostArchive.js | 11 +- themes/fukasawa/components/GroupCategory.js | 21 +- themes/fukasawa/components/GroupMenu.js | 44 ++-- themes/fukasawa/components/Logo.js | 14 +- .../fukasawa/components/PaginationSimple.js | 32 +-- themes/fukasawa/components/TagItem.js | 25 +-- themes/fukasawa/components/TagItemMini.js | 24 +-- themes/hexo/LayoutCategoryIndex.js | 6 +- themes/hexo/LayoutSearch.js | 106 +++++----- themes/hexo/LayoutTag.js | 30 ++- themes/hexo/components/ArticleAdjacent.js | 28 +-- themes/hexo/components/ArticleCopyright.js | 42 ++-- themes/hexo/components/ArticleRecommend.js | 33 +-- themes/hexo/components/BlogPostArchive.js | 13 +- themes/hexo/components/BlogPostCard.js | 42 ++-- themes/hexo/components/Catalog.js | 10 +- themes/hexo/components/CategoryGroup.js | 24 +-- themes/hexo/components/HeaderArticle.js | 12 +- themes/hexo/components/HexoRecentComments.js | 26 ++- themes/hexo/components/LatestPostsGroup.js | 80 +++---- themes/hexo/components/Logo.js | 12 +- themes/hexo/components/MenuButtonGroupTop.js | 41 ++-- themes/hexo/components/MenuGroupCard.js | 41 ++-- themes/hexo/components/MenuList.js | 46 ++-- themes/hexo/components/NavButtonGroup.js | 23 +- themes/hexo/components/PaginationNumber.js | 84 ++++---- themes/hexo/components/TagItemMini.js | 24 +-- themes/hexo/components/TopNav.js | 22 +- themes/matery/LayoutCategory.js | 42 ++-- themes/matery/LayoutCategoryIndex.js | 36 ++-- themes/matery/LayoutSearch.js | 106 +++++----- themes/matery/LayoutSlug.js | 4 +- themes/matery/components/ArticleCopyright.js | 42 ++-- themes/matery/components/ArticleInfo.js | 62 +++--- themes/matery/components/ArticleRecommend.js | 37 ++-- themes/matery/components/BlogPostArchive.js | 13 +- themes/matery/components/BlogPostCard.js | 137 ++++++------ themes/matery/components/Catalog.js | 6 +- themes/matery/components/CategoryGroup.js | 24 +-- .../matery/components/HexoRecentComments.js | 26 ++- themes/matery/components/LatestPostsGroup.js | 80 +++---- themes/matery/components/Logo.js | 12 +- .../matery/components/MenuButtonGroupTop.js | 41 ++-- themes/matery/components/MenuGroupCard.js | 41 ++-- themes/matery/components/MenuList.js | 46 ++-- themes/matery/components/NavButtonGroup.js | 23 +- themes/matery/components/PaginationNumber.js | 84 ++++---- themes/matery/components/PaginationSimple.js | 6 +- themes/matery/components/SideBar.js | 66 +++--- themes/matery/components/TagItemMiddle.js | 22 +- themes/matery/components/TagItemMini.js | 18 +- themes/matery/components/TopNav.js | 76 +++---- themes/medium/LayoutArchive.js | 10 +- themes/medium/LayoutCategoryIndex.js | 40 ++-- themes/medium/components/ArticleAround.js | 28 +-- themes/medium/components/ArticleDetail.js | 98 +++++---- themes/medium/components/BlogPostCard.js | 32 ++- themes/medium/components/BottomMenuBar.js | 6 +- themes/medium/components/CategoryItem.js | 19 +- themes/medium/components/GroupMenu.js | 44 ++-- themes/medium/components/LeftMenuBar.js | 20 +- themes/medium/components/LogoBar.js | 12 +- themes/medium/components/PaginationSimple.js | 32 +-- themes/medium/components/TagItemMini.js | 24 +-- themes/medium/components/TopNavBar.js | 75 +++---- themes/next/LayoutCategoryIndex.js | 40 ++-- themes/next/components/ArticleCopyright.js | 42 ++-- themes/next/components/ArticleDetail.js | 199 +++++++++--------- themes/next/components/BlogAround.js | 28 +-- themes/next/components/BlogPostArchive.js | 13 +- themes/next/components/BlogPostCard.js | 52 ++--- themes/next/components/CategoryGroup.js | 21 +- themes/next/components/CategoryList.js | 49 ++--- themes/next/components/ContactButton.js | 12 +- themes/next/components/LatestPostsGroup.js | 64 +++--- themes/next/components/Logo.js | 14 +- themes/next/components/MenuButtonGroup.js | 47 ++--- themes/next/components/NextRecentComments.js | 4 +- themes/next/components/PaginationNumber.js | 112 +++++----- themes/next/components/PaginationSimple.js | 6 +- themes/next/components/RecommendPosts.js | 10 +- themes/next/components/SideAreaRight.js | 116 +++++----- themes/next/components/SideBar.js | 112 +++++----- themes/next/components/TagItem.js | 25 +-- themes/next/components/TagItemMini.js | 24 +-- themes/next/components/TopNav.js | 22 +- themes/nobelium/LayoutArchive.js | 10 +- themes/nobelium/LayoutCategoryIndex.js | 32 ++- themes/nobelium/LayoutTagIndex.js | 38 ++-- themes/nobelium/components/BlogListPage.js | 38 ++-- themes/nobelium/components/BlogListScroll.js | 60 +++--- themes/nobelium/components/BlogPost.js | 40 ++-- .../components/ExampleRecentComments.js | 4 +- themes/nobelium/components/Nav.js | 152 ++++++------- themes/nobelium/components/SideBar.js | 80 +++---- themes/nobelium/components/TagItem.js | 14 +- themes/nobelium/components/Tags.js | 8 +- 117 files changed, 2072 insertions(+), 2506 deletions(-) diff --git a/.env.local b/.env.local index 2d0e2eba..a5695000 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.8.0 +NEXT_PUBLIC_VERSION=3.7.3 diff --git a/components/ThemeSwitch.js b/components/ThemeSwitch.js index d9d8b9b6..17973c04 100644 --- a/components/ThemeSwitch.js +++ b/components/ThemeSwitch.js @@ -19,9 +19,10 @@ export function ThemeSwitch() {
{/*
{theme}
*/} - {ALL_THEME.map(t => { - return + const selected = t === theme + return })}
diff --git a/next.config.js b/next.config.js index fb92a754..f2a86bc5 100644 --- a/next.config.js +++ b/next.config.js @@ -3,6 +3,9 @@ const withBundleAnalyzer = require('@next/bundle-analyzer')({ }) module.exports = withBundleAnalyzer({ + future: { + webpack5: true + }, images: { // 图片压缩 formats: ['image/avif', 'image/webp'], diff --git a/package.json b/package.json index c83a29c2..8e401fc8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "notion-next", - "version": "3.8.0", + "version": "3.7.3", "homepage": "https://github.com/tangly1024/NotionNext.git", "license": "MIT", "repository": { @@ -40,16 +40,16 @@ "memory-cache": "^0.2.0", "mermaid": "9.2.2", "mongodb": "^4.6.0", - "next": "^13.1.1", + "next": "12.1.6", "notion-client": "6.15.6", "notion-utils": "6.15.6", "preact": "^10.5.15", "prism-themes": "1.9.0", "qrcode.react": "^1.0.1", - "react": "^18.2.0", + "react": "17.0.2", "react-cookies": "^0.1.1", "react-cusdis": "^2.1.3", - "react-dom": "^18.2.0", + "react-dom": "17.0.2", "react-facebook": "^8.1.4", "react-messenger-customer-chat": "^0.8.0", "react-notion-x": "6.15.6", @@ -64,7 +64,7 @@ "@waline/client": "^2.5.1", "autoprefixer": "^10.4.13", "eslint": "^7.26.0", - "eslint-config-next": "^13.1.1", + "eslint-config-next": "^11.0.0", "eslint-config-standard": "^16.0.2", "eslint-plugin-import": "^2.23.0", "eslint-plugin-node": "^11.1.0", diff --git a/pages/404.js b/pages/404.js index d63b1e5e..43172bfb 100644 --- a/pages/404.js +++ b/pages/404.js @@ -15,7 +15,7 @@ const NoFound = props => { } export async function getStaticProps () { - const props = (await getGlobalNotionData({ from: '404' })) || {} + const props = await getGlobalNotionData({ from: '404' }) || {} return { props } } diff --git a/pages/[...slug].js b/pages/[...slug].js index e5607ed7..3013696d 100644 --- a/pages/[...slug].js +++ b/pages/[...slug].js @@ -50,7 +50,7 @@ const Slug = props => { } } }, 20 * 1000) - const meta = { title: `${props?.siteInfo?.title || BLOG.TITLE} | loading`, image: siteInfo?.pageCover || BLOG.HOME_BANNER_IMAGE } + const meta = { title: `${props?.siteInfo?.title || BLOG.TITLE} | loading`, image: siteInfo?.pageCover } return } diff --git a/themes/example/LayoutArchive.js b/themes/example/LayoutArchive.js index a89265f3..b85860e0 100644 --- a/themes/example/LayoutArchive.js +++ b/themes/example/LayoutArchive.js @@ -45,10 +45,10 @@ export const LayoutArchive = props => { - - {post.title} - + > + + {post.title} + diff --git a/themes/example/LayoutCategoryIndex.js b/themes/example/LayoutCategoryIndex.js index 1230c20f..28b98b6e 100644 --- a/themes/example/LayoutCategoryIndex.js +++ b/themes/example/LayoutCategoryIndex.js @@ -4,24 +4,16 @@ import LayoutBase from './LayoutBase' export const LayoutCategoryIndex = (props) => { const { categories } = props - return ( - -
- {categories && categories.map(category => { - return ( - -
- {category.name}({category.count}) -
- - ) - })} -
-
- ) + return +
+ {categories && categories.map(category => { + return +
+ {category.name}({category.count}) +
+ + })} +
+
} diff --git a/themes/example/LayoutTagIndex.js b/themes/example/LayoutTagIndex.js index 6d2873a8..6a89e168 100644 --- a/themes/example/LayoutTagIndex.js +++ b/themes/example/LayoutTagIndex.js @@ -3,27 +3,19 @@ import LayoutBase from './LayoutBase' export const LayoutTagIndex = (props) => { const { tags } = props - return ( - -
-
- {tags.map(tag => { - return ( -
- - -
{tag.name + (tag.count ? `(${tag.count})` : '')}
- - -
- ); - })} -
-
- ); + return +
+
+ {tags.map(tag => { + return + })} +
+
} diff --git a/themes/example/components/ArticleInfo.js b/themes/example/components/ArticleInfo.js index 0b34fb12..7317d533 100644 --- a/themes/example/components/ArticleInfo.js +++ b/themes/example/components/ArticleInfo.js @@ -8,45 +8,40 @@ export const ArticleInfo = (props) => { const { locale } = useGlobal() const date = formatDate(post?.date?.start_date || post?.createdTime, locale.LOCALE) - return ( -
-
- {post?.type !== 'Page' && <> - - + return
+
+ {post?.type !== 'Page' && <> + + {post.category} + + + | + } - - | - } - - {post?.type !== 'Page' && (<> - - + {post?.type !== 'Page' && (<> + + {date} - - - | - - {locale.COMMON.LAST_EDITED_TIME}: {post.lastEditedTime} - - | - - -   - + + + | + + {locale.COMMON.LAST_EDITED_TIME}: {post.lastEditedTime} - )} + | + + +   + + + )} -
+
-
- ) + } diff --git a/themes/example/components/BlogListPage.js b/themes/example/components/BlogListPage.js index 390bf90a..c98ccd54 100644 --- a/themes/example/components/BlogListPage.js +++ b/themes/example/components/BlogListPage.js @@ -15,55 +15,47 @@ export const BlogListPage = props => { const showNext = page < totalPage const pagePrefix = router.asPath.replace(/\/page\/[1-9]\d*/, '').replace(/\/$/, '') - return ( -
+ return
-
- {posts?.map(p => ( -
-

- - {p.title} - -

+
+ {posts?.map(p => ( +
+

+ + {p.title} + +

-
- by {BLOG.AUTHOR} on {p.date?.start_date || p.createdTime} - | - {p.category} - {/* | */} - {/* 2 Comments */} -
+
+ by {BLOG.AUTHOR} on {p.date?.start_date || p.createdTime} + | + {p.category} + {/* | */} + {/* 2 Comments */} +
-

- {p.summary} +

+ {p.summary} +

+ {/* 搜索结果 */} + {p.results && ( +

+ {p.results.map(r => ( + {r} + ))}

- {/* 搜索结果 */} - {p.results && ( -

- {p.results.map(r => ( - {r} - ))} -

- )} -
- ))} -
- -
- - {locale.PAGINATION.PREV} - - - {locale.PAGINATION.NEXT} - -
+ )} +
+ ))}
- ); + + +
} diff --git a/themes/example/components/BlogListScroll.js b/themes/example/components/BlogListScroll.js index d70e4bc5..c9859c0b 100644 --- a/themes/example/components/BlogListScroll.js +++ b/themes/example/components/BlogListScroll.js @@ -43,40 +43,36 @@ export const BlogListScroll = props => { } }) - return ( -
- {postsToShow.map(p => ( -
-

- - {p.title} - -

+ return
+ {postsToShow.map(p => ( + - ))} - -
- {' '} - {hasMore ? locale.COMMON.MORE : `${locale.COMMON.NO_MORE} 😰`}{' '} -
+

+ {p.summary} +

+
+ ))} +
+ {' '} + {hasMore ? locale.COMMON.MORE : `${locale.COMMON.NO_MORE} 😰`}{' '}
- ); + +
} diff --git a/themes/example/components/ExampleRecentComments.js b/themes/example/components/ExampleRecentComments.js index 42c8805e..e1fe86ca 100644 --- a/themes/example/components/ExampleRecentComments.js +++ b/themes/example/components/ExampleRecentComments.js @@ -26,10 +26,10 @@ const ExampleRecentComments = (props) => { {!onLoading && comments && comments.length === 0 &&
No Comments
} {!onLoading && comments && comments.length > 0 && comments.map((comment) =>
-
--{comment.nick}
+
)} - ; + } export default ExampleRecentComments diff --git a/themes/example/components/Header.js b/themes/example/components/Header.js index 7c8355ae..424edcae 100644 --- a/themes/example/components/Header.js +++ b/themes/example/components/Header.js @@ -7,19 +7,15 @@ import Link from 'next/link' export const Header = (props) => { const { siteInfo } = props - return ( -
-
- - + return
+
- ); +
+
} diff --git a/themes/example/components/Nav.js b/themes/example/components/Nav.js index 5bfb8b2d..26610035 100644 --- a/themes/example/components/Nav.js +++ b/themes/example/components/Nav.js @@ -20,25 +20,20 @@ export const Nav = (props) => { links = links.concat(customNav) } - return ( - } diff --git a/themes/example/components/SideBar.js b/themes/example/components/SideBar.js index 986063b0..ea45f851 100644 --- a/themes/example/components/SideBar.js +++ b/themes/example/components/SideBar.js @@ -8,58 +8,48 @@ const ExampleRecentComments = dynamic(() => import('./ExampleRecentComments')) export const SideBar = (props) => { const { locale } = useGlobal() const { latestPosts, categories } = props - return ( -
+ return
- - - {BLOG.COMMENT_WALINE_SERVER_URL && BLOG.COMMENT_WALINE_RECENT && } - + -
- ); +
} diff --git a/themes/fukasawa/LayoutCategoryIndex.js b/themes/fukasawa/LayoutCategoryIndex.js index e44e86dc..d517d65c 100644 --- a/themes/fukasawa/LayoutCategoryIndex.js +++ b/themes/fukasawa/LayoutCategoryIndex.js @@ -5,29 +5,21 @@ import LayoutBase from './LayoutBase' export const LayoutCategoryIndex = (props) => { const { locale } = useGlobal() const { categories } = props - return ( - -
-
- {locale.COMMON.CATEGORY}: -
-
- {categories && categories.map(category => { - return ( - -
- {category.name}({category.count}) -
- - ) - })} -
+ return +
+
+ {locale.COMMON.CATEGORY}:
- - ) +
+ {categories && categories.map(category => { + return +
+ {category.name}({category.count}) +
+ + })} +
+
+
} diff --git a/themes/fukasawa/components/ArticleAround.js b/themes/fukasawa/components/ArticleAround.js index b0de69c7..1b145b33 100644 --- a/themes/fukasawa/components/ArticleAround.js +++ b/themes/fukasawa/components/ArticleAround.js @@ -9,24 +9,16 @@ export default function ArticleAround ({ prev, next }) { if (!prev || !next) { return <> } - return ( -
- - + return
+ + {prev.title} - - - - {next.title} + + + + {next.title} - - -
- ); + + +
} diff --git a/themes/fukasawa/components/ArticleDetail.js b/themes/fukasawa/components/ArticleDetail.js index 19968e72..9a939766 100644 --- a/themes/fukasawa/components/ArticleDetail.js +++ b/themes/fukasawa/components/ArticleDetail.js @@ -17,91 +17,86 @@ export default function ArticleDetail(props) { } const { locale } = useGlobal() const date = formatDate(post?.date?.start_date || post?.createdTime, locale.LOCALE) - return ( -
- {post?.type && !post?.type !== 'Page' && post?.page_cover && ( -
- {/* eslint-disable-next-line @next/next/no-img-element */} - {post.title} + return (
+ {post?.type && !post?.type !== 'Page' && post?.page_cover && ( +
+ {/* eslint-disable-next-line @next/next/no-img-element */} + {post.title} +
+ )} +
+ +
+ + {/* 文章Title */} +
+ {post.title}
- )} -
-
+
+
- {/* 文章Title */} -
- {post.title} + {post?.category && (<> + + + + {post.category} + + + | + )} + + {post?.type !== 'Page' && (<> + + + {date} + + + | + + {locale.COMMON.LAST_EDITED_TIME}: {post.lastEditedTime} + + )} + +
+ +   + +
-
-
- - {post?.category && (<> - - - - {post.category} - - - | - )} - - {post?.type !== 'Page' && (<> - - - {date} - - - | - - {locale.COMMON.LAST_EDITED_TIME}: {post.lastEditedTime} - - )} - -
- -   - -
-
- -
- -
- - {/* Notion文章主体 */} -
- {post && }
-
- {/* 文章内嵌广告 */} - -
+
-
+ {/* Notion文章主体 */} +
+ {post && } +
- {post.type === 'Post' && } +
+ {/* 文章内嵌广告 */} + +
- {/* 评论互动 */} -
- -
+ + + {post.type === 'Post' && } + + {/* 评论互动 */} +
+
- ); +
) } diff --git a/themes/fukasawa/components/BlogCard.js b/themes/fukasawa/components/BlogCard.js index 1c42923f..3cde4df0 100644 --- a/themes/fukasawa/components/BlogCard.js +++ b/themes/fukasawa/components/BlogCard.js @@ -13,14 +13,13 @@ const BlogCard = ({ post, showSummary }) => { className="animate__animated animate__fadeIn flex flex-col-reverse justify-between duration-300" >
- - - {post.title} - + + + {post.title} + {(!showPreview || showSummary) && ( @@ -31,7 +30,7 @@ const BlogCard = ({ post, showSummary }) => {
{CONFIG_FUKA.POST_LIST_COVER && post?.page_cover && ( - +
{/* eslint-disable-next-line @next/next/no-img-element */} { )}
- ); + ) } export default BlogCard diff --git a/themes/fukasawa/components/BlogPostArchive.js b/themes/fukasawa/components/BlogPostArchive.js index c594d7d1..45c85ce1 100644 --- a/themes/fukasawa/components/BlogPostArchive.js +++ b/themes/fukasawa/components/BlogPostArchive.js @@ -29,13 +29,10 @@ const BlogArchiveItem = ({ posts = [], archiveTitle }) => {
{post.date?.start_date}{' '}   - - - {post.title} - + + + {post.title} +
diff --git a/themes/fukasawa/components/GroupCategory.js b/themes/fukasawa/components/GroupCategory.js index 876a8f70..fabc2e57 100644 --- a/themes/fukasawa/components/GroupCategory.js +++ b/themes/fukasawa/components/GroupCategory.js @@ -10,22 +10,17 @@ function GroupCategory ({ currentCategory, categories }) {
{categories.map(category => { const selected = currentCategory === category.name - return ( - - + return + {category.name}({category.count}) - - ); + + })}
- ; + } export default GroupCategory diff --git a/themes/fukasawa/components/GroupMenu.js b/themes/fukasawa/components/GroupMenu.js index afaec0e2..906ef217 100644 --- a/themes/fukasawa/components/GroupMenu.js +++ b/themes/fukasawa/components/GroupMenu.js @@ -20,32 +20,24 @@ function GroupMenu ({ customNav }) { links = links.concat(customNav) } - return ( - - ); + return } export default GroupMenu diff --git a/themes/fukasawa/components/Logo.js b/themes/fukasawa/components/Logo.js index 3b6720fb..42cbc268 100644 --- a/themes/fukasawa/components/Logo.js +++ b/themes/fukasawa/components/Logo.js @@ -2,15 +2,11 @@ import Link from 'next/link' const Logo = props => { const { siteInfo } = props - return ( -
- - {siteInfo?.title} - -
- ); + return
+ + {siteInfo?.title} + +
} export default Logo diff --git a/themes/fukasawa/components/PaginationSimple.js b/themes/fukasawa/components/PaginationSimple.js index cbbf23d0..3c737b6d 100644 --- a/themes/fukasawa/components/PaginationSimple.js +++ b/themes/fukasawa/components/PaginationSimple.js @@ -26,12 +26,15 @@ const PaginationSimple = ({ page, showNext }) => { query: router.query.s ? { s: router.query.s } : {} }} passHref - rel="prev" - className={`${ - currentPage === 1 ? 'invisible' : 'visible' - } text-center w-full duration-200 px-4 py-2 hover:border-black border-b-2 hover:font-bold`}> - ←{locale.PAGINATION.PREV} - + > + { query: router.query.s ? { s: router.query.s } : {} }} passHref - rel="next" - className={`${ - showNext ? 'visible' : 'invisible' - } text-center w-full duration-200 px-4 py-2 hover:border-black border-b-2 hover:font-bold`}> - - {locale.PAGINATION.NEXT}→ + > +
- ); + ) } export default PaginationSimple diff --git a/themes/fukasawa/components/TagItem.js b/themes/fukasawa/components/TagItem.js index 18511426..ef1139b5 100644 --- a/themes/fukasawa/components/TagItem.js +++ b/themes/fukasawa/components/TagItem.js @@ -8,20 +8,17 @@ const TagItem = ({ tag, selected }) => {
{ locale.COMMON.NOTAG }
} return ( - -
  • -
    - {selected && } {`${tag.name} `} {tag.count ? `(${tag.count})` : ''} -
    -
  • - - ); + +
  • +
    + {selected && } {`${tag.name} `} {tag.count ? `(${tag.count})` : ''} +
    +
  • + + ) } export default TagItem diff --git a/themes/fukasawa/components/TagItemMini.js b/themes/fukasawa/components/TagItemMini.js index 26295088..fb9efc58 100644 --- a/themes/fukasawa/components/TagItemMini.js +++ b/themes/fukasawa/components/TagItemMini.js @@ -1,21 +1,15 @@ import Link from 'next/link' const TagItemMini = ({ tag, selected = false }) => { - return ( - - -
    {selected && } {tag.name + (tag.count ? `(${tag.count})` : '')}
    - - - ); + return + +
    {selected && } {tag.name + (tag.count ? `(${tag.count})` : '')}
    +
    + } export default TagItemMini diff --git a/themes/hexo/LayoutCategoryIndex.js b/themes/hexo/LayoutCategoryIndex.js index 7d7165a6..6d21da03 100644 --- a/themes/hexo/LayoutCategoryIndex.js +++ b/themes/hexo/LayoutCategoryIndex.js @@ -16,11 +16,7 @@ export const LayoutCategoryIndex = props => {
    {categories.map(category => { return ( - +
    { }, 100) }) return ( - - {!currentSearch && <> -
    - - {/* 分类 */} - -
    - - {locale.COMMON.CATEGORY}: -
    -
    - {categories?.map(category => { - return ( - -
    + {!currentSearch && <> +
    + + {/* 分类 */} + +
    + + {locale.COMMON.CATEGORY}: +
    +
    + {categories?.map(category => { + return ( + - - {category.name}({category.count}) +
    + + {category.name}({category.count}) +
    + + ) + })} +
    +
    + {/* 标签 */} + +
    + + {locale.COMMON.TAGS}: +
    +
    + {tags?.map(tag => { + return ( +
    +
    - - ) - })} -
    -
    - {/* 标签 */} - -
    - - {locale.COMMON.TAGS}: -
    -
    - {tags?.map(tag => { - return ( -
    - -
    - ) - })} -
    -
    -
    - } + ) + })} +
    + +
    + } - {currentSearch && <> -
    - {BLOG.POST_LIST_STYLE === 'page' ? : } -
    - } + {currentSearch && <> +
    + {BLOG.POST_LIST_STYLE === 'page' ? : } +
    + } - + ) } diff --git a/themes/hexo/LayoutTag.js b/themes/hexo/LayoutTag.js index ec8fb6f9..1eb2c249 100644 --- a/themes/hexo/LayoutTag.js +++ b/themes/hexo/LayoutTag.js @@ -10,23 +10,17 @@ export const LayoutTag = (props) => { return t.name === props.tag }) - return ( - - {tag && ( - + )} + {BLOG.POST_LIST_STYLE === 'page' ? : } + } diff --git a/themes/hexo/components/ArticleAdjacent.js b/themes/hexo/components/ArticleAdjacent.js index 6e1face7..f5d14574 100644 --- a/themes/hexo/components/ArticleAdjacent.js +++ b/themes/hexo/components/ArticleAdjacent.js @@ -10,24 +10,16 @@ export default function ArticleAdjacent ({ prev, next }) { if (!prev || !next || !CONFIG_HEXO.ARTICLE_ADJACENT) { return <> } - return ( -
    - - + return
    + + {prev.title} - - - - {next.title} + + + + {next.title} - - -
    - ); + + +
    } diff --git a/themes/hexo/components/ArticleCopyright.js b/themes/hexo/components/ArticleCopyright.js index 80ffd8c9..57151869 100644 --- a/themes/hexo/components/ArticleCopyright.js +++ b/themes/hexo/components/ArticleCopyright.js @@ -16,26 +16,24 @@ export default function ArticleCopyright () { }) const { locale } = useGlobal() - return ( -
    -
      -
    • - {locale.COMMON.AUTHOR}: - - {BLOG.AUTHOR} - -
    • -
    • - {locale.COMMON.URL}: - - {path} - -
    • -
    • - {locale.COMMON.COPYRIGHT}: - {locale.COMMON.COPYRIGHT_NOTICE} -
    • -
    -
    - ); + return
    +
      +
    • + {locale.COMMON.AUTHOR}: + + {BLOG.AUTHOR} + +
    • +
    • + {locale.COMMON.URL}: + + {path} + +
    • +
    • + {locale.COMMON.COPYRIGHT}: + {locale.COMMON.COPYRIGHT_NOTICE} +
    • +
    +
    } diff --git a/themes/hexo/components/ArticleRecommend.js b/themes/hexo/components/ArticleRecommend.js index 30373f67..af081a1c 100644 --- a/themes/hexo/components/ArticleRecommend.js +++ b/themes/hexo/components/ArticleRecommend.js @@ -34,29 +34,32 @@ export default function ArticleRecommend({ recommendPosts, siteInfo }) { : `url("${siteInfo?.pageCover}")` return ( - ( - -
    + -
    - diff --git a/themes/hexo/components/BlogPostArchive.js b/themes/hexo/components/BlogPostArchive.js index 20887d45..227a2697 100644 --- a/themes/hexo/components/BlogPostArchive.js +++ b/themes/hexo/components/BlogPostArchive.js @@ -29,20 +29,17 @@ const BlogPostArchive = ({ posts = [], archiveTitle }) => {
    {post.date?.start_date}{' '}   - - - {post.title} - + + + {post.title} +
    ))}
    - ); + ) } } diff --git a/themes/hexo/components/BlogPostCard.js b/themes/hexo/components/BlogPostCard.js index dd6cabde..06f4d8c7 100644 --- a/themes/hexo/components/BlogPostCard.js +++ b/themes/hexo/components/BlogPostCard.js @@ -20,14 +20,13 @@ const BlogPostCard = ({ post, showSummary }) => { className="animate__animated animate__fadeIn flex flex-col-reverse lg:flex-row justify-between duration-300" >
    - - - {post.title} - + + + {post.title} +
    { - - - {post.date?.start_date || post.lastEditedTime} - + > + + + {post.date?.start_date || post.lastEditedTime} +
    @@ -68,14 +67,11 @@ const BlogPostCard = ({ post, showSummary }) => { )}
    - - - - {post.category} - + + + + {post.category} +
    @@ -89,7 +85,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 */} { )}
    - ); + ) } export default BlogPostCard diff --git a/themes/hexo/components/Catalog.js b/themes/hexo/components/Catalog.js index 9c80cd1a..c51ee499 100644 --- a/themes/hexo/components/Catalog.js +++ b/themes/hexo/components/Catalog.js @@ -10,6 +10,10 @@ import Progress from './Progress' * @constructor */ const Catalog = ({ toc }) => { + // 无目录就直接返回空 + if (!toc || toc.length < 1) { + return <> + } // 监听滚动事件 React.useEffect(() => { window.addEventListener('scroll', actionSectionScrollSpy) @@ -25,7 +29,6 @@ const Catalog = ({ toc }) => { // 同步选中目录事件 const [activeSection, setActiveSection] = React.useState(null) - const throttleMs = 100 const actionSectionScrollSpy = React.useCallback(throttle(() => { const sections = document.getElementsByClassName('notion-h') @@ -54,11 +57,6 @@ const Catalog = ({ toc }) => { tRef?.current?.scrollTo({ top: 28 * index, behavior: 'smooth' }) }, throttleMs)) - // 无目录就直接返回空 - if (!toc || toc.length < 1) { - return <> - } - return
    目录
    diff --git a/themes/hexo/components/CategoryGroup.js b/themes/hexo/components/CategoryGroup.js index c88df60a..3b16739a 100644 --- a/themes/hexo/components/CategoryGroup.js +++ b/themes/hexo/components/CategoryGroup.js @@ -9,23 +9,17 @@ const CategoryGroup = ({ currentCategory, categories }) => {
    {categories.map(category => { const selected = currentCategory === category.name - return ( - - -
    {category.name}({category.count})
    - - - ); + return + +
    {category.name}({category.count})
    +
    + })}
    - ; + } export default CategoryGroup diff --git a/themes/hexo/components/HeaderArticle.js b/themes/hexo/components/HeaderArticle.js index 11c231b9..8ebfe2bd 100644 --- a/themes/hexo/components/HeaderArticle.js +++ b/themes/hexo/components/HeaderArticle.js @@ -32,7 +32,7 @@ export default function HeaderArticle({ post, siteInfo }) {
    {post.category && <> - +
    {post.category} @@ -46,10 +46,10 @@ export default function HeaderArticle({ post, siteInfo }) { - - {locale.COMMON.POST_TIME}:{date} - + > + + {locale.COMMON.POST_TIME}: {date} + )} @@ -65,5 +65,5 @@ export default function HeaderArticle({ post, siteInfo }) {
    - ); + ) } diff --git a/themes/hexo/components/HexoRecentComments.js b/themes/hexo/components/HexoRecentComments.js index 9c2042e6..d4cbacab 100644 --- a/themes/hexo/components/HexoRecentComments.js +++ b/themes/hexo/components/HexoRecentComments.js @@ -24,22 +24,20 @@ const HexoRecentComments = (props) => { }) }, []) - return ( - -
    - - {locale.COMMON.RECENT_COMMENTS} -
    + return +
    + + {locale.COMMON.RECENT_COMMENTS} +
    - {onLoading &&
    Loading...
    } - {!onLoading && comments && comments.length === 0 &&
    No Comments
    } - {!onLoading && comments && comments.length > 0 && comments.map((comment) =>
    -
    -
    --{comment.nick}
    -
    )} + {onLoading &&
    Loading...
    } + {!onLoading && comments && comments.length === 0 &&
    No Comments
    } + {!onLoading && comments && comments.length > 0 && comments.map((comment) =>
    + )} - - ); + } export default HexoRecentComments diff --git a/themes/hexo/components/LatestPostsGroup.js b/themes/hexo/components/LatestPostsGroup.js index a6741fc2..96eda369 100644 --- a/themes/hexo/components/LatestPostsGroup.js +++ b/themes/hexo/components/LatestPostsGroup.js @@ -18,47 +18,49 @@ const LatestPostsGroup = ({ latestPosts, siteInfo }) => { return <> } - return <> -
    -
    - - {locale.COMMON.LATEST_POSTS} + return ( + <> +
    +
    + + {locale.COMMON.LATEST_POSTS} +
    -
    - {latestPosts.map(post => { - const selected = currentPath === `${BLOG.SUB_PATH}/${post.slug}` - const headerImage = post?.page_cover - ? `url("${post.page_cover}")` - : `url("${siteInfo?.pageCover}")` + {latestPosts.map(post => { + const selected = currentPath === `${BLOG.SUB_PATH}/${post.slug}` + const headerImage = post?.page_cover + ? `url("${post.page_cover}")` + : `url("${siteInfo?.pageCover}")` - return ( - ( - -
    -
    -
    -
    {post.title}
    -
    {post.lastEditedTime}
    -
    -
    - - ) - ); - })} - ; + +
    +
    +
    +
    {post.title}
    +
    {post.lastEditedTime}
    +
    +
    +
    + + ) + })} + + ) } export default LatestPostsGroup diff --git a/themes/hexo/components/Logo.js b/themes/hexo/components/Logo.js index 61408026..2bfc6ea7 100644 --- a/themes/hexo/components/Logo.js +++ b/themes/hexo/components/Logo.js @@ -4,12 +4,10 @@ import React from 'react' const Logo = props => { const { siteInfo } = props - return ( - -
    -
    {siteInfo?.title || BLOG.TITLE}
    -
    - - ); + return +
    +
    {siteInfo?.title || BLOG.TITLE}
    +
    + } export default Logo diff --git a/themes/hexo/components/MenuButtonGroupTop.js b/themes/hexo/components/MenuButtonGroupTop.js index f6ae7a29..5d455c0b 100644 --- a/themes/hexo/components/MenuButtonGroupTop.js +++ b/themes/hexo/components/MenuButtonGroupTop.js @@ -18,30 +18,21 @@ const MenuButtonGroupTop = (props) => { links = links.concat(customNav) } - return ( - - ); + return } export default MenuButtonGroupTop diff --git a/themes/hexo/components/MenuGroupCard.js b/themes/hexo/components/MenuGroupCard.js index 1641023a..57c8375b 100644 --- a/themes/hexo/components/MenuGroupCard.js +++ b/themes/hexo/components/MenuGroupCard.js @@ -16,30 +16,21 @@ const MenuGroupCard = (props) => { { name: locale.COMMON.TAGS, to: '/tag', slot: tagSlot, show: CONFIG_HEXO.MENU_TAG } ] - return ( - - ); + return } export default MenuGroupCard diff --git a/themes/hexo/components/MenuList.js b/themes/hexo/components/MenuList.js index e5579a6a..bbab4a1b 100644 --- a/themes/hexo/components/MenuList.js +++ b/themes/hexo/components/MenuList.js @@ -21,32 +21,24 @@ const MenuList = (props) => { links = links.concat(customNav) } - return ( - - ); + return } export default MenuList diff --git a/themes/hexo/components/NavButtonGroup.js b/themes/hexo/components/NavButtonGroup.js index d490cd7b..f15b992d 100644 --- a/themes/hexo/components/NavButtonGroup.js +++ b/themes/hexo/components/NavButtonGroup.js @@ -13,21 +13,12 @@ const NavButtonGroup = (props) => { return <> } - return ( - - ); + return } export default NavButtonGroup diff --git a/themes/hexo/components/PaginationNumber.js b/themes/hexo/components/PaginationNumber.js index 0eb0b001..fba781e2 100644 --- a/themes/hexo/components/PaginationNumber.js +++ b/themes/hexo/components/PaginationNumber.js @@ -16,57 +16,51 @@ const PaginationNumber = ({ page, totalPage }) => { const pages = generatePages(pagePrefix, page, currentPage, totalPage) return ( -
    - {/* 上一页 */} - +
    + {/* 上一页 */} + + + - + {pages} - - - {pages} - - {/* 下一页 */} - - - - - -
    - ); + {/* 下一页 */} + + + +
    + ) } function getPageElement(page, currentPage, pagePrefix) { return ( - ( - - {page} - - ) - ); + + + {page} + + + ) } function generatePages(pagePrefix, page, currentPage, totalPage) { diff --git a/themes/hexo/components/TagItemMini.js b/themes/hexo/components/TagItemMini.js index 32221ea4..aa3388ec 100644 --- a/themes/hexo/components/TagItemMini.js +++ b/themes/hexo/components/TagItemMini.js @@ -1,21 +1,15 @@ import Link from 'next/link' const TagItemMini = ({ tag, selected = false }) => { - return ( - - -
    {selected && } {tag.name + (tag.count ? `(${tag.count})` : '')}
    - - - ); + return + +
    {selected && } {tag.name + (tag.count ? `(${tag.count})` : '')}
    +
    + } export default TagItemMini diff --git a/themes/hexo/components/TopNav.js b/themes/hexo/components/TopNav.js index 6555a27f..fec458eb 100644 --- a/themes/hexo/components/TopNav.js +++ b/themes/hexo/components/TopNav.js @@ -90,13 +90,10 @@ const TopNav = props => {
    {locale.COMMON.CATEGORY}
    - - - {locale.COMMON.MORE} - + + + {locale.COMMON.MORE} +
    @@ -107,13 +104,10 @@ const TopNav = props => {
    {locale.COMMON.TAGS}
    - - - {locale.COMMON.MORE} - + + + {locale.COMMON.MORE} +
    diff --git a/themes/matery/LayoutCategory.js b/themes/matery/LayoutCategory.js index 7b57c3c0..d7c72799 100644 --- a/themes/matery/LayoutCategory.js +++ b/themes/matery/LayoutCategory.js @@ -7,32 +7,30 @@ import HeaderArticle from './components/HeaderArticle' export const LayoutCategory = props => { const { category, categories } = props - return ( - } > + return } > -
    +
    -
    +
    -
    - {categories.map(e => { - const selected = e.name === category - return ( - -
    - - {e.name}({e.count}) -
    - - ); - })} -
    +
    + {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 ab98d3a4..99c0f582 100644 --- a/themes/matery/LayoutCategoryIndex.js +++ b/themes/matery/LayoutCategoryIndex.js @@ -6,27 +6,27 @@ export const LayoutCategoryIndex = props => { const { categories } = props return ( - } > + } > -
    +
    -
    +
    -
    - {categories.map(e => { - return ( - -
    - - {e.name}({e.count}) -
    - - ) - })} -
    -
    +
    + {categories.map(e => { + return ( + +
    + + {e.name}({e.count}) +
    + + ) + })} +
    +
    -
    - +
    +
    ) } diff --git a/themes/matery/LayoutSearch.js b/themes/matery/LayoutSearch.js index db528a29..bed5cefc 100644 --- a/themes/matery/LayoutSearch.js +++ b/themes/matery/LayoutSearch.js @@ -38,62 +38,62 @@ export const LayoutSearch = props => { }, 100) }) return ( - - {!currentSearch && <> -
    - - {/* 分类 */} - -
    - - {locale.COMMON.CATEGORY}: -
    -
    - {categories?.map(category => { - return ( - -
    + {!currentSearch && <> +
    + + {/* 分类 */} + +
    + + {locale.COMMON.CATEGORY}: +
    +
    + {categories?.map(category => { + return ( + - - {category.name}({category.count}) +
    + + {category.name}({category.count}) +
    + + ) + })} +
    +
    + {/* 标签 */} + +
    + + {locale.COMMON.TAGS}: +
    +
    + {tags?.map(tag => { + return ( +
    +
    - - ) - })} -
    -
    - {/* 标签 */} - -
    - - {locale.COMMON.TAGS}: -
    -
    - {tags?.map(tag => { - return ( -
    - -
    - ) - })} -
    -
    -
    - } + ) + })} +
    + +
    + } - {currentSearch && <> -
    - {BLOG.POST_LIST_STYLE === 'page' ? : } -
    - } + {currentSearch && <> +
    + {BLOG.POST_LIST_STYLE === 'page' ? : } +
    + } - + ) } diff --git a/themes/matery/LayoutSlug.js b/themes/matery/LayoutSlug.js index 6e95ff52..a6a79e7b 100644 --- a/themes/matery/LayoutSlug.js +++ b/themes/matery/LayoutSlug.js @@ -45,7 +45,7 @@ export const LayoutSlug = props => { >
    -
    +
    {lock && } @@ -112,7 +112,7 @@ export const LayoutSlug = props => { data-aos-once="false" data-aos-anchor-placement="top-center" className='relative h-full'> -
    +
    diff --git a/themes/matery/components/ArticleCopyright.js b/themes/matery/components/ArticleCopyright.js index e5b56411..e3456747 100644 --- a/themes/matery/components/ArticleCopyright.js +++ b/themes/matery/components/ArticleCopyright.js @@ -16,26 +16,24 @@ export default function ArticleCopyright () { }) const { locale } = useGlobal() - return ( -
    -
      -
    • - {locale.COMMON.AUTHOR}: - - {BLOG.AUTHOR} - -
    • -
    • - {locale.COMMON.URL}: - - {path} - -
    • -
    • - {locale.COMMON.COPYRIGHT}: - {locale.COMMON.COPYRIGHT_NOTICE} -
    • -
    -
    - ); + return
    +
      +
    • + {locale.COMMON.AUTHOR}: + + {BLOG.AUTHOR} + +
    • +
    • + {locale.COMMON.URL}: + + {path} + +
    • +
    • + {locale.COMMON.COPYRIGHT}: + {locale.COMMON.COPYRIGHT_NOTICE} +
    • +
    +
    } diff --git a/themes/matery/components/ArticleInfo.js b/themes/matery/components/ArticleInfo.js index 1a4c9a4a..892e1c3e 100644 --- a/themes/matery/components/ArticleInfo.js +++ b/themes/matery/components/ArticleInfo.js @@ -10,38 +10,36 @@ export const ArticleInfo = (props) => { const { locale } = useGlobal() const date = formatDate(post?.date?.start_date || post?.createdTime, locale.LOCALE) - return ( -
    -
    - {post.tagItems && ( -
    - {post.tagItems.map(tag => ( - - ))} -
    - )} -
    + return
    +
    + {post.tagItems && ( +
    + {post.tagItems.map(tag => ( + + ))} +
    + )} +
    -
    - {post?.type !== 'Page' && (<> - +
    + {post?.type !== 'Page' && (<> + + + 发布日期: {date} + + + + 更新日期: {post.lastEditedTime} + + + + + + )} +
    - 发布日期:{date} - - - - 更新日期: {post.lastEditedTime} - - - - - - )} -
    - -
    - ); +
    } diff --git a/themes/matery/components/ArticleRecommend.js b/themes/matery/components/ArticleRecommend.js index ed87337e..428b7afa 100644 --- a/themes/matery/components/ArticleRecommend.js +++ b/themes/matery/components/ArticleRecommend.js @@ -34,32 +34,35 @@ export default function ArticleRecommend({ recommendPosts, siteInfo }) { : `url("${siteInfo?.pageCover}")` return ( - ( - -
    + - - ); + ) } diff --git a/themes/matery/components/BlogPostArchive.js b/themes/matery/components/BlogPostArchive.js index 20887d45..227a2697 100644 --- a/themes/matery/components/BlogPostArchive.js +++ b/themes/matery/components/BlogPostArchive.js @@ -29,20 +29,17 @@ const BlogPostArchive = ({ posts = [], archiveTitle }) => {
    {post.date?.start_date}{' '}   - - - {post.title} - + + + {post.title} +
    ))}
    - ); + ) } } diff --git a/themes/matery/components/BlogPostCard.js b/themes/matery/components/BlogPostCard.js index 0f901a71..fbe24de5 100644 --- a/themes/matery/components/BlogPostCard.js +++ b/themes/matery/components/BlogPostCard.js @@ -7,83 +7,80 @@ import CONFIG_MATERY from '../config_matery' const BlogPostCard = ({ post, showSummary }) => { const showPreview = CONFIG_MATERY.POST_LIST_PREVIEW && post.blockMap return ( -
    +
    - {/* 固定高度 ,空白用图片拉升填充 */} -
    + {/* 固定高度 ,空白用图片拉升填充 */} +
    - {/* 头部图片 填充卡片 */} - {CONFIG_MATERY.POST_LIST_COVER && !showPreview && post?.page_cover && ( - -
    - {/* eslint-disable-next-line @next/next/no-img-element */} - {post.title} - {post.title} -
    - - )} + {/* 头部图片 填充卡片 */} + {CONFIG_MATERY.POST_LIST_COVER && !showPreview && post?.page_cover && ( + +
    + {/* eslint-disable-next-line @next/next/no-img-element */} + {post.title} + {post.title} +
    + + )} -
    - {/* 描述 */} -
    +
    + {/* 描述 */} +
    - {(!showPreview || showSummary) && post.summary && ( -

    - {post.summary} -

    - )} + {(!showPreview || showSummary) && post.summary && ( +

    + {post.summary} +

    + )} - - - {post.date?.start_date || post.lastEditedTime} + {post?.tagItems && post?.tagItems.length > 0 && (<> +
    +
    +
    +
    + {' '} + {post.tagItems.map(tag => ( + + ))} +
    +
    +
    + )} +
    +
    - - - - - {post.category} - - -
    -
    - - {post?.tagItems && post?.tagItems.length > 0 && (<> -
    -
    -
    -
    - {' '} - {post.tagItems.map(tag => ( - - ))} -
    -
    -
    - )} -
    -
    - -
    - ); +
    + ) } export default BlogPostCard diff --git a/themes/matery/components/Catalog.js b/themes/matery/components/Catalog.js index f58aa9fb..3104e338 100644 --- a/themes/matery/components/Catalog.js +++ b/themes/matery/components/Catalog.js @@ -58,12 +58,12 @@ const Catalog = ({ toc }) => { return <> } - return
    + return
    目录
    -
    +
    + {post.type === 'Post' && } + } - {/* 评论互动 */} -
    - -
    + {/* 评论互动 */} +
    +
    -
    - ); + +
    ) } diff --git a/themes/next/components/BlogAround.js b/themes/next/components/BlogAround.js index 69948b24..9e5f3d6f 100644 --- a/themes/next/components/BlogAround.js +++ b/themes/next/components/BlogAround.js @@ -9,24 +9,16 @@ export default function BlogAround ({ prev, next }) { if (!prev || !next) { return <> } - return ( -
    - {prev && - + return
    + {prev && + {prev.title} - - } - {next && - {next.title} + + } + {next && + {next.title} - - } -
    - ); + + } +
    } diff --git a/themes/next/components/BlogPostArchive.js b/themes/next/components/BlogPostArchive.js index 91f5527a..65049ce4 100644 --- a/themes/next/components/BlogPostArchive.js +++ b/themes/next/components/BlogPostArchive.js @@ -29,20 +29,17 @@ const BlogPostArchive = ({ posts = [], archiveTitle }) => {
    {post.date?.start_date}{' '}   - - - {post.title} - + + + {post.title} +
    ))}
    - ); + ) } } diff --git a/themes/next/components/BlogPostCard.js b/themes/next/components/BlogPostCard.js index 65352c12..1513118d 100644 --- a/themes/next/components/BlogPostCard.js +++ b/themes/next/components/BlogPostCard.js @@ -19,14 +19,13 @@ const BlogPostCard = ({ post, showSummary }) => { className="flex flex-col-reverse justify-between duration-300" >
    - - - {post.title} - + + + {post.title} +
    {
    {post.category && ( <> - - - - {post.category} - + + + + {post.category} + | @@ -51,10 +47,10 @@ const BlogPostCard = ({ post, showSummary }) => { - - {post.date?.start_date} - + > + + {post.date?.start_date} +
    @@ -89,19 +85,17 @@ const BlogPostCard = ({ post, showSummary }) => { )}
    - - - {locale.COMMON.ARTICLE_DETAIL} - - + + + {locale.COMMON.ARTICLE_DETAIL} + +
    {CONFIG_NEXT.POST_LIST_COVER && post?.page_cover && ( - +
    { )}
    - ); + ) } export default BlogPostCard diff --git a/themes/next/components/CategoryGroup.js b/themes/next/components/CategoryGroup.js index 8e24231a..1c22d04e 100644 --- a/themes/next/components/CategoryGroup.js +++ b/themes/next/components/CategoryGroup.js @@ -7,22 +7,17 @@ const CategoryGroup = ({ currentCategory, categories }) => {
    {categories.map(category => { const selected = currentCategory === category.name - return ( - - + return + {category.name}({category.count}) - - ); + + })}
    - ; + } export default CategoryGroup diff --git a/themes/next/components/CategoryList.js b/themes/next/components/CategoryList.js index 2d384479..5390a769 100644 --- a/themes/next/components/CategoryList.js +++ b/themes/next/components/CategoryList.js @@ -8,34 +8,27 @@ const CategoryList = ({ currentCategory, categories }) => { } const { locale } = useGlobal() - return ( - - ); + return } export default CategoryList diff --git a/themes/next/components/ContactButton.js b/themes/next/components/ContactButton.js index b9e0a75b..4744f81a 100644 --- a/themes/next/components/ContactButton.js +++ b/themes/next/components/ContactButton.js @@ -8,17 +8,15 @@ import Link from 'next/link' */ const ContactButton = () => { return ( - ( - + + - - ) - ); + + + ) } export default ContactButton diff --git a/themes/next/components/LatestPostsGroup.js b/themes/next/components/LatestPostsGroup.js index 7b0f9012..79de1c5c 100644 --- a/themes/next/components/LatestPostsGroup.js +++ b/themes/next/components/LatestPostsGroup.js @@ -18,38 +18,40 @@ const LatestPostsGroup = ({ latestPosts }) => { return <> } - return <> -
    -
    - - {locale.COMMON.LATEST_POSTS} + return ( + <> +
    +
    + + {locale.COMMON.LATEST_POSTS} +
    -
    - {latestPosts.map(post => { - const selected = currentPath === `${BLOG.SUB_PATH}/${post.slug}` - return ( - ( - -
    { + const selected = currentPath === `${BLOG.SUB_PATH}/${post.slug}` + return ( + -
  • {post.title}
  • -
    - - ) - ); - })} - ; + +
    +
  • {post.title}
  • +
    +
    + + ) + })} + + ) } export default LatestPostsGroup diff --git a/themes/next/components/Logo.js b/themes/next/components/Logo.js index d78e523c..f53ff0c0 100644 --- a/themes/next/components/Logo.js +++ b/themes/next/components/Logo.js @@ -3,13 +3,11 @@ import React from 'react' const Logo = props => { const { siteInfo, className } = props - return ( - -
    -
    {siteInfo?.title}
    -
    {siteInfo?.description}
    -
    - - ); + return +
    +
    {siteInfo?.title}
    +
    {siteInfo?.description}
    +
    + } export default Logo diff --git a/themes/next/components/MenuButtonGroup.js b/themes/next/components/MenuButtonGroup.js index b2c266da..0afb83be 100644 --- a/themes/next/components/MenuButtonGroup.js +++ b/themes/next/components/MenuButtonGroup.js @@ -21,33 +21,24 @@ const MenuButtonGroup = (props) => { links = defaultLinks.concat(customNav) } - return ( - - ); + return } export default MenuButtonGroup diff --git a/themes/next/components/NextRecentComments.js b/themes/next/components/NextRecentComments.js index 34ae9b3c..81e9845d 100644 --- a/themes/next/components/NextRecentComments.js +++ b/themes/next/components/NextRecentComments.js @@ -26,10 +26,10 @@ const NextRecentComments = (props) => { {!onLoading && comments && comments.length === 0 &&
    No Comments
    } {!onLoading && comments && comments.length > 0 && comments.map((comment) =>
    -
    --{comment.nick}
    +
    )} - ; + } export default NextRecentComments diff --git a/themes/next/components/PaginationNumber.js b/themes/next/components/PaginationNumber.js index c805b8a8..323a3eb0 100644 --- a/themes/next/components/PaginationNumber.js +++ b/themes/next/components/PaginationNumber.js @@ -16,72 +16,68 @@ const PaginationNumber = ({ page, totalPage }) => { const pages = generatePages(pagePrefix, page, currentPage, totalPage) return ( -
    - {/* 上一页 */} - - - + + - {pages} + {pages} - {/* 下一页 */} - - - -
    - ); + + +
    + ) } function getPageElement(pagePrefix, page, currentPage) { return ( - ( - - {page} - - ) - ); + + + {page} + + + ) } function generatePages(pagePrefix, page, currentPage, totalPage) { const pages = [] diff --git a/themes/next/components/PaginationSimple.js b/themes/next/components/PaginationSimple.js index 68b0b5cb..4edb7b7c 100644 --- a/themes/next/components/PaginationSimple.js +++ b/themes/next/components/PaginationSimple.js @@ -31,7 +31,7 @@ const PaginationSimple = ({ page, showNext }) => { query: router.query.s ? { s: router.query.s } : {} }} passHref - legacyBehavior> + >
    - ); + ) } export default PaginationSimple diff --git a/themes/next/components/RecommendPosts.js b/themes/next/components/RecommendPosts.js index 7e680da5..d35c65ae 100644 --- a/themes/next/components/RecommendPosts.js +++ b/themes/next/components/RecommendPosts.js @@ -18,15 +18,15 @@ const RecommendPosts = ({ recommendPosts }) => {
    - ); + ) } export default RecommendPosts diff --git a/themes/next/components/SideAreaRight.js b/themes/next/components/SideAreaRight.js index 8d180cb6..e543d20f 100644 --- a/themes/next/components/SideAreaRight.js +++ b/themes/next/components/SideAreaRight.js @@ -26,77 +26,71 @@ const SideAreaRight = (props) => { const router = useRouter() return ( +
    + ) } export default SideAreaRight diff --git a/themes/next/components/SideBar.js b/themes/next/components/SideBar.js index 8525859a..a90c5c3d 100644 --- a/themes/next/components/SideBar.js +++ b/themes/next/components/SideBar.js @@ -19,69 +19,61 @@ import React from 'react' const SideBar = (props) => { const { tags, currentTag, post, slot, categories, currentCategory } = props const { locale } = useGlobal() - return ( -
    + +
    + {/* 信息流广告 */} + +
    + + } export default SideBar diff --git a/themes/next/components/TagItem.js b/themes/next/components/TagItem.js index 85f6e0be..000b2d72 100644 --- a/themes/next/components/TagItem.js +++ b/themes/next/components/TagItem.js @@ -8,20 +8,17 @@ const TagItem = ({ tag, selected }) => {
    { locale.COMMON.NOTAG }
    } return ( - -
  • -
    - {selected && } {`${tag.name} `} {tag.count ? `(${tag.count})` : ''} -
    -
  • - - ); + +
  • +
    + {selected && } {`${tag.name} `} {tag.count ? `(${tag.count})` : ''} +
    +
  • + + ) } export default TagItem diff --git a/themes/next/components/TagItemMini.js b/themes/next/components/TagItemMini.js index 72f12959..914cd9a0 100644 --- a/themes/next/components/TagItemMini.js +++ b/themes/next/components/TagItemMini.js @@ -1,21 +1,15 @@ import Link from 'next/link' const TagItemMini = ({ tag, selected = false }) => { - return ( - - -
    {selected && } {tag.name + (tag.count ? `(${tag.count})` : '')}
    - - - ); + return + +
    {selected && } {tag.name + (tag.count ? `(${tag.count})` : '')}
    +
    + } export default TagItemMini diff --git a/themes/next/components/TopNav.js b/themes/next/components/TopNav.js index 148f89ca..5fbd4e5a 100644 --- a/themes/next/components/TopNav.js +++ b/themes/next/components/TopNav.js @@ -57,13 +57,10 @@ const TopNav = (props) => {
    {locale.COMMON.CATEGORY}
    - - - {locale.COMMON.MORE} - + + + {locale.COMMON.MORE} +
    @@ -74,13 +71,10 @@ const TopNav = (props) => {
    {locale.COMMON.TAGS}
    - - - {locale.COMMON.MORE} - + + + {locale.COMMON.MORE} +
    diff --git a/themes/nobelium/LayoutArchive.js b/themes/nobelium/LayoutArchive.js index c5b3a8ba..b85860e0 100644 --- a/themes/nobelium/LayoutArchive.js +++ b/themes/nobelium/LayoutArchive.js @@ -45,10 +45,10 @@ export const LayoutArchive = props => { - - {post.title} - + > + + {post.title} +
    @@ -58,5 +58,5 @@ export const LayoutArchive = props => { ))}
    - ); + ) } diff --git a/themes/nobelium/LayoutCategoryIndex.js b/themes/nobelium/LayoutCategoryIndex.js index 6d1884ab..28b98b6e 100644 --- a/themes/nobelium/LayoutCategoryIndex.js +++ b/themes/nobelium/LayoutCategoryIndex.js @@ -4,24 +4,16 @@ import LayoutBase from './LayoutBase' export const LayoutCategoryIndex = (props) => { const { categories } = props - return ( - -
    - {categories && categories.map(category => { - return ( - -
    - {category.name}({category.count}) -
    - - ); - })} -
    -
    - ); + return +
    + {categories && categories.map(category => { + return +
    + {category.name}({category.count}) +
    + + })} +
    +
    } diff --git a/themes/nobelium/LayoutTagIndex.js b/themes/nobelium/LayoutTagIndex.js index 6d2873a8..6a89e168 100644 --- a/themes/nobelium/LayoutTagIndex.js +++ b/themes/nobelium/LayoutTagIndex.js @@ -3,27 +3,19 @@ import LayoutBase from './LayoutBase' export const LayoutTagIndex = (props) => { const { tags } = props - return ( - -
    -
    - {tags.map(tag => { - return ( -
    - - -
    {tag.name + (tag.count ? `(${tag.count})` : '')}
    - - -
    - ); - })} -
    -
    - ); + return +
    +
    + {tags.map(tag => { + return + })} +
    +
    } diff --git a/themes/nobelium/components/BlogListPage.js b/themes/nobelium/components/BlogListPage.js index 4dd1fff6..266d14e3 100644 --- a/themes/nobelium/components/BlogListPage.js +++ b/themes/nobelium/components/BlogListPage.js @@ -16,35 +16,29 @@ export const BlogListPage = props => { const showNext = page < totalPage const pagePrefix = router.asPath.replace(/\/page\/[1-9]\d*/, '').replace(/\/$/, '') - return ( -
    + return
    -
    - {posts?.map(post => ( - - ))} -
    - - - ); +
    } diff --git a/themes/nobelium/components/BlogListScroll.js b/themes/nobelium/components/BlogListScroll.js index d70e4bc5..c9859c0b 100644 --- a/themes/nobelium/components/BlogListScroll.js +++ b/themes/nobelium/components/BlogListScroll.js @@ -43,40 +43,36 @@ export const BlogListScroll = props => { } }) - return ( -
    - {postsToShow.map(p => ( -
    -

    - - {p.title} - -

    + return
    + {postsToShow.map(p => ( + - ))} - -
    - {' '} - {hasMore ? locale.COMMON.MORE : `${locale.COMMON.NO_MORE} 😰`}{' '} -
    +

    + {p.summary} +

    +
    + ))} +
    + {' '} + {hasMore ? locale.COMMON.MORE : `${locale.COMMON.NO_MORE} 😰`}{' '}
    - ); + +
    } diff --git a/themes/nobelium/components/BlogPost.js b/themes/nobelium/components/BlogPost.js index 9cd717b5..b0a99330 100644 --- a/themes/nobelium/components/BlogPost.js +++ b/themes/nobelium/components/BlogPost.js @@ -4,26 +4,26 @@ import formatDate from '@/lib/formatDate' const BlogPost = ({ post }) => { return ( - ( - -
    -
    -

    - {post.title} -

    - -
    -
    -

    - {post.summary} -

    -
    -
    - - ) - ); + + +
    +
    +

    + {post.title} +

    + +
    +
    +

    + {post.summary} +

    +
    +
    +
    + + ) } export default BlogPost diff --git a/themes/nobelium/components/ExampleRecentComments.js b/themes/nobelium/components/ExampleRecentComments.js index 42c8805e..e1fe86ca 100644 --- a/themes/nobelium/components/ExampleRecentComments.js +++ b/themes/nobelium/components/ExampleRecentComments.js @@ -26,10 +26,10 @@ const ExampleRecentComments = (props) => { {!onLoading && comments && comments.length === 0 &&
    No Comments
    } {!onLoading && comments && comments.length > 0 && comments.map((comment) =>
    -
    --{comment.nick}
    +
    )} - ; + } export default ExampleRecentComments diff --git a/themes/nobelium/components/Nav.js b/themes/nobelium/components/Nav.js index 9db2e524..178d0399 100644 --- a/themes/nobelium/components/Nav.js +++ b/themes/nobelium/components/Nav.js @@ -27,65 +27,67 @@ const Nav = ({ navBarTitle, fullWidth }) => { // } // eslint-disable-next-line react-hooks/exhaustive-deps }, [sentinalRef]) - return <> -
    - diff --git a/themes/example/LayoutCategoryIndex.js b/themes/example/LayoutCategoryIndex.js index 28b98b6e..1230c20f 100644 --- a/themes/example/LayoutCategoryIndex.js +++ b/themes/example/LayoutCategoryIndex.js @@ -4,16 +4,24 @@ import LayoutBase from './LayoutBase' export const LayoutCategoryIndex = (props) => { const { categories } = props - return -
    - {categories && categories.map(category => { - return -
    - {category.name}({category.count}) -
    - - })} -
    -
    + return ( + +
    + {categories && categories.map(category => { + return ( + +
    + {category.name}({category.count}) +
    + + ) + })} +
    +
    + ) } diff --git a/themes/example/LayoutTagIndex.js b/themes/example/LayoutTagIndex.js index 6a89e168..6d2873a8 100644 --- a/themes/example/LayoutTagIndex.js +++ b/themes/example/LayoutTagIndex.js @@ -3,19 +3,27 @@ import LayoutBase from './LayoutBase' export const LayoutTagIndex = (props) => { const { tags } = props - return -
    -
    - {tags.map(tag => { - return - })} -
    -
    + return ( + +
    +
    + {tags.map(tag => { + return ( +
    + + +
    {tag.name + (tag.count ? `(${tag.count})` : '')}
    + + +
    + ); + })} +
    +
    + ); } diff --git a/themes/example/components/ArticleInfo.js b/themes/example/components/ArticleInfo.js index 7317d533..0b34fb12 100644 --- a/themes/example/components/ArticleInfo.js +++ b/themes/example/components/ArticleInfo.js @@ -8,40 +8,45 @@ export const ArticleInfo = (props) => { const { locale } = useGlobal() const date = formatDate(post?.date?.start_date || post?.createdTime, locale.LOCALE) - return
    -
    - {post?.type !== 'Page' && <> - - + return ( +
    +
    + {post?.type !== 'Page' && <> + + {post.category} - - - | - } - {post?.type !== 'Page' && (<> - - + + | + } + + {post?.type !== 'Page' && (<> + + {date} - - - | - - {locale.COMMON.LAST_EDITED_TIME}: {post.lastEditedTime} + + + | + + {locale.COMMON.LAST_EDITED_TIME}: {post.lastEditedTime} + + | + + +   + - | - - -   - - - )} + )} -
    +
    -
    +
    + ) } diff --git a/themes/example/components/BlogListPage.js b/themes/example/components/BlogListPage.js index c98ccd54..390bf90a 100644 --- a/themes/example/components/BlogListPage.js +++ b/themes/example/components/BlogListPage.js @@ -15,47 +15,55 @@ export const BlogListPage = props => { const showNext = page < totalPage const pagePrefix = router.asPath.replace(/\/page\/[1-9]\d*/, '').replace(/\/$/, '') - return
    + return ( +
    -
    - {posts?.map(p => ( -
    -

    - - {p.title} - -

    +
    + {posts?.map(p => ( +
    +

    + + {p.title} + +

    -
    - by {BLOG.AUTHOR} on {p.date?.start_date || p.createdTime} - | - {p.category} - {/* | */} - {/* 2 Comments */} -
    +
    + by {BLOG.AUTHOR} on {p.date?.start_date || p.createdTime} + | + {p.category} + {/* | */} + {/* 2 Comments */} +
    -

    - {p.summary} -

    - {/* 搜索结果 */} - {p.results && ( -

    - {p.results.map(r => ( - {r} - ))} +

    + {p.summary}

    - )} -
    - ))} -
    + {/* 搜索结果 */} + {p.results && ( +

    + {p.results.map(r => ( + {r} + ))} +

    + )} +
    + ))} +
    -
    - - {locale.PAGINATION.PREV} - - - {locale.PAGINATION.NEXT} - +
    + + {locale.PAGINATION.PREV} + + + {locale.PAGINATION.NEXT} + +
    -
    + ); } diff --git a/themes/example/components/BlogListScroll.js b/themes/example/components/BlogListScroll.js index c9859c0b..d70e4bc5 100644 --- a/themes/example/components/BlogListScroll.js +++ b/themes/example/components/BlogListScroll.js @@ -43,36 +43,40 @@ export const BlogListScroll = props => { } }) - return
    - {postsToShow.map(p => ( - + ))} + +
    + {' '} + {hasMore ? locale.COMMON.MORE : `${locale.COMMON.NO_MORE} 😰`}{' '} +
    -
    - {' '} - {hasMore ? locale.COMMON.MORE : `${locale.COMMON.NO_MORE} 😰`}{' '}
    - -
    + ); } diff --git a/themes/example/components/ExampleRecentComments.js b/themes/example/components/ExampleRecentComments.js index e1fe86ca..42c8805e 100644 --- a/themes/example/components/ExampleRecentComments.js +++ b/themes/example/components/ExampleRecentComments.js @@ -26,10 +26,10 @@ const ExampleRecentComments = (props) => { {!onLoading && comments && comments.length === 0 &&
    No Comments
    } {!onLoading && comments && comments.length > 0 && comments.map((comment) =>
    - +
    --{comment.nick}
    )} - + ; } export default ExampleRecentComments diff --git a/themes/example/components/Header.js b/themes/example/components/Header.js index 424edcae..7c8355ae 100644 --- a/themes/example/components/Header.js +++ b/themes/example/components/Header.js @@ -7,15 +7,19 @@ import Link from 'next/link' export const Header = (props) => { const { siteInfo } = props - return
    -
    - - + return ( +
    +
    + + {siteInfo?.title} - -
    - {/* 右侧文字 */} + +
    + {/* 右侧文字 */} +
    -
    -
    +
    + ); } diff --git a/themes/example/components/Nav.js b/themes/example/components/Nav.js index 26610035..5bfb8b2d 100644 --- a/themes/example/components/Nav.js +++ b/themes/example/components/Nav.js @@ -20,20 +20,25 @@ export const Nav = (props) => { links = links.concat(customNav) } - return + + ); } diff --git a/themes/example/components/SideBar.js b/themes/example/components/SideBar.js index ea45f851..986063b0 100644 --- a/themes/example/components/SideBar.js +++ b/themes/example/components/SideBar.js @@ -8,48 +8,58 @@ const ExampleRecentComments = dynamic(() => import('./ExampleRecentComments')) export const SideBar = (props) => { const { locale } = useGlobal() const { latestPosts, categories } = props - return
    + return ( +
    - - - {BLOG.COMMENT_WALINE_SERVER_URL && BLOG.COMMENT_WALINE_RECENT && } - + -
    +
    + ); } diff --git a/themes/fukasawa/LayoutCategoryIndex.js b/themes/fukasawa/LayoutCategoryIndex.js index d517d65c..e44e86dc 100644 --- a/themes/fukasawa/LayoutCategoryIndex.js +++ b/themes/fukasawa/LayoutCategoryIndex.js @@ -5,21 +5,29 @@ import LayoutBase from './LayoutBase' export const LayoutCategoryIndex = (props) => { const { locale } = useGlobal() const { categories } = props - return -
    -
    - {locale.COMMON.CATEGORY}: + return ( + +
    +
    + {locale.COMMON.CATEGORY}: +
    +
    + {categories && categories.map(category => { + return ( + +
    + {category.name}({category.count}) +
    + + ) + })} +
    -
    - {categories && categories.map(category => { - return -
    - {category.name}({category.count}) -
    - - })} -
    -
    - + + ) } diff --git a/themes/fukasawa/components/ArticleAround.js b/themes/fukasawa/components/ArticleAround.js index 1b145b33..b0de69c7 100644 --- a/themes/fukasawa/components/ArticleAround.js +++ b/themes/fukasawa/components/ArticleAround.js @@ -9,16 +9,24 @@ export default function ArticleAround ({ prev, next }) { if (!prev || !next) { return <> } - return
    - - + return ( +
    + + {prev.title} - - - - {next.title} + + + + {next.title} - - -
    + + +
    + ); } diff --git a/themes/fukasawa/components/ArticleDetail.js b/themes/fukasawa/components/ArticleDetail.js index 9a939766..19968e72 100644 --- a/themes/fukasawa/components/ArticleDetail.js +++ b/themes/fukasawa/components/ArticleDetail.js @@ -17,86 +17,91 @@ export default function ArticleDetail(props) { } const { locale } = useGlobal() const date = formatDate(post?.date?.start_date || post?.createdTime, locale.LOCALE) - return (
    - {post?.type && !post?.type !== 'Page' && post?.page_cover && ( -
    - {/* eslint-disable-next-line @next/next/no-img-element */} - {post.title} -
    - )} -
    - -
    - - {/* 文章Title */} -
    - {post.title} + return ( +
    + {post?.type && !post?.type !== 'Page' && post?.page_cover && ( +
    + {/* eslint-disable-next-line @next/next/no-img-element */} + {post.title}
    + )} +
    -
    -
    +
    - {post?.category && (<> - - - - {post.category} - - - | - )} - - {post?.type !== 'Page' && (<> - - - {date} - - - | - - {locale.COMMON.LAST_EDITED_TIME}: {post.lastEditedTime} - - )} - -
    - -   - -
    + {/* 文章Title */} +
    + {post.title}
    +
    +
    + + {post?.category && (<> + + + + {post.category} + + + | + )} + + {post?.type !== 'Page' && (<> + + + {date} + + + | + + {locale.COMMON.LAST_EDITED_TIME}: {post.lastEditedTime} + + )} + +
    + +   + +
    +
    + +
    + +
    + + {/* Notion文章主体 */} +
    + {post && }
    -
    +
    + {/* 文章内嵌广告 */} + +
    - {/* Notion文章主体 */} -
    - {post && } -
    +
    -
    - {/* 文章内嵌广告 */} - -
    + {post.type === 'Post' && } - - - {post.type === 'Post' && } - - {/* 评论互动 */} -
    - + {/* 评论互动 */} +
    + +
    -
    ) + ); } diff --git a/themes/fukasawa/components/BlogCard.js b/themes/fukasawa/components/BlogCard.js index 3cde4df0..1c42923f 100644 --- a/themes/fukasawa/components/BlogCard.js +++ b/themes/fukasawa/components/BlogCard.js @@ -13,13 +13,14 @@ const BlogCard = ({ post, showSummary }) => { className="animate__animated animate__fadeIn flex flex-col-reverse justify-between duration-300" >
    - - - {post.title} - + + + {post.title} + {(!showPreview || showSummary) && ( @@ -30,7 +31,7 @@ const BlogCard = ({ post, showSummary }) => {
    {CONFIG_FUKA.POST_LIST_COVER && post?.page_cover && ( - +
    {/* eslint-disable-next-line @next/next/no-img-element */} { )}
    - ) + ); } export default BlogCard diff --git a/themes/fukasawa/components/BlogPostArchive.js b/themes/fukasawa/components/BlogPostArchive.js index 45c85ce1..c594d7d1 100644 --- a/themes/fukasawa/components/BlogPostArchive.js +++ b/themes/fukasawa/components/BlogPostArchive.js @@ -29,10 +29,13 @@ const BlogArchiveItem = ({ posts = [], archiveTitle }) => {
    {post.date?.start_date}{' '}   - - - {post.title} - + + + {post.title} +
    diff --git a/themes/fukasawa/components/GroupCategory.js b/themes/fukasawa/components/GroupCategory.js index fabc2e57..876a8f70 100644 --- a/themes/fukasawa/components/GroupCategory.js +++ b/themes/fukasawa/components/GroupCategory.js @@ -10,17 +10,22 @@ function GroupCategory ({ currentCategory, categories }) {
    {categories.map(category => { const selected = currentCategory === category.name - return - + return ( + + {category.name}({category.count}) - - + + ); })}
    - + ; } export default GroupCategory diff --git a/themes/fukasawa/components/GroupMenu.js b/themes/fukasawa/components/GroupMenu.js index 906ef217..afaec0e2 100644 --- a/themes/fukasawa/components/GroupMenu.js +++ b/themes/fukasawa/components/GroupMenu.js @@ -20,24 +20,32 @@ function GroupMenu ({ customNav }) { links = links.concat(customNav) } - return + return ( + + ); } export default GroupMenu diff --git a/themes/fukasawa/components/Logo.js b/themes/fukasawa/components/Logo.js index 42cbc268..3b6720fb 100644 --- a/themes/fukasawa/components/Logo.js +++ b/themes/fukasawa/components/Logo.js @@ -2,11 +2,15 @@ import Link from 'next/link' const Logo = props => { const { siteInfo } = props - return
    - - {siteInfo?.title} - -
    + return ( +
    + + {siteInfo?.title} + +
    + ); } export default Logo diff --git a/themes/fukasawa/components/PaginationSimple.js b/themes/fukasawa/components/PaginationSimple.js index 3c737b6d..cbbf23d0 100644 --- a/themes/fukasawa/components/PaginationSimple.js +++ b/themes/fukasawa/components/PaginationSimple.js @@ -26,15 +26,12 @@ const PaginationSimple = ({ page, showNext }) => { query: router.query.s ? { s: router.query.s } : {} }} passHref - > - + rel="prev" + className={`${ + currentPage === 1 ? 'invisible' : 'visible' + } text-center w-full duration-200 px-4 py-2 hover:border-black border-b-2 hover:font-bold`}> + ←{locale.PAGINATION.PREV} + { query: router.query.s ? { s: router.query.s } : {} }} passHref - > - + rel="next" + className={`${ + showNext ? 'visible' : 'invisible' + } text-center w-full duration-200 px-4 py-2 hover:border-black border-b-2 hover:font-bold`}> + + {locale.PAGINATION.NEXT}→
    - ) + ); } export default PaginationSimple diff --git a/themes/fukasawa/components/TagItem.js b/themes/fukasawa/components/TagItem.js index ef1139b5..18511426 100644 --- a/themes/fukasawa/components/TagItem.js +++ b/themes/fukasawa/components/TagItem.js @@ -8,17 +8,20 @@ const TagItem = ({ tag, selected }) => {
    { locale.COMMON.NOTAG }
    } return ( - -
  • -
    - {selected && } {`${tag.name} `} {tag.count ? `(${tag.count})` : ''} -
    -
  • - - ) + +
  • +
    + {selected && } {`${tag.name} `} {tag.count ? `(${tag.count})` : ''} +
    +
  • + + ); } export default TagItem diff --git a/themes/fukasawa/components/TagItemMini.js b/themes/fukasawa/components/TagItemMini.js index fb9efc58..26295088 100644 --- a/themes/fukasawa/components/TagItemMini.js +++ b/themes/fukasawa/components/TagItemMini.js @@ -1,15 +1,21 @@ import Link from 'next/link' const TagItemMini = ({ tag, selected = false }) => { - return - -
    {selected && } {tag.name + (tag.count ? `(${tag.count})` : '')}
    -
    - + return ( + + +
    {selected && } {tag.name + (tag.count ? `(${tag.count})` : '')}
    + + + ); } export default TagItemMini diff --git a/themes/hexo/LayoutCategoryIndex.js b/themes/hexo/LayoutCategoryIndex.js index 6d21da03..7d7165a6 100644 --- a/themes/hexo/LayoutCategoryIndex.js +++ b/themes/hexo/LayoutCategoryIndex.js @@ -16,7 +16,11 @@ export const LayoutCategoryIndex = props => {
    {categories.map(category => { return ( - +
    { }, 100) }) return ( - - {!currentSearch && <> -
    - - {/* 分类 */} - -
    - - {locale.COMMON.CATEGORY}: -
    -
    - {categories?.map(category => { - return ( - + {!currentSearch && <> +
    + + {/* 分类 */} + +
    + + {locale.COMMON.CATEGORY}: +
    +
    + {categories?.map(category => { + return ( + +
    -
    - - {category.name}({category.count}) -
    - - ) - })} -
    - - {/* 标签 */} - -
    - - {locale.COMMON.TAGS}: -
    -
    - {tags?.map(tag => { - return ( -
    - + + {category.name}({category.count})
    - ) - })} -
    -
    -
    - } + + ) + })} +
    + + {/* 标签 */} + +
    + + {locale.COMMON.TAGS}: +
    +
    + {tags?.map(tag => { + return ( +
    + +
    + ) + })} +
    +
    +
    + } - {currentSearch && <> -
    - {BLOG.POST_LIST_STYLE === 'page' ? : } -
    - } + {currentSearch && <> +
    + {BLOG.POST_LIST_STYLE === 'page' ? : } +
    + } - + ) } diff --git a/themes/hexo/LayoutTag.js b/themes/hexo/LayoutTag.js index 1eb2c249..ec8fb6f9 100644 --- a/themes/hexo/LayoutTag.js +++ b/themes/hexo/LayoutTag.js @@ -10,17 +10,23 @@ export const LayoutTag = (props) => { return t.name === props.tag }) - return - {tag && ( -
    - - + return ( + + {tag && ( + - )} - {BLOG.POST_LIST_STYLE === 'page' ? : } - + + +
    + )} + {BLOG.POST_LIST_STYLE === 'page' ? : } +
    + ) } diff --git a/themes/hexo/components/ArticleAdjacent.js b/themes/hexo/components/ArticleAdjacent.js index f5d14574..6e1face7 100644 --- a/themes/hexo/components/ArticleAdjacent.js +++ b/themes/hexo/components/ArticleAdjacent.js @@ -10,16 +10,24 @@ export default function ArticleAdjacent ({ prev, next }) { if (!prev || !next || !CONFIG_HEXO.ARTICLE_ADJACENT) { return <> } - return
    - - + return ( +
    + + {prev.title} - - - - {next.title} + + + + {next.title} - - -
    + + +
    + ); } diff --git a/themes/hexo/components/ArticleCopyright.js b/themes/hexo/components/ArticleCopyright.js index 57151869..80ffd8c9 100644 --- a/themes/hexo/components/ArticleCopyright.js +++ b/themes/hexo/components/ArticleCopyright.js @@ -16,24 +16,26 @@ export default function ArticleCopyright () { }) const { locale } = useGlobal() - return
    -
      -
    • - {locale.COMMON.AUTHOR}: - - {BLOG.AUTHOR} - -
    • -
    • - {locale.COMMON.URL}: - - {path} - -
    • -
    • - {locale.COMMON.COPYRIGHT}: - {locale.COMMON.COPYRIGHT_NOTICE} -
    • -
    -
    + return ( +
    +
      +
    • + {locale.COMMON.AUTHOR}: + + {BLOG.AUTHOR} + +
    • +
    • + {locale.COMMON.URL}: + + {path} + +
    • +
    • + {locale.COMMON.COPYRIGHT}: + {locale.COMMON.COPYRIGHT_NOTICE} +
    • +
    +
    + ); } diff --git a/themes/hexo/components/ArticleRecommend.js b/themes/hexo/components/ArticleRecommend.js index af081a1c..30373f67 100644 --- a/themes/hexo/components/ArticleRecommend.js +++ b/themes/hexo/components/ArticleRecommend.js @@ -34,32 +34,29 @@ export default function ArticleRecommend({ recommendPosts, siteInfo }) { : `url("${siteInfo?.pageCover}")` return ( - - + +
    -
    - diff --git a/themes/hexo/components/BlogPostArchive.js b/themes/hexo/components/BlogPostArchive.js index 227a2697..20887d45 100644 --- a/themes/hexo/components/BlogPostArchive.js +++ b/themes/hexo/components/BlogPostArchive.js @@ -29,17 +29,20 @@ const BlogPostArchive = ({ posts = [], archiveTitle }) => {
    {post.date?.start_date}{' '}   - - - {post.title} - + + + {post.title} +
    ))}
    - ) + ); } } diff --git a/themes/hexo/components/BlogPostCard.js b/themes/hexo/components/BlogPostCard.js index 06f4d8c7..dd6cabde 100644 --- a/themes/hexo/components/BlogPostCard.js +++ b/themes/hexo/components/BlogPostCard.js @@ -20,13 +20,14 @@ const BlogPostCard = ({ post, showSummary }) => { className="animate__animated animate__fadeIn flex flex-col-reverse lg:flex-row justify-between duration-300" >
    - - - {post.title} - + + + {post.title} +
    { - - - {post.date?.start_date || post.lastEditedTime} - + className="font-light hover:underline cursor-pointer text-sm leading-4 mr-3"> + + + {post.date?.start_date || post.lastEditedTime} +
    @@ -67,11 +68,14 @@ const BlogPostCard = ({ post, showSummary }) => { )}
    - - - - {post.category} - + + + + {post.category} +
    @@ -85,7 +89,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 */} { )}
    - ) + ); } export default BlogPostCard diff --git a/themes/hexo/components/Catalog.js b/themes/hexo/components/Catalog.js index c51ee499..9c80cd1a 100644 --- a/themes/hexo/components/Catalog.js +++ b/themes/hexo/components/Catalog.js @@ -10,10 +10,6 @@ import Progress from './Progress' * @constructor */ const Catalog = ({ toc }) => { - // 无目录就直接返回空 - if (!toc || toc.length < 1) { - return <> - } // 监听滚动事件 React.useEffect(() => { window.addEventListener('scroll', actionSectionScrollSpy) @@ -29,6 +25,7 @@ const Catalog = ({ toc }) => { // 同步选中目录事件 const [activeSection, setActiveSection] = React.useState(null) + const throttleMs = 100 const actionSectionScrollSpy = React.useCallback(throttle(() => { const sections = document.getElementsByClassName('notion-h') @@ -57,6 +54,11 @@ const Catalog = ({ toc }) => { tRef?.current?.scrollTo({ top: 28 * index, behavior: 'smooth' }) }, throttleMs)) + // 无目录就直接返回空 + if (!toc || toc.length < 1) { + return <> + } + return
    目录
    diff --git a/themes/hexo/components/CategoryGroup.js b/themes/hexo/components/CategoryGroup.js index 3b16739a..c88df60a 100644 --- a/themes/hexo/components/CategoryGroup.js +++ b/themes/hexo/components/CategoryGroup.js @@ -9,17 +9,23 @@ const CategoryGroup = ({ currentCategory, categories }) => {
    {categories.map(category => { const selected = currentCategory === category.name - return - -
    {category.name}({category.count})
    -
    - + return ( + + +
    {category.name}({category.count})
    + + + ); })}
    - + ; } export default CategoryGroup diff --git a/themes/hexo/components/HeaderArticle.js b/themes/hexo/components/HeaderArticle.js index 8ebfe2bd..11c231b9 100644 --- a/themes/hexo/components/HeaderArticle.js +++ b/themes/hexo/components/HeaderArticle.js @@ -32,7 +32,7 @@ export default function HeaderArticle({ post, siteInfo }) {
    {post.category && <> - +
    {post.category} @@ -46,10 +46,10 @@ export default function HeaderArticle({ post, siteInfo }) { - - {locale.COMMON.POST_TIME}: {date} - + className="pl-1 mr-2 cursor-pointer hover:underline"> + + {locale.COMMON.POST_TIME}:{date} + )} @@ -65,5 +65,5 @@ export default function HeaderArticle({ post, siteInfo }) {
    - ) + ); } diff --git a/themes/hexo/components/HexoRecentComments.js b/themes/hexo/components/HexoRecentComments.js index d4cbacab..9c2042e6 100644 --- a/themes/hexo/components/HexoRecentComments.js +++ b/themes/hexo/components/HexoRecentComments.js @@ -24,20 +24,22 @@ const HexoRecentComments = (props) => { }) }, []) - return -
    - - {locale.COMMON.RECENT_COMMENTS} -
    + return ( + +
    + + {locale.COMMON.RECENT_COMMENTS} +
    - {onLoading &&
    Loading...
    } - {!onLoading && comments && comments.length === 0 &&
    No Comments
    } - {!onLoading && comments && comments.length > 0 && comments.map((comment) =>
    - )} + {onLoading &&
    Loading...
    } + {!onLoading && comments && comments.length === 0 &&
    No Comments
    } + {!onLoading && comments && comments.length > 0 && comments.map((comment) =>
    +
    +
    --{comment.nick}
    +
    )} - + + ); } export default HexoRecentComments diff --git a/themes/hexo/components/LatestPostsGroup.js b/themes/hexo/components/LatestPostsGroup.js index 96eda369..a6741fc2 100644 --- a/themes/hexo/components/LatestPostsGroup.js +++ b/themes/hexo/components/LatestPostsGroup.js @@ -18,49 +18,47 @@ const LatestPostsGroup = ({ latestPosts, siteInfo }) => { return <> } - return ( - <> -
    -
    - - {locale.COMMON.LATEST_POSTS} -
    + return <> +
    +
    + + {locale.COMMON.LATEST_POSTS}
    - {latestPosts.map(post => { - const selected = currentPath === `${BLOG.SUB_PATH}/${post.slug}` - const headerImage = post?.page_cover - ? `url("${post.page_cover}")` - : `url("${siteInfo?.pageCover}")` +
    + {latestPosts.map(post => { + const selected = currentPath === `${BLOG.SUB_PATH}/${post.slug}` + const headerImage = post?.page_cover + ? `url("${post.page_cover}")` + : `url("${siteInfo?.pageCover}")` - return ( - + +
    +
    - -
    -
    -
    -
    {post.title}
    -
    {post.lastEditedTime}
    -
    -
    -
    - - ) - })} - - ) +
    +
    {post.title}
    +
    {post.lastEditedTime}
    +
    +
    + + ) + ); + })} + ; } export default LatestPostsGroup diff --git a/themes/hexo/components/Logo.js b/themes/hexo/components/Logo.js index 2bfc6ea7..61408026 100644 --- a/themes/hexo/components/Logo.js +++ b/themes/hexo/components/Logo.js @@ -4,10 +4,12 @@ import React from 'react' const Logo = props => { const { siteInfo } = props - return -
    -
    {siteInfo?.title || BLOG.TITLE}
    -
    - + return ( + +
    +
    {siteInfo?.title || BLOG.TITLE}
    +
    + + ); } export default Logo diff --git a/themes/hexo/components/MenuButtonGroupTop.js b/themes/hexo/components/MenuButtonGroupTop.js index 5d455c0b..f6ae7a29 100644 --- a/themes/hexo/components/MenuButtonGroupTop.js +++ b/themes/hexo/components/MenuButtonGroupTop.js @@ -18,21 +18,30 @@ const MenuButtonGroupTop = (props) => { links = links.concat(customNav) } - return + return ( + + ); } export default MenuButtonGroupTop diff --git a/themes/hexo/components/MenuGroupCard.js b/themes/hexo/components/MenuGroupCard.js index 57c8375b..1641023a 100644 --- a/themes/hexo/components/MenuGroupCard.js +++ b/themes/hexo/components/MenuGroupCard.js @@ -16,21 +16,30 @@ const MenuGroupCard = (props) => { { name: locale.COMMON.TAGS, to: '/tag', slot: tagSlot, show: CONFIG_HEXO.MENU_TAG } ] - return + return ( + + ); } export default MenuGroupCard diff --git a/themes/hexo/components/MenuList.js b/themes/hexo/components/MenuList.js index bbab4a1b..e5579a6a 100644 --- a/themes/hexo/components/MenuList.js +++ b/themes/hexo/components/MenuList.js @@ -21,24 +21,32 @@ const MenuList = (props) => { links = links.concat(customNav) } - return + return ( + + ); } export default MenuList diff --git a/themes/hexo/components/NavButtonGroup.js b/themes/hexo/components/NavButtonGroup.js index f15b992d..d490cd7b 100644 --- a/themes/hexo/components/NavButtonGroup.js +++ b/themes/hexo/components/NavButtonGroup.js @@ -13,12 +13,21 @@ const NavButtonGroup = (props) => { return <> } - return + return ( + + ); } export default NavButtonGroup diff --git a/themes/hexo/components/PaginationNumber.js b/themes/hexo/components/PaginationNumber.js index fba781e2..0eb0b001 100644 --- a/themes/hexo/components/PaginationNumber.js +++ b/themes/hexo/components/PaginationNumber.js @@ -16,51 +16,57 @@ const PaginationNumber = ({ page, totalPage }) => { const pages = generatePages(pagePrefix, page, currentPage, totalPage) return ( -
    - {/* 上一页 */} - - - +
    + {/* 上一页 */} + - {pages} + - {/* 下一页 */} - - - -
    - ) + + + {pages} + + {/* 下一页 */} + + + + + +
    + ); } function getPageElement(page, currentPage, pagePrefix) { return ( - - - {page} - - - ) + ( + + {page} + + ) + ); } function generatePages(pagePrefix, page, currentPage, totalPage) { diff --git a/themes/hexo/components/TagItemMini.js b/themes/hexo/components/TagItemMini.js index aa3388ec..32221ea4 100644 --- a/themes/hexo/components/TagItemMini.js +++ b/themes/hexo/components/TagItemMini.js @@ -1,15 +1,21 @@ import Link from 'next/link' const TagItemMini = ({ tag, selected = false }) => { - return - -
    {selected && } {tag.name + (tag.count ? `(${tag.count})` : '')}
    -
    - + return ( + + +
    {selected && } {tag.name + (tag.count ? `(${tag.count})` : '')}
    + + + ); } export default TagItemMini diff --git a/themes/hexo/components/TopNav.js b/themes/hexo/components/TopNav.js index fec458eb..6555a27f 100644 --- a/themes/hexo/components/TopNav.js +++ b/themes/hexo/components/TopNav.js @@ -90,10 +90,13 @@ const TopNav = props => {
    {locale.COMMON.CATEGORY}
    - - - {locale.COMMON.MORE} - + + + {locale.COMMON.MORE} +
    @@ -104,10 +107,13 @@ const TopNav = props => {
    {locale.COMMON.TAGS}
    - - - {locale.COMMON.MORE} - + + + {locale.COMMON.MORE} +
    diff --git a/themes/matery/LayoutCategory.js b/themes/matery/LayoutCategory.js index d7c72799..7b57c3c0 100644 --- a/themes/matery/LayoutCategory.js +++ b/themes/matery/LayoutCategory.js @@ -7,30 +7,32 @@ import HeaderArticle from './components/HeaderArticle' export const LayoutCategory = props => { const { category, categories } = props - return } > + return ( + } > -
    +
    -
    +
    -
    - {categories.map(e => { - const selected = e.name === category - return ( - -
    - - {e.name}({e.count}) -
    - - ) - })} +
    + {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 99c0f582..ab98d3a4 100644 --- a/themes/matery/LayoutCategoryIndex.js +++ b/themes/matery/LayoutCategoryIndex.js @@ -6,27 +6,27 @@ export const LayoutCategoryIndex = props => { const { categories } = props return ( - } > + } > -
    +
    -
    +
    -
    - {categories.map(e => { - return ( - -
    - - {e.name}({e.count}) -
    - - ) - })} -
    -
    +
    + {categories.map(e => { + return ( + +
    + + {e.name}({e.count}) +
    + + ) + })} +
    +
    -
    - +
    +
    ) } diff --git a/themes/matery/LayoutSearch.js b/themes/matery/LayoutSearch.js index bed5cefc..db528a29 100644 --- a/themes/matery/LayoutSearch.js +++ b/themes/matery/LayoutSearch.js @@ -38,62 +38,62 @@ export const LayoutSearch = props => { }, 100) }) return ( - - {!currentSearch && <> -
    - - {/* 分类 */} - -
    - - {locale.COMMON.CATEGORY}: -
    -
    - {categories?.map(category => { - return ( - + {!currentSearch && <> +
    + + {/* 分类 */} + +
    + + {locale.COMMON.CATEGORY}: +
    +
    + {categories?.map(category => { + return ( + +
    -
    - - {category.name}({category.count}) -
    - - ) - })} -
    - - {/* 标签 */} - -
    - - {locale.COMMON.TAGS}: -
    -
    - {tags?.map(tag => { - return ( -
    - + + {category.name}({category.count})
    - ) - })} -
    -
    -
    - } + + ) + })} +
    + + {/* 标签 */} + +
    + + {locale.COMMON.TAGS}: +
    +
    + {tags?.map(tag => { + return ( +
    + +
    + ) + })} +
    +
    +
    + } - {currentSearch && <> -
    - {BLOG.POST_LIST_STYLE === 'page' ? : } -
    - } + {currentSearch && <> +
    + {BLOG.POST_LIST_STYLE === 'page' ? : } +
    + } - + ) } diff --git a/themes/matery/LayoutSlug.js b/themes/matery/LayoutSlug.js index a6a79e7b..6e95ff52 100644 --- a/themes/matery/LayoutSlug.js +++ b/themes/matery/LayoutSlug.js @@ -45,7 +45,7 @@ export const LayoutSlug = props => { >
    -
    +
    {lock && } @@ -112,7 +112,7 @@ export const LayoutSlug = props => { data-aos-once="false" data-aos-anchor-placement="top-center" className='relative h-full'> -
    +
    diff --git a/themes/matery/components/ArticleCopyright.js b/themes/matery/components/ArticleCopyright.js index e3456747..e5b56411 100644 --- a/themes/matery/components/ArticleCopyright.js +++ b/themes/matery/components/ArticleCopyright.js @@ -16,24 +16,26 @@ export default function ArticleCopyright () { }) const { locale } = useGlobal() - return
    -
      -
    • - {locale.COMMON.AUTHOR}: - - {BLOG.AUTHOR} - -
    • -
    • - {locale.COMMON.URL}: - - {path} - -
    • -
    • - {locale.COMMON.COPYRIGHT}: - {locale.COMMON.COPYRIGHT_NOTICE} -
    • -
    -
    + return ( +
    +
      +
    • + {locale.COMMON.AUTHOR}: + + {BLOG.AUTHOR} + +
    • +
    • + {locale.COMMON.URL}: + + {path} + +
    • +
    • + {locale.COMMON.COPYRIGHT}: + {locale.COMMON.COPYRIGHT_NOTICE} +
    • +
    +
    + ); } diff --git a/themes/matery/components/ArticleInfo.js b/themes/matery/components/ArticleInfo.js index 892e1c3e..1a4c9a4a 100644 --- a/themes/matery/components/ArticleInfo.js +++ b/themes/matery/components/ArticleInfo.js @@ -10,36 +10,38 @@ export const ArticleInfo = (props) => { const { locale } = useGlobal() const date = formatDate(post?.date?.start_date || post?.createdTime, locale.LOCALE) - return
    -
    - {post.tagItems && ( -
    - {post.tagItems.map(tag => ( - - ))} -
    - )} -
    + return ( +
    +
    + {post.tagItems && ( +
    + {post.tagItems.map(tag => ( + + ))} +
    + )} +
    -
    - {post?.type !== 'Page' && (<> - - - 发布日期: {date} - - - - 更新日期: {post.lastEditedTime} - - - - - - )} -
    +
    + {post?.type !== 'Page' && (<> + -
    + 发布日期:{date} + + + + 更新日期: {post.lastEditedTime} + + + + + + )} +
    + +
    + ); } diff --git a/themes/matery/components/ArticleRecommend.js b/themes/matery/components/ArticleRecommend.js index 428b7afa..ed87337e 100644 --- a/themes/matery/components/ArticleRecommend.js +++ b/themes/matery/components/ArticleRecommend.js @@ -34,35 +34,32 @@ export default function ArticleRecommend({ recommendPosts, siteInfo }) { : `url("${siteInfo?.pageCover}")` return ( - - + +
    - - ) + ); } diff --git a/themes/matery/components/BlogPostArchive.js b/themes/matery/components/BlogPostArchive.js index 227a2697..20887d45 100644 --- a/themes/matery/components/BlogPostArchive.js +++ b/themes/matery/components/BlogPostArchive.js @@ -29,17 +29,20 @@ const BlogPostArchive = ({ posts = [], archiveTitle }) => {
    {post.date?.start_date}{' '}   - - - {post.title} - + + + {post.title} +
    ))}
    - ) + ); } } diff --git a/themes/matery/components/BlogPostCard.js b/themes/matery/components/BlogPostCard.js index fbe24de5..0f901a71 100644 --- a/themes/matery/components/BlogPostCard.js +++ b/themes/matery/components/BlogPostCard.js @@ -7,80 +7,83 @@ import CONFIG_MATERY from '../config_matery' const BlogPostCard = ({ post, showSummary }) => { const showPreview = CONFIG_MATERY.POST_LIST_PREVIEW && post.blockMap return ( -
    +
    - {/* 固定高度 ,空白用图片拉升填充 */} -
    + {/* 固定高度 ,空白用图片拉升填充 */} +
    - {/* 头部图片 填充卡片 */} - {CONFIG_MATERY.POST_LIST_COVER && !showPreview && post?.page_cover && ( - -
    - {/* eslint-disable-next-line @next/next/no-img-element */} - {post.title} - {post.title} -
    - - )} + {/* 头部图片 填充卡片 */} + {CONFIG_MATERY.POST_LIST_COVER && !showPreview && post?.page_cover && ( + +
    + {/* eslint-disable-next-line @next/next/no-img-element */} + {post.title} + {post.title} +
    + + )} -
    - {/* 描述 */} -
    +
    + {/* 描述 */} +
    - {(!showPreview || showSummary) && post.summary && ( -

    - {post.summary} -

    - )} + {(!showPreview || showSummary) && post.summary && ( +

    + {post.summary} +

    + )} - -
    +
    + - {post?.tagItems && post?.tagItems.length > 0 && (<> -
    -
    -
    -
    - {' '} - {post.tagItems.map(tag => ( - - ))} -
    -
    -
    - )} -
    -
    + + {post.date?.start_date || post.lastEditedTime} -
    - ) + + + + + {post.category} + + +
    +
    + + {post?.tagItems && post?.tagItems.length > 0 && (<> +
    +
    +
    +
    + {' '} + {post.tagItems.map(tag => ( + + ))} +
    +
    +
    + )} +
    +
    + +
    + ); } export default BlogPostCard diff --git a/themes/matery/components/Catalog.js b/themes/matery/components/Catalog.js index 3104e338..f58aa9fb 100644 --- a/themes/matery/components/Catalog.js +++ b/themes/matery/components/Catalog.js @@ -58,12 +58,12 @@ const Catalog = ({ toc }) => { return <> } - return
    + return
    目录
    -
    +