From 4d6df0ef683cd983bb711c093a79d26ea0cf371e Mon Sep 17 00:00:00 2001 From: kitety Date: Thu, 25 May 2023 21:31:44 +0800 Subject: [PATCH 1/5] fix: wrapper style paddingTop --- themes/hexo/LayoutBase.js | 5 ++++- themes/matery/LayoutBase.js | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/themes/hexo/LayoutBase.js b/themes/hexo/LayoutBase.js index 27c8e1a9..21f2cffd 100644 --- a/themes/hexo/LayoutBase.js +++ b/themes/hexo/LayoutBase.js @@ -12,6 +12,7 @@ import { useGlobal } from '@/lib/global' import BLOG from '@/blog.config' import dynamic from 'next/dynamic' import { isBrowser, loadExternalResource } from '@/lib/utils' +import CONFIG_HEXO from './config_hexo' const FacebookPage = dynamic( () => { @@ -65,6 +66,8 @@ const LayoutBase = props => { if (isBrowser()) { loadExternalResource('/css/theme-hexo.css', 'css') } + + const fixStyleObject = !CONFIG_HEXO.HOME_BANNER_ENABLE ? { paddingTop: '4rem' }:{} return (
@@ -73,7 +76,7 @@ const LayoutBase = props => { {headerSlot} -
+
{onLoading ? : children} diff --git a/themes/matery/LayoutBase.js b/themes/matery/LayoutBase.js index 5e699117..6dbac0d6 100644 --- a/themes/matery/LayoutBase.js +++ b/themes/matery/LayoutBase.js @@ -12,6 +12,7 @@ import FloatDarkModeButton from './components/FloatDarkModeButton' import throttle from 'lodash.throttle' import { isBrowser, loadExternalResource } from '@/lib/utils' import SocialButton from './components/SocialButton' +import CONFIG_MATERY from './config_matery' /** * 基础布局 采用左右两侧布局,移动端使用顶部导航栏 @@ -41,6 +42,7 @@ const LayoutBase = props => { if (isBrowser()) { loadExternalResource('/css/theme-matery.css', 'css') } + const fixStyleObject = !CONFIG_MATERY.HOME_BANNER_ENABLE ? { paddingTop: '4rem' } : {} return (
@@ -51,7 +53,7 @@ const LayoutBase = props => { {headerSlot} -
+
{/* 嵌入区域 */}
{props.containerSlot} From 106ddfdd89f38c1eb82794fc0a7139b9c76cbf1d Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Mon, 29 May 2023 11:53:40 +0800 Subject: [PATCH 2/5] submit password on enter --- themes/example/components/ArticleLock.js | 27 ++++++++++++++-------- themes/fukasawa/components/ArticleLock.js | 5 ++++ themes/hexo/components/ArticleLock.js | 9 +++++++- themes/hexo/components/HeaderArticle.js | 2 +- themes/matery/components/ArticleLock.js | 28 +++++++++++++++-------- themes/medium/components/ArticleLock.js | 9 +++++++- themes/next/components/ArticleLock.js | 5 ++++ themes/nobelium/components/ArticleLock.js | 27 ++++++++++++++-------- themes/simple/components/ArticleLock.js | 27 ++++++++++++++-------- 9 files changed, 96 insertions(+), 43 deletions(-) diff --git a/themes/example/components/ArticleLock.js b/themes/example/components/ArticleLock.js index f21ce74a..de3569b0 100644 --- a/themes/example/components/ArticleLock.js +++ b/themes/example/components/ArticleLock.js @@ -23,16 +23,23 @@ export const ArticleLock = props => { } return
-
-
{locale.COMMON.ARTICLE_LOCK_TIPS}
-
- -
-  {locale.COMMON.SUBMIT} +
+
{locale.COMMON.ARTICLE_LOCK_TIPS}
+
+ { + if (e.key === 'Enter') { + submitPassword() + } + }} + className='outline-none w-full text-sm pl-5 rounded-l transition font-light leading-10 text-black dark:bg-gray-500 bg-gray-50' + > +
+  {locale.COMMON.SUBMIT} +
+
+
+
-
-
-
-
} diff --git a/themes/fukasawa/components/ArticleLock.js b/themes/fukasawa/components/ArticleLock.js index 9a8e6081..23a663a3 100644 --- a/themes/fukasawa/components/ArticleLock.js +++ b/themes/fukasawa/components/ArticleLock.js @@ -30,6 +30,11 @@ export const ArticleLock = props => {
{ + if (e.key === 'Enter') { + submitPassword() + } + }} className="outline-none w-full text-sm pl-5 rounded-l transition focus:shadow-lg dark:text-gray-300 font-light leading-10 text-black bg-gray-100 dark:bg-gray-500" >
{
{locale.COMMON.ARTICLE_LOCK_TIPS}
- + { + if (e.key === 'Enter') { + submitPassword() + } + }} + className='outline-none w-full text-sm pl-5 rounded-l transition focus:shadow-lg dark:text-gray-300 font-light leading-10 text-black bg-gray-100 dark:bg-gray-500'> +
 {locale.COMMON.SUBMIT}
diff --git a/themes/hexo/components/HeaderArticle.js b/themes/hexo/components/HeaderArticle.js index 1681c37a..7e19985a 100644 --- a/themes/hexo/components/HeaderArticle.js +++ b/themes/hexo/components/HeaderArticle.js @@ -35,7 +35,7 @@ export default function HeaderArticle({ post, siteInfo }) {
{post.category && <> -
+
{post.category}
diff --git a/themes/matery/components/ArticleLock.js b/themes/matery/components/ArticleLock.js index 0a56f39e..605bfb5d 100644 --- a/themes/matery/components/ArticleLock.js +++ b/themes/matery/components/ArticleLock.js @@ -22,16 +22,24 @@ export const ArticleLock = props => { } return
-
-
{locale.COMMON.ARTICLE_LOCK_TIPS}
-
- -
-  {locale.COMMON.SUBMIT} +
+
{locale.COMMON.ARTICLE_LOCK_TIPS}
+
+ { + if (e.key === 'Enter') { + submitPassword() + } + }} + className='outline-none w-full text-sm pl-5 rounded-l transition focus:shadow-lg dark:text-gray-300 font-light leading-10 text-black bg-gray-100 dark:bg-gray-500'> + + +
+  {locale.COMMON.SUBMIT} +
+
+
+
-
-
-
-
} diff --git a/themes/medium/components/ArticleLock.js b/themes/medium/components/ArticleLock.js index 8ffe4044..2798f97a 100644 --- a/themes/medium/components/ArticleLock.js +++ b/themes/medium/components/ArticleLock.js @@ -26,7 +26,14 @@ export const ArticleLock = props => {
{locale.COMMON.ARTICLE_LOCK_TIPS}
- + { + if (e.key === 'Enter') { + submitPassword() + } + }} + className='outline-none w-full text-sm pl-5 rounded-l transition focus:shadow-lg dark:text-gray-300 font-light leading-10 text-black bg-gray-100 dark:bg-gray-500'> +
 {locale.COMMON.SUBMIT}
diff --git a/themes/next/components/ArticleLock.js b/themes/next/components/ArticleLock.js index 6d2ec730..3843a956 100644 --- a/themes/next/components/ArticleLock.js +++ b/themes/next/components/ArticleLock.js @@ -30,6 +30,11 @@ export const ArticleLock = props => {
{ + if (e.key === 'Enter') { + submitPassword() + } + }} className="outline-none w-full text-sm pl-5 transition focus:shadow-lg dark:text-gray-300 font-light leading-10 text-black bg-gray-100 dark:bg-gray-500" >
{ } return
-
-
{locale.COMMON.ARTICLE_LOCK_TIPS}
-
- -
-  {locale.COMMON.SUBMIT} +
+
{locale.COMMON.ARTICLE_LOCK_TIPS}
+
+ { + if (e.key === 'Enter') { + submitPassword() + } + }} + className='outline-none w-full text-sm pl-5 rounded-l transition font-light leading-10 text-black dark:bg-gray-500 bg-gray-50' + > +
+  {locale.COMMON.SUBMIT} +
+
+
+
-
-
-
-
} diff --git a/themes/simple/components/ArticleLock.js b/themes/simple/components/ArticleLock.js index f21ce74a..de3569b0 100644 --- a/themes/simple/components/ArticleLock.js +++ b/themes/simple/components/ArticleLock.js @@ -23,16 +23,23 @@ export const ArticleLock = props => { } return
-
-
{locale.COMMON.ARTICLE_LOCK_TIPS}
-
- -
-  {locale.COMMON.SUBMIT} +
+
{locale.COMMON.ARTICLE_LOCK_TIPS}
+
+ { + if (e.key === 'Enter') { + submitPassword() + } + }} + className='outline-none w-full text-sm pl-5 rounded-l transition font-light leading-10 text-black dark:bg-gray-500 bg-gray-50' + > +
+  {locale.COMMON.SUBMIT} +
+
+
+
-
-
-
-
} From bc6b64ed21c21b121e4ea6251bba0baf71eb08b1 Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Mon, 29 May 2023 12:04:54 +0800 Subject: [PATCH 3/5] tailwindCSS --- themes/hexo/LayoutBase.js | 3 +-- themes/matery/LayoutBase.js | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/themes/hexo/LayoutBase.js b/themes/hexo/LayoutBase.js index 21f2cffd..8c2d72f2 100644 --- a/themes/hexo/LayoutBase.js +++ b/themes/hexo/LayoutBase.js @@ -67,7 +67,6 @@ const LayoutBase = props => { loadExternalResource('/css/theme-hexo.css', 'css') } - const fixStyleObject = !CONFIG_HEXO.HOME_BANNER_ENABLE ? { paddingTop: '4rem' }:{} return (
@@ -76,7 +75,7 @@ const LayoutBase = props => { {headerSlot} -
+
{onLoading ? : children} diff --git a/themes/matery/LayoutBase.js b/themes/matery/LayoutBase.js index 6dbac0d6..282cc44b 100644 --- a/themes/matery/LayoutBase.js +++ b/themes/matery/LayoutBase.js @@ -42,7 +42,6 @@ const LayoutBase = props => { if (isBrowser()) { loadExternalResource('/css/theme-matery.css', 'css') } - const fixStyleObject = !CONFIG_MATERY.HOME_BANNER_ENABLE ? { paddingTop: '4rem' } : {} return (
@@ -53,7 +52,7 @@ const LayoutBase = props => { {headerSlot} -
+
{/* 嵌入区域 */}
{props.containerSlot} From 4a88c462c137befb790d16fdc9005fcd106e2974 Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Mon, 29 May 2023 12:07:08 +0800 Subject: [PATCH 4/5] new contributor --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index f2c9a2e0..93e8de48 100644 --- a/README.md +++ b/README.md @@ -180,6 +180,10 @@ emengweb
emengweb

🔧 🐛 + + kitety
kitety

🔧 🐛 + + From 2fa0ca5b1ccfa0c8239a1e283746db5e8f77b8c6 Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Mon, 29 May 2023 21:37:14 +0800 Subject: [PATCH 5/5] Update blog.config.js readme --- blog.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blog.config.js b/blog.config.js index aefa667e..2178eaa2 100644 --- a/blog.config.js +++ b/blog.config.js @@ -27,7 +27,7 @@ const BLOG = { CONTACT_LINKEDIN: process.env.NEXT_PUBLIC_CONTACT_LINKEDIN || '', // 你的linkedIn 首页 CONTACT_INSTAGRAM: process.env.NEXT_PUBLIC_CONTACT_INSTAGRAM || '', // 您的instagram地址 - NOTION_HOST: process.env.NEXT_PUBLIC_NOTION_HOST || 'https://www.notion.so', // Notion域名,您可以选择用自己的域名进行反向代理 + NOTION_HOST: process.env.NEXT_PUBLIC_NOTION_HOST || 'https://www.notion.so', // Notion域名,您可以选择用自己的域名进行反向代理,如果不懂得什么是反向代理,请勿修改此项 // 网站字体 FONT_STYLE: process.env.NEXT_PUBLIC_FONT_STYLE || 'font-serif', // ['font-serif','font-sans'] 两种可选,分别是衬线和无衬线: 参考 https://www.jianshu.com/p/55e410bd2115