From bcb8620d31ab403d600381b2c20e52d2609e989e Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Mon, 24 Apr 2023 17:49:04 +0800 Subject: [PATCH 001/414] =?UTF-8?q?Page=20=E4=B8=BA=E7=A9=BA=E6=97=B6?= =?UTF-8?q?=E7=9A=84=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/notion/getNotionData.js | 39 ++++++++++++++++------ themes/hexo/components/BlogPostCardInfo.js | 2 +- themes/next/components/BlogPostCard.js | 2 +- 3 files changed, 31 insertions(+), 12 deletions(-) diff --git a/lib/notion/getNotionData.js b/lib/notion/getNotionData.js index 0e2d5bcb..55c15678 100644 --- a/lib/notion/getNotionData.js +++ b/lib/notion/getNotionData.js @@ -68,7 +68,7 @@ export async function getNotionPageData({ pageId, from }) { console.log('[命中缓存]:', `from:${from}`, `root-page-id:${pageId}`) return data } - const pageRecordMap = await getPageRecordMapByNotionAPI({ pageId, from }) + const pageRecordMap = await getDataBaseInfoByNotionAPI({ pageId, from }) // 存入缓存 if (pageRecordMap) { await setDataToCache(cacheKey, pageRecordMap) @@ -177,24 +177,44 @@ async function getNotice(post) { * 调用NotionAPI获取Page数据 * @returns {Promise} */ -async function getPageRecordMapByNotionAPI({ pageId, from }) { +async function getDataBaseInfoByNotionAPI({ pageId, from }) { const pageRecordMap = await getPostBlocks(pageId, from) if (!pageRecordMap) { - return [] + console.error('can`t get Notion Data ; Which id is: ', pageId) + return {} } pageId = idToUuid(pageId) - const block = pageRecordMap.block + const block = pageRecordMap.block || {} const rawMetadata = block[pageId]?.value // Check Type Page-Database和Inline-Database if ( - rawMetadata?.type !== 'collection_view_page' && - rawMetadata?.type !== 'collection_view' + rawMetadata?.type !== 'collection_view_page' && rawMetadata?.type !== 'collection_view' ) { - console.warn(`pageId "${pageId}" is not a database`) - return null + console.error(`pageId "${pageId}" is not a database`) + return { + notice: null, + siteInfo: getBlogInfo({}), + allPages: [{ id: 1, title: `无法获取Notion数据,请检查Notion_ID: \n 当前 ${pageId}`, summary: '访问文档获取帮助→ https://tangly1024.com/article/vercel-deploy-notion-next', status: 'Published', type: 'Post', slug: '13a171332816461db29d50e9f575b00d', date: { start_date: '2023-04-24', lastEditedTime: '2023-04-24', tagItems: [] } }], + collection: [], + collectionQuery: {}, + collectionId: null, + collectionView: {}, + viewIds: [], + block: {}, + schema: {}, + tagOptions: [], + categoryOptions: [], + rawMetadata: {}, + customNav: [], + customMenu: [], + postCount: 1, + pageIds: [], + latestPosts: [] + } } - const collection = Object.values(pageRecordMap.collection)[0]?.value + const collection = Object.values(pageRecordMap.collection)[0]?.value || {} + const siteInfo = getBlogInfo({ collection, block }) const collectionId = rawMetadata?.collection_id const collectionQuery = pageRecordMap.collection_query const collectionView = pageRecordMap.collection_view @@ -242,7 +262,6 @@ async function getPageRecordMapByNotionAPI({ pageId, from }) { const notice = await getNotice(collectionData.filter(post => { return post && post?.type && post?.type === 'Notice' && post.status === 'Published' })?.[0]) const categoryOptions = getAllCategories({ allPages, categoryOptions: getCategoryOptions(schema) }) const tagOptions = getAllTags({ allPages, tagOptions: getTagOptions(schema) }) - const siteInfo = getBlogInfo({ collection, block }) const customNav = getCustomNav({ allPages: collectionData.filter(post => post.type === 'Page' && post.status === 'Published') }) // 新的菜单 const customMenu = await getCustomMenu({ collectionData }) diff --git a/themes/hexo/components/BlogPostCardInfo.js b/themes/hexo/components/BlogPostCardInfo.js index 88ceaeed..7336b64a 100644 --- a/themes/hexo/components/BlogPostCardInfo.js +++ b/themes/hexo/components/BlogPostCardInfo.js @@ -78,7 +78,7 @@ export const BlogPostCardInfo = ({ post, showPreview, showPageCover, showSummary
{' '} - {post.tagItems.map(tag => ( + {post.tagItems?.map(tag => ( ))}
diff --git a/themes/next/components/BlogPostCard.js b/themes/next/components/BlogPostCard.js index ad45b4a3..c10545a3 100644 --- a/themes/next/components/BlogPostCard.js +++ b/themes/next/components/BlogPostCard.js @@ -60,7 +60,7 @@ const BlogPostCard = ({ post, showSummary }) => {
{' '} - {post.tagItems.map(tag => ( + {post.tagItems?.map(tag => ( ))}
From b6c1c9d3ad250030ee55ec7e75032af7f4572d45 Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Mon, 24 Apr 2023 17:49:45 +0800 Subject: [PATCH 002/414] =?UTF-8?q?=E5=AD=97=E4=BD=93=E5=BA=93fontawesome?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- blog.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blog.config.js b/blog.config.js index 4d53eaff..1b6755f8 100644 --- a/blog.config.js +++ b/blog.config.js @@ -66,7 +66,7 @@ const BLOG = { '"Segoe UI Symbol"', '"Apple Color Emoji"' ], - FONT_AWESOME: '/css/all.min.css', // font-awesome 字体图标地址 + FONT_AWESOME: '/css/all.min.css', // font-awesome 字体图标地址、默认读取本地; 可选 https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/font-awesome/6.0.0/css/all.min.css // 自定义外部脚本,外部样式 CUSTOM_EXTERNAL_JS: [''], // e.g. ['http://xx.com/script.js','http://xx.com/script.js'] From a0a45d2512f3c300198df02ee59ebeb05f2ce019 Mon Sep 17 00:00:00 2001 From: emengweb Date: Mon, 24 Apr 2023 10:29:17 +0000 Subject: [PATCH 003/414] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=EF=BC=8C=E4=BE=A7=E8=BE=B9=E6=A0=8F=E5=A2=9E=E5=8A=A0=E5=85=AC?= =?UTF-8?q?=E5=91=8A=E6=A0=8F=EF=BC=8C=E6=96=87=E7=AB=A0=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=A0=87=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/fukasawa/LayoutTag.js | 1 + themes/fukasawa/LayoutTagIndex.js | 15 +++++++---- themes/fukasawa/components/Announcement.js | 21 ++++++++++++++++ themes/fukasawa/components/ArticleDetail.js | 17 ++++++++----- themes/fukasawa/components/AsideLeft.js | 28 +++++++++++++-------- themes/fukasawa/components/BlogCard.js | 24 +++++++++++++++++- 6 files changed, 83 insertions(+), 23 deletions(-) create mode 100755 themes/fukasawa/components/Announcement.js diff --git a/themes/fukasawa/LayoutTag.js b/themes/fukasawa/LayoutTag.js index 3a546fad..46e9e0fd 100644 --- a/themes/fukasawa/LayoutTag.js +++ b/themes/fukasawa/LayoutTag.js @@ -1,6 +1,7 @@ import BLOG from '@/blog.config' import BlogListPage from './components/BlogListPage' import BlogListScroll from './components/BlogListScroll' +import TagItemMini from './components/TagItemMini' import LayoutBase from './LayoutBase' export const LayoutTag = (props) => { diff --git a/themes/fukasawa/LayoutTagIndex.js b/themes/fukasawa/LayoutTagIndex.js index eb1d690b..df43fdeb 100644 --- a/themes/fukasawa/LayoutTagIndex.js +++ b/themes/fukasawa/LayoutTagIndex.js @@ -1,5 +1,6 @@ import { useGlobal } from '@/lib/global' import TagItem from './components/TagItem' +import TagItemMini from './components/TagItemMini' import LayoutBase from './LayoutBase' export const LayoutTagIndex = (props) => { @@ -8,11 +9,15 @@ export const LayoutTagIndex = (props) => { return
{locale.COMMON.TAGS}:
-
- { tagOptions.map(tag => { - return
- }) } -
+
+ {tagOptions.map(tag => { + return ( +
+ +
+ ) + })} +
} diff --git a/themes/fukasawa/components/Announcement.js b/themes/fukasawa/components/Announcement.js new file mode 100755 index 00000000..dbc24db0 --- /dev/null +++ b/themes/fukasawa/components/Announcement.js @@ -0,0 +1,21 @@ +import { useGlobal } from '@/lib/global' +import dynamic from 'next/dynamic' + +const NotionPage = dynamic(() => import('@/components/NotionPage')) + +const Announcement = ({ post, className }) => { + const { locale } = useGlobal() + if (post?.blockMap) { + return
+
+
{locale.COMMON.ANNOUNCEMENT}
+ {post && (
+ +
)} +
+
+ } else { + return <> + } +} +export default Announcement diff --git a/themes/fukasawa/components/ArticleDetail.js b/themes/fukasawa/components/ArticleDetail.js index 65af8400..96a35161 100644 --- a/themes/fukasawa/components/ArticleDetail.js +++ b/themes/fukasawa/components/ArticleDetail.js @@ -1,3 +1,4 @@ +import TagItemMini from './TagItemMini' import Comment from '@/components/Comment' import NotionPage from '@/components/NotionPage' import formatDate from '@/lib/formatDate' @@ -33,7 +34,7 @@ export default function ArticleDetail(props) {
{/* 文章Title */} -
+
{post.title}
@@ -68,11 +69,15 @@ export default function ArticleDetail(props) { )} -
- -   - -
+
+ {post.tagItems && ( +
+ {post.tagItems.map(tag => ( + + ))} +
+ )} +
diff --git a/themes/fukasawa/components/AsideLeft.js b/themes/fukasawa/components/AsideLeft.js index ef67cc44..0f929bae 100644 --- a/themes/fukasawa/components/AsideLeft.js +++ b/themes/fukasawa/components/AsideLeft.js @@ -5,42 +5,48 @@ import GroupTag from './GroupTag' import SearchInput from './SearchInput' import SiteInfo from './SiteInfo' import Catalog from './Catalog' +import Announcement from './Announcement' import { useRouter } from 'next/router' import DarkModeButton from '@/components/DarkModeButton' function AsideLeft (props) { - const { tagOptions, currentTag, categoryOptions, currentCategory, post, slot, siteInfo } = props + const { tagOptions, currentTag, categoryOptions, currentCategory, post, slot, siteInfo, notice } = props const router = useRouter() - return
+ return
+ +
+ { siteInfo?.description } +
-
+
-
+
-
-
- { siteInfo?.description } -
+
+
+ +
+ {router.asPath !== '/tag' &&
-
+
} {router.asPath !== '/category' &&
-
+
}
-
+
diff --git a/themes/fukasawa/components/BlogCard.js b/themes/fukasawa/components/BlogCard.js index 1d382cf7..86c4ea7f 100644 --- a/themes/fukasawa/components/BlogCard.js +++ b/themes/fukasawa/components/BlogCard.js @@ -1,5 +1,6 @@ import BLOG from '@/blog.config' import Link from 'next/link' +import TagItemMini from './TagItemMini' import React from 'react' import CONFIG_FUKA from '../config_fuka' @@ -28,10 +29,31 @@ const BlogCard = ({ index, post, showSummary, siteInfo }) => { {(!showPreview || showSummary) && ( -

+

{post.summary}

)} + + {/* 分类标签 */} +
+ + + + {post.category} + + +
+
+ {' '} + {post.tagItems.map(tag => ( + + ))} +
+
+
{showPageCover && ( From 67072250d8a4c947856faea6ec57551af6e5c3ed Mon Sep 17 00:00:00 2001 From: emengweb Date: Mon, 24 Apr 2023 10:48:44 +0000 Subject: [PATCH 004/414] =?UTF-8?q?=E4=BC=98=E5=8C=96tag=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/matery/LayoutTag.js | 1 + themes/matery/LayoutTagIndex.js | 1 + 2 files changed, 2 insertions(+) diff --git a/themes/matery/LayoutTag.js b/themes/matery/LayoutTag.js index 3572d019..4f0ac66b 100644 --- a/themes/matery/LayoutTag.js +++ b/themes/matery/LayoutTag.js @@ -6,6 +6,7 @@ import React from 'react' import HeaderArticle from './components/HeaderArticle' import { useGlobal } from '@/lib/global' import TagItemMiddle from './components/TagItemMiddle' +import TagItemMini from './components/TagItemMini' export const LayoutTag = (props) => { const { tagOptions, tag } = props diff --git a/themes/matery/LayoutTagIndex.js b/themes/matery/LayoutTagIndex.js index bfcb41b1..d1d19835 100644 --- a/themes/matery/LayoutTagIndex.js +++ b/themes/matery/LayoutTagIndex.js @@ -1,6 +1,7 @@ import { useGlobal } from '@/lib/global' import HeaderArticle from './components/HeaderArticle' import TagItemMiddle from './components/TagItemMiddle' +import TagItemMini from './components/TagItemMini' import LayoutBase from './LayoutBase' export const LayoutTagIndex = props => { From 84fe9e5e633aba4deab48de07608be27d981bb38 Mon Sep 17 00:00:00 2001 From: emengweb Date: Mon, 24 Apr 2023 10:51:56 +0000 Subject: [PATCH 005/414] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=BB=E9=A2=98hex?= =?UTF-8?q?o=E6=A0=B7=E5=BC=8F=EF=BC=8C=E4=BF=AE=E5=A4=8D=E5=87=A0?= =?UTF-8?q?=E5=A4=84=E9=97=AE=E9=A2=98=EF=BC=8C=E5=8C=85=E6=8B=AC=E7=A7=BB?= =?UTF-8?q?=E5=8A=A8=E7=AB=AF=E5=88=86=E7=B1=BB=E6=8C=89=E9=92=AE=E5=B0=BA?= =?UTF-8?q?=E5=AF=B8=E8=BF=87=E5=B0=8F=E7=9A=84=E9=97=AE=E9=A2=98=EF=BC=8C?= =?UTF-8?q?=E7=A7=BB=E9=99=A4=E5=A4=9A=E5=87=BAhr=E5=88=86=E5=89=B2?= =?UTF-8?q?=E7=BA=BF=E7=BE=8E=E5=8C=96=E6=9A=97=E8=89=B2=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E4=B8=8B=E8=A7=86=E8=A7=89=E6=95=88=E6=9E=9C=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/hexo/LayoutSlug.js | 2 +- themes/hexo/components/Announcement.js | 2 +- themes/hexo/components/ArticleAdjacent.js | 2 +- themes/hexo/components/ArticleCopyright.js | 2 +- themes/hexo/components/ArticleRecommend.js | 4 ++-- themes/hexo/components/Footer.js | 5 ++--- themes/hexo/components/Header.js | 11 ++++++----- themes/hexo/components/HeaderArticle.js | 20 ++++++++++++++++---- themes/hexo/components/InfoCard.js | 4 ++-- themes/hexo/components/Logo.js | 2 +- themes/hexo/components/NavButtonGroup.js | 4 ++-- themes/hexo/components/SideBar.js | 1 - themes/hexo/config_hexo.js | 4 ++-- 13 files changed, 37 insertions(+), 26 deletions(-) diff --git a/themes/hexo/LayoutSlug.js b/themes/hexo/LayoutSlug.js index b47478e8..17850e55 100644 --- a/themes/hexo/LayoutSlug.js +++ b/themes/hexo/LayoutSlug.js @@ -74,7 +74,7 @@ export const LayoutSlug = props => { -
+
{/* 评论互动 */}
diff --git a/themes/hexo/components/Announcement.js b/themes/hexo/components/Announcement.js index 677cb467..02270982 100644 --- a/themes/hexo/components/Announcement.js +++ b/themes/hexo/components/Announcement.js @@ -10,7 +10,7 @@ const Announcement = ({ post, className }) => {
{locale.COMMON.ANNOUNCEMENT}
{post && (
- +
)}
diff --git a/themes/hexo/components/ArticleAdjacent.js b/themes/hexo/components/ArticleAdjacent.js index 6e1face7..3f4a929a 100644 --- a/themes/hexo/components/ArticleAdjacent.js +++ b/themes/hexo/components/ArticleAdjacent.js @@ -11,7 +11,7 @@ export default function ArticleAdjacent ({ prev, next }) { return <> } return ( -
+
  • {locale.COMMON.URL}: - + {path}
  • diff --git a/themes/hexo/components/ArticleRecommend.js b/themes/hexo/components/ArticleRecommend.js index 30373f67..d2354cd3 100644 --- a/themes/hexo/components/ArticleRecommend.js +++ b/themes/hexo/components/ArticleRecommend.js @@ -30,8 +30,8 @@ export default function ArticleRecommend({ recommendPosts, siteInfo }) {
    {recommendPosts.map(post => { const headerImage = post?.page_cover - ? `url("${post.page_cover}")` - : `url("${siteInfo?.pageCover}")` + ? `url("${post.page_cover}&w=240")` + : `url("${siteInfo?.pageCover}&w=240")` return ( ( { -
    -

    {title}

    - Powered by NotionNext {BLOG.VERSION}.
    +

    {title} | {BLOG.BIO}

    +

    Powered by NotionNext {BLOG.VERSION}.


    ) diff --git a/themes/hexo/components/Header.js b/themes/hexo/components/Header.js index 60edd4e8..db656c31 100644 --- a/themes/hexo/components/Header.js +++ b/themes/hexo/components/Header.js @@ -7,7 +7,7 @@ import throttle from 'lodash.throttle' let wrapperTop = 0 let windowTop = 0 -let autoScroll = false +let autoScroll = true const enableAutoScroll = false // 是否开启自动吸附滚动 /** @@ -85,12 +85,12 @@ const Header = props => { return ( ) diff --git a/themes/hexo/components/HeaderArticle.js b/themes/hexo/components/HeaderArticle.js index 2abfc9b7..8c0f2a0e 100644 --- a/themes/hexo/components/HeaderArticle.js +++ b/themes/hexo/components/HeaderArticle.js @@ -1,4 +1,5 @@ import Link from 'next/link' +import TagItemMini from './TagItemMini' import { useGlobal } from '@/lib/global' import formatDate from '@/lib/formatDate' import BLOG from '@/blog.config' @@ -9,7 +10,7 @@ export default function HeaderArticle({ post, siteInfo }) { if (!post) { return <> } - const headerImage = post?.page_cover ? `url("${post.page_cover}")` : `url("${siteInfo?.pageCover}")` + const headerImage = post?.page_cover ? `url("${post.page_cover}&w=1600")` : `url("${siteInfo?.pageCover}&w=1600")` const date = formatDate( post?.date?.start_date || post?.createdTime, @@ -31,11 +32,11 @@ export default function HeaderArticle({ post, siteInfo }) {
    {/* 文章Title */} -
    +
    {post.title}
    -
    +
    {post.category && <> @@ -46,7 +47,7 @@ export default function HeaderArticle({ post, siteInfo }) { }
    -
    +
    {post?.type !== 'Page' && ( <>
    + {BLOG.ANALYTICS_BUSUANZI_ENABLE &&
    {locale.COMMON.VIEWS}
    }
    + +
    + {post.tagItems && ( +
    + {post.tagItems.map(tag => ( + + ))} +
    + )} +
    diff --git a/themes/hexo/components/InfoCard.js b/themes/hexo/components/InfoCard.js index 1393211a..3a978d68 100644 --- a/themes/hexo/components/InfoCard.js +++ b/themes/hexo/components/InfoCard.js @@ -8,7 +8,7 @@ export function InfoCard (props) { const router = useRouter() return
    { router.push('/') }} @@ -16,7 +16,7 @@ export function InfoCard (props) { {/* eslint-disable-next-line @next/next/no-img-element */} {BLOG.AUTHOR}/
    -
    {BLOG.AUTHOR}
    +
    {BLOG.AUTHOR}
    {BLOG.BIO}
    diff --git a/themes/hexo/components/Logo.js b/themes/hexo/components/Logo.js index 61408026..de407279 100644 --- a/themes/hexo/components/Logo.js +++ b/themes/hexo/components/Logo.js @@ -7,7 +7,7 @@ const Logo = props => { return (
    -
    {siteInfo?.title || BLOG.TITLE}
    +
    {siteInfo?.title || BLOG.TITLE}
    ); diff --git a/themes/hexo/components/NavButtonGroup.js b/themes/hexo/components/NavButtonGroup.js index f1ca4297..d32a25f1 100644 --- a/themes/hexo/components/NavButtonGroup.js +++ b/themes/hexo/components/NavButtonGroup.js @@ -14,7 +14,7 @@ const NavButtonGroup = (props) => { } return ( -
    -
    ) diff --git a/themes/hexo/config_hexo.js b/themes/hexo/config_hexo.js index ded4489f..fafb6e5b 100644 --- a/themes/hexo/config_hexo.js +++ b/themes/hexo/config_hexo.js @@ -1,9 +1,9 @@ const CONFIG_HEXO = { HOME_BANNER_ENABLE: true, - HOME_BANNER_GREETINGS: ['Hi,我是一个程序员', 'Hi,我是一个打工人', 'Hi,我是一个干饭人', '欢迎来到我的博客🎉'], // 首页大图标语文字 + HOME_BANNER_GREETINGS: ['AI CAN MAKE Document', 'AI CAN MAKE Brainstorm', 'AI CAN MAKE Picture', 'AI CAN MAKE MORE', 'MAKE GREAT THING With AI 🎉'], // 首页大图标语文字 HOME_NAV_BUTTONS: true, // 首页是否显示分类大图标按钮 - HOME_NAV_BACKGROUND_IMG_FIXED: true, // 首页背景图滚动时是否固定,true 则滚动时图片不懂; false则随鼠标滚动 + HOME_NAV_BACKGROUND_IMG_FIXED: false, // 首页背景图滚动时是否固定,true 则滚动时图片不懂; false则随鼠标滚动 // 菜单配置 MENU_INDEX: true, // 显示首页 From 5ec7862a33ba357820d3b62ff158a7eba747d417 Mon Sep 17 00:00:00 2001 From: emengweb Date: Mon, 24 Apr 2023 10:53:44 +0000 Subject: [PATCH 006/414] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AF=B9notion.so?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E5=8F=8D=E4=BB=A3=E5=9F=9F=E5=90=8D?= =?UTF-8?q?=E7=9A=84=E9=85=8D=E7=BD=AE=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/notion/getPageProperties.js | 2 +- lib/notion/mapImage.js | 4 ++-- public/css/theme-hexo.css | 5 +++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/notion/getPageProperties.js b/lib/notion/getPageProperties.js index 0ba6a3bd..185bc008 100644 --- a/lib/notion/getPageProperties.js +++ b/lib/notion/getPageProperties.js @@ -115,7 +115,7 @@ function getImageUrl(imgObj, blockVal) { return null } if (imgObj.startsWith('/')) { - return 'https://www.notion.so' + imgObj // notion内部图片转相对路径为绝对路径 + return BLOG.NOTION_HOST + imgObj // notion内部图片转相对路径为绝对路径 } if (imgObj.startsWith('http')) { diff --git a/lib/notion/mapImage.js b/lib/notion/mapImage.js index 3d91cd4d..2169bf1d 100644 --- a/lib/notion/mapImage.js +++ b/lib/notion/mapImage.js @@ -12,7 +12,7 @@ const mapImgUrl = (img, block, type = 'block') => { return ret } // 相对目录,则视为notion的自带图片 - if (img.startsWith('/')) ret = 'https://www.notion.so' + img + if (img.startsWith('/')) ret = BLOG.NOTION_HOST + img // 书签的地址本身就是永久链接,无需处理 if (!ret && block?.type === 'bookmark') { @@ -21,7 +21,7 @@ const mapImgUrl = (img, block, type = 'block') => { // notion永久图床地址 if (!ret && img.indexOf('secure.notion-static.com') > 0 && (BLOG.IMG_URL_TYPE === 'Notion' || type !== 'block')) { - ret = 'https://www.notion.so/image/' + encodeURIComponent(img) + '?table=' + type + '&id=' + block.id + ret = BLOG.NOTION_HOST + '/image/' + encodeURIComponent(img) + '?table=' + type + '&id=' + block.id } // 剩余的是第三方图片url或emoji diff --git a/public/css/theme-hexo.css b/public/css/theme-hexo.css index da253800..ff509ec5 100644 --- a/public/css/theme-hexo.css +++ b/public/css/theme-hexo.css @@ -22,4 +22,9 @@ width: 100%; height: 100%; background: linear-gradient(to bottom, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.2) 10%, rgba(0,0,0,0) 25%, rgba(0,0,0,0.2) 75%, rgba(0,0,0,0.5) 100%); +} + +/* Custem */ +.tk-footer{ + opacity: 0; } \ No newline at end of file From a24c5a34a20bd47ae2316d29b8706cab0e8e33bd Mon Sep 17 00:00:00 2001 From: emengweb Date: Mon, 24 Apr 2023 10:55:11 +0000 Subject: [PATCH 007/414] =?UTF-8?q?=E4=BC=98=E5=8C=96fukasawa=E4=B8=BB?= =?UTF-8?q?=E9=A2=98=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/css/theme-fukasawa.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/css/theme-fukasawa.css b/public/css/theme-fukasawa.css index 5a62c5d9..da2d7831 100644 --- a/public/css/theme-fukasawa.css +++ b/public/css/theme-fukasawa.css @@ -4,6 +4,10 @@ margin-bottom: .5rem; } +#theme-fukasawa .sideLeft hr{ + opacity: .04; +} + /* 大屏幕(宽度≥1024px)下显示3列 */ @media (min-width: 1024px) { #theme-fukasawa .grid-container { From e2865970f8f6dbd14744a22a5eab7ceda642e733 Mon Sep 17 00:00:00 2001 From: emengweb Date: Mon, 24 Apr 2023 10:58:25 +0000 Subject: [PATCH 008/414] custem css --- .gitignore | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 332741bc..676b2496 100644 --- a/.gitignore +++ b/.gitignore @@ -44,4 +44,8 @@ yarn-error.log* # sitemap /public/robots.txt /public/sitemap.xml -/public/rss/* \ No newline at end of file +/public/rss/* + +# keyconfig +.env.local +/blog.config.js \ No newline at end of file From 78856ade0a75a722b5ddd5afdf1da02e9cc8f78b Mon Sep 17 00:00:00 2001 From: emengweb Date: Mon, 24 Apr 2023 11:00:57 +0000 Subject: [PATCH 009/414] custom css --- public/css/custom.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/css/custom.css b/public/css/custom.css index 2f828f60..2c08e02e 100644 --- a/public/css/custom.css +++ b/public/css/custom.css @@ -1,2 +1,5 @@ /* 静态文件导入 自定义样式*/ +#theme-fukasawa .sideLeft hr{ + opacity: .04; +} \ No newline at end of file From 29fa0a8b6a6a50ffac70cb8406f1930c548b4447 Mon Sep 17 00:00:00 2001 From: emengweb Date: Mon, 24 Apr 2023 11:02:41 +0000 Subject: [PATCH 010/414] update .gitignore --- .env.local | 2 - .gitignore | 51 -------- blog.config.js | 326 ------------------------------------------------- 3 files changed, 379 deletions(-) delete mode 100644 .env.local delete mode 100644 .gitignore delete mode 100644 blog.config.js diff --git a/.env.local b/.env.local deleted file mode 100644 index fd53e2f4..00000000 --- a/.env.local +++ /dev/null @@ -1,2 +0,0 @@ -# 环境变量 @see https://www.nextjs.cn/docs/basic-features/environment-variables -NEXT_PUBLIC_VERSION=3.13.4 \ No newline at end of file diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 676b2496..00000000 --- a/.gitignore +++ /dev/null @@ -1,51 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.js - -# testing -/coverage - -# next.js -/.next/ -/out/ - -# production -/build - -# misc -.DS_Store -*.pem - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# local env files -# .env.local # 版本号放在此环境变量中 -.env.development.local -.env.test.local -.env.production.local - -# vercel -.vercel - -# dev -/data.json -/yarn.lock -/pnpm-lock.yaml -.idea -.vscode - - -# sitemap -/public/robots.txt -/public/sitemap.xml -/public/rss/* - -# keyconfig -.env.local -/blog.config.js \ No newline at end of file diff --git a/blog.config.js b/blog.config.js deleted file mode 100644 index 4d53eaff..00000000 --- a/blog.config.js +++ /dev/null @@ -1,326 +0,0 @@ -// 注: 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', - PSEUDO_STATIC: false, // 伪静态路径,开启后所有文章URL都以 .html 结尾。 - NEXT_REVALIDATE_SECOND: process.env.NEXT_PUBLIC_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: process.env.NEXT_PUBLIC_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: process.env.NEXT_PUBLIC_APPEARANCE || 'light', // ['light', 'dark', 'auto'], // light 日间模式 , dark夜间模式, auto根据时间和主题自动夜间模式 - APPEARANCE_DARK_TIME: process.env.NEXT_PUBLIC_APPEARANCE_DARK_TIME || [18, 6], // 夜间模式起至时间,false时关闭根据时间自动切换夜间模式 - - CUSTOM_MENU: process.env.NEXT_PUBLIC_CUSTOM_MENU || false, // 支持Menu 类型,从3.12.0版本起,各主题将逐步支持灵活的二级菜单配置,替代了原来的Page类型,此配置是试验功能、默认关闭。 - - AUTHOR: process.env.NEXT_PUBLIC_AUTHOR || 'NotionNext', // 您的昵称 例如 tangly1024 - BIO: process.env.NEXT_PUBLIC_BIO || '一个普通的干饭人🍚', // 作者简介 - LINK: process.env.NEXT_PUBLIC_LINK || 'https://tangly1024.com', // 网站地址 - KEYWORDS: process.env.NEXT_PUBLIC_KEYWORD || 'Notion, 博客', // 网站关键词 英文逗号隔开 - // 社交链接,不需要可留空白,例如 CONTACT_WEIBO:'' - CONTACT_EMAIL: process.env.NEXT_PUBLIC_CONTACT_EMAIL || '', // 邮箱地址 例如mail@tangly1024.com - CONTACT_WEIBO: process.env.NEXT_PUBLIC_CONTACT_WEIBO || '', // 你的微博个人主页 - CONTACT_TWITTER: process.env.NEXT_PUBLIC_CONTACT_TWITTER || '', // 你的twitter个人主页 - CONTACT_GITHUB: process.env.NEXT_PUBLIC_CONTACT_GITHUB || '', // 你的github个人主页 例如 https://github.com/tangly1024 - CONTACT_TELEGRAM: process.env.NEXT_PUBLIC_CONTACT_TELEGRAM || '', // 你的telegram 地址 例如 https://t.me/tangly_1024 - CONTACT_LINKEDIN: process.env.NEXT_PUBLIC_CONTACT_LINKEDIN || '', // 你的linkedIn 首页 - - // 网站字体 - FONT_STYLE: process.env.NEXT_PUBLIC_FONT_STYLE || 'font-serif', // ['font-serif','font-sans'] 两种可选,分别是衬线和无衬线: 参考 https://www.jianshu.com/p/55e410bd2115 - FONT_URL: [ - // 字体CSS 例如 https://npm.elemecdn.com/lxgw-wenkai-webfont@1.6.0/style.css - 'https://fonts.googleapis.com/css?family=Bitter&display=swap', - 'https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300&display=swap', - 'https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@300&display=swap' - ], - FONT_SANS: [ - // 无衬线字体 例如'LXGW WenKai' - 'Bitter', - '"PingFang SC"', - '-apple-system', - 'BlinkMacSystemFont', - '"Hiragino Sans GB"', - '"Segoe UI Emoji"', - '"Segoe UI Symbol"', - '"Segoe UI"', - '"Noto Sans SC"', - 'HarmonyOS_Regular', - '"Microsoft YaHei"', - '"Helvetica Neue"', - 'Helvetica', - '"Source Han Sans SC"', - 'Arial', - 'sans-serif', - '"Apple Color Emoji"' - ], - FONT_SERIF: [ - // 衬线字体 例如'LXGW WenKai' - 'Bitter', - '"Noto Serif SC"', - 'SimSun', - '"Times New Roman"', - 'Times', - 'serif', - '"Segoe UI Emoji"', - '"Segoe UI Symbol"', - '"Apple Color Emoji"' - ], - FONT_AWESOME: '/css/all.min.css', // font-awesome 字体图标地址 - - // 自定义外部脚本,外部样式 - CUSTOM_EXTERNAL_JS: [''], // e.g. ['http://xx.com/script.js','http://xx.com/script.js'] - CUSTOM_EXTERNAL_CSS: [''], // e.g. ['http://xx.com/style.css','http://xx.com/style.css'] - - // 侧栏布局 是否反转(左变右,右变左) 已支持主题: 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 - FACEBOOK_PAGE_ID: process.env.NEXT_PUBLIC_FACEBOOK_PAGE_ID || '', // Facebook Page ID 來啟用 messenger 聊天功能 - FACEBOOK_APP_ID: process.env.NEXT_PUBLIC_FACEBOOK_APP_ID || '', // Facebook App ID 來啟用 messenger 聊天功能 获取: https://developers.facebook.com/ - - BEI_AN: process.env.NEXT_PUBLIC_BEI_AN || '', // 备案号 闽ICP备XXXXXXX - - // PrismJs 代码相关 - PRISM_JS_AUTO_LOADER: - 'https://npm.elemecdn.com/prismjs@1.29.0/plugins/autoloader/prism-autoloader.min.js', - PRISM_JS_PATH: 'https://npm.elemecdn.com/prismjs@1.29.0/components/', - PRISM_THEME_PATH: - 'https://npm.elemecdn.com/prism-themes/themes/prism-a11y-dark.min.css', // 代码样式主题 更多参考 https://github.com/PrismJS/prism-themes - CODE_MAC_BAR: true, // 代码左上角显示mac的红黄绿图标 - CODE_LINE_NUMBERS: process.env.NEXT_PUBLIC_CODE_LINE_NUMBERS || 'false', // 是否显示行号 - - BACKGROUND_LIGHT: '#eeeeee', // use hex value, don't forget '#' e.g #fffefc - BACKGROUND_DARK: '#000000', // use hex value, don't forget '#' - SUB_PATH: '', // leave this empty unless you want to deploy in a folder - - POST_URL_PREFIX: process.env.NEXT_PUBLIC_POST_URL_PREFIX || 'article', - // POST类型文章的默认路径前缀,例如默认POST类型的路径是 /article/[slug] - // 如果此项配置为 '' 空, 则文章将没有前缀路径,使用场景: 希望文章前缀路径为 /post 的情况 支持多级 - // 支援類似 WP 可自訂文章連結格式的功能:https://wordpress.org/documentation/article/customize-permalinks/,目前只先實作 %year%/%month%/%day% - // 例:如想連結改成前綴 article + 時間戳記,可變更為: 'article/%year%/%month%/%day%' - - POST_LIST_STYLE: process.env.NEXT_PUBLIC_PPOST_LIST_STYLE || 'page', // ['page','scroll] 文章列表样式:页码分页、单页滚动加载 - 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: process.env.NEXT_PUBLIC_POST_SORT_BY || 'notion', // 排序方式 'date'按时间,'notion'由notion控制 - - PREVIEW_CATEGORY_COUNT: 16, // 首页最多展示的分类数量,0为不限制 - PREVIEW_TAG_COUNT: 16, // 首页最多展示的标签数量,0为不限制 - - // 鼠标点击烟花特效 - 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' - ], - - // 樱花飘落特效 - SAKURA: process.env.NEXT_PUBLIC_SAKURA || false, // 开关 - - // 漂浮线段特效 - NEST: process.env.NEXT_PUBLIC_NEST || false, // 开关 - - // 动态彩带特效 - FLUTTERINGRIBBON: process.env.NEXT_PUBLIC_FLUTTERINGRIBBON || false, // 开关 - // 静态彩带特效 - RIBBON: process.env.NEXT_PUBLIC_RIBBON || false, // 开关 - - // 星空雨特效 黑夜模式才会生效 - STARRY_SKY: process.env.NEXT_PUBLIC_STARRY_SKY || false, // 开关 - - // 悬浮挂件 - WIDGET_PET: process.env.NEXT_PUBLIC_WIDGET_PET || true, // 是否显示宠物挂件 - WIDGET_PET_LINK: - process.env.NEXT_PUBLIC_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_LRC_TYPE: process.env.NEXT_PUBLIC_MUSIC_PLAYER_LRC_TYPE || '0', // 歌词显示类型,可选值: 3 | 1 | 0(0:禁用 lrc 歌词,1:lrc 格式的字符串,3:lrc 文件 url)(前提是有配置歌词路径,对 meting 无效) - MUSIC_PLAYER_CDN_URL: - process.env.NEXT_PUBLIC_MUSIC_PLAYER_CDN_URL || - 'https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/aplayer/1.10.1/APlayer.min.js', - MUSIC_PLAYER_ORDER: process.env.NEXT_PUBLIC_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 - MUSIC_PLAYER_METING_LRC_TYPE: - process.env.NEXT_PUBLIC_MUSIC_PLAYER_METING_LRC_TYPE || '1', // 可选值: 3 | 1 | 0(0:禁用 lrc 歌词,1:lrc 格式的字符串,3:lrc 文件 url) - - // ----> 评论互动 可同时开启多个支持 WALINE VALINE GISCUS CUSDIS UTTERRANCES GITALK - - // twikoo - COMMENT_TWIKOO_ENV_ID: process.env.NEXT_PUBLIC_COMMENT_ENV_ID || '', // TWIKOO地址 腾讯云环境填 envId;Vercel 环境域名地址(https://xxx.vercel.app) - - // utterance - COMMENT_UTTERRANCES_REPO: - process.env.NEXT_PUBLIC_COMMENT_UTTERRANCES_REPO || '', // 你的代码仓库名, 例如我是 'tangly1024/NotionNext'; 更多文档参考 https://utteranc.es/ - - // giscus @see https://giscus.app/ - COMMENT_GISCUS_REPO: process.env.NEXT_PUBLIC_COMMENT_GISCUS_REPO || '', // 你的Github仓库名 e.g 'tangly1024/NotionNext' - COMMENT_GISCUS_REPO_ID: process.env.NEXT_PUBLIC_COMMENT_GISCUS_REPO_ID || '', // 你的Github Repo ID e.g ( 設定完 giscus 即可看到 ) - COMMENT_GISCUS_CATEGORY_ID: - process.env.NEXT_PUBLIC_COMMENT_GISCUS_CATEGORY_ID || '', // 你的Github Discussions 內的 Category ID ( 設定完 giscus 即可看到 ) - COMMENT_GISCUS_MAPPING: - process.env.NEXT_PUBLIC_COMMENT_GISCUS_MAPPING || 'pathname', // 你的Github Discussions 使用哪種方式來標定文章, 預設 'pathname' - COMMENT_GISCUS_REACTIONS_ENABLED: - process.env.NEXT_PUBLIC_COMMENT_GISCUS_REACTIONS_ENABLED || '1', // 你的 Giscus 是否開啟文章表情符號 '1' 開啟 "0" 關閉 預設開啟 - COMMENT_GISCUS_EMIT_METADATA: - process.env.NEXT_PUBLIC_COMMENT_GISCUS_EMIT_METADATA || '0', // 你的 Giscus 是否提取 Metadata '1' 開啟 '0' 關閉 預設關閉 - COMMENT_GISCUS_INPUT_POSITION: - process.env.NEXT_PUBLIC_COMMENT_GISCUS_INPUT_POSITION || 'bottom', // 你的 Giscus 發表留言位置 'bottom' 尾部 'top' 頂部, 預設 'bottom' - COMMENT_GISCUS_LANG: process.env.NEXT_PUBLIC_COMMENT_GISCUS_LANG || 'zh-CN', // 你的 Giscus 語言 e.g 'en', 'zh-TW', 'zh-CN', 預設 'en' - COMMENT_GISCUS_LOADING: - process.env.NEXT_PUBLIC_COMMENT_GISCUS_LOADING || 'lazy', // 你的 Giscus 載入是否漸進式載入, 預設 'lazy' - COMMENT_GISCUS_CROSSORIGIN: - process.env.NEXT_PUBLIC_COMMENT_GISCUS_CROSSORIGIN || 'anonymous', // 你的 Giscus 可以跨網域, 預設 'anonymous' - - COMMENT_CUSDIS_APP_ID: process.env.NEXT_PUBLIC_COMMENT_CUSDIS_APP_ID || '', // data-app-id 36位 see https://cusdis.com/ - COMMENT_CUSDIS_HOST: - process.env.NEXT_PUBLIC_COMMENT_CUSDIS_HOST || 'https://cusdis.com', // data-host, change this if you're using self-hosted version - COMMENT_CUSDIS_SCRIPT_SRC: - process.env.NEXT_PUBLIC_COMMENT_CUSDIS_SCRIPT_SRC || - 'https://cusdis.com/js/cusdis.es.js', // change this if you're using self-hosted version - - // gitalk评论插件 更多参考 https://gitalk.github.io/ - COMMENT_GITALK_REPO: process.env.NEXT_PUBLIC_COMMENT_GITALK_REPO || '', // 你的Github仓库名,例如 'NotionNext' - COMMENT_GITALK_OWNER: process.env.NEXT_PUBLIC_COMMENT_GITALK_OWNER || '', // 你的用户名 e.g tangly1024 - COMMENT_GITALK_ADMIN: process.env.NEXT_PUBLIC_COMMENT_GITALK_ADMIN || '', // 管理员用户名、一般是自己 e.g 'tangly1024' - COMMENT_GITALK_CLIENT_ID: - process.env.NEXT_PUBLIC_COMMENT_GITALK_CLIENT_ID || '', // e.g 20位ID , 在gitalk后台获取 - COMMENT_GITALK_CLIENT_SECRET: - process.env.NEXT_PUBLIC_COMMENT_GITALK_CLIENT_SECRET || '', // e.g 40位ID, 在gitalk后台获取 - COMMENT_GITALK_DISTRACTION_FREE_MODE: false, // 类似facebook的无干扰模式 - - COMMENT_GITTER_ROOM: process.env.NEXT_PUBLIC_COMMENT_GITTER_ROOM || '', // gitter聊天室 see https://gitter.im/ 不需要则留空 - COMMENT_DAO_VOICE_ID: process.env.NEXT_PUBLIC_COMMENT_DAO_VOICE_ID || '', // DaoVoice http://dashboard.daovoice.io/get-started - COMMENT_TIDIO_ID: process.env.NEXT_PUBLIC_COMMENT_TIDIO_ID || '', // [tidio_id] -> //code.tidio.co/[tidio_id].js - - COMMENT_VALINE_APP_ID: process.env.NEXT_PUBLIC_VALINE_ID || '', // Valine @see https://valine.js.org/quickstart.html 或 https://github.com/stonehank/react-valine#%E8%8E%B7%E5%8F%96app-id-%E5%92%8C-app-key - COMMENT_VALINE_APP_KEY: process.env.NEXT_PUBLIC_VALINE_KEY || '', - COMMENT_VALINE_SERVER_URLS: process.env.NEXT_PUBLIC_VALINE_SERVER_URLS || '', // 该配置适用于国内自定义域名用户, 海外版本会自动检测(无需手动填写) @see https://valine.js.org/configuration.html#serverURLs - COMMENT_VALINE_PLACEHOLDER: - process.env.NEXT_PUBLIC_VALINE_PLACEHOLDER || '抢个沙发吧~', // 可以搭配后台管理评论 https://github.com/DesertsP/Valine-Admin 便于查看评论,以及邮件通知,垃圾评论过滤等功能 - - COMMENT_WALINE_SERVER_URL: process.env.NEXT_PUBLIC_WALINE_SERVER_URL || '', // 请配置完整的Waline评论地址 例如 hhttps://preview-waline.tangly1024.com @see https://waline.js.org/guide/get-started.html - COMMENT_WALINE_RECENT: process.env.NEXT_PUBLIC_WALINE_RECENT || false, // 最新评论 - - // 此评论系统基于WebMention,细节可参考https://webmention.io - // 它是一个基于IndieWeb理念的开放式评论系统,下方COMMENT_WEBMENTION包含的属性皆需配置: - // ENABLE: 是否开启 - // AUTH: Webmention使用的IndieLogin,可使用Twitter或Github个人页面连结 - // HOSTNAME: Webmention绑定之网域,通常即为本站网址 - // TWITTER_USERNAME: 评论显示区域需要的资讯 - // TOKEN: Webmention的API token - COMMENT_WEBMENTION: { - ENABLE: process.env.NEXT_PUBLIC_WEBMENTION_ENABLE || false, - AUTH: process.env.NEXT_PUBLIC_WEBMENTION_AUTH || '', - HOSTNAME: process.env.NEXT_PUBLIC_WEBMENTION_HOSTNAME || '', - TWITTER_USERNAME: process.env.NEXT_PUBLIC_TWITTER_USERNAME || '', - TOKEN: process.env.NEXT_PUBLIC_WEBMENTION_TOKEN || '' - }, - - // <---- 评论插件 - - // ----> 站点统计 - ANALYTICS_VERCEL: process.env.NEXT_PUBLIC_ANALYTICS_VERCEL || true, // vercel自带的统计 https://vercel.com/docs/concepts/analytics/quickstart https://github.com/tangly1024/NotionNext/issues/897 - ANALYTICS_BUSUANZI_ENABLE: true, // 展示网站阅读量、访问数 see http://busuanzi.ibruce.info/ - ANALYTICS_BAIDU_ID: process.env.NEXT_PUBLIC_ANALYTICS_BAIDU_ID || '', // e.g 只需要填写百度统计的id,[baidu_id] -> https://hm.baidu.com/hm.js?[baidu_id] - ANALYTICS_CNZZ_ID: process.env.NEXT_PUBLIC_ANALYTICS_CNZZ_ID || '', // 只需要填写站长统计的id, [cnzz_id] -> https://s9.cnzz.com/z_stat.php?id=[cnzz_id]&web_id=[cnzz_id] - ANALYTICS_GOOGLE_ID: process.env.NEXT_PUBLIC_ANALYTICS_GOOGLE_ID || '', // 谷歌Analytics的id e.g: G-XXXXXXXXXX - - ANALYTICS_ACKEE_TRACKER: - process.env.NEXT_PUBLIC_ANALYTICS_ACKEE_TRACKER || '', // e.g 'https://ackee.tangly1024.net/tracker.js' - ANALYTICS_ACKEE_DATA_SERVER: - process.env.NEXT_PUBLIC_ANALYTICS_ACKEE_DATA_SERVER || '', // e.g https://ackee.tangly1024.net , don't end with a slash - ANALYTICS_ACKEE_DOMAIN_ID: - process.env.NEXT_PUBLIC_ANALYTICS_ACKEE_DOMAIN_ID || '', // e.g '0e2257a8-54d4-4847-91a1-0311ea48cc7b' - - SEO_GOOGLE_SITE_VERIFICATION: - process.env.NEXT_PUBLIC_SEO_GOOGLE_SITE_VERIFICATION || '', // Remove the value or replace it with your own google site verification code - - // <---- 站点统计 - - // 谷歌广告 - ADSENSE_GOOGLE_ID: process.env.NEXT_PUBLIC_ADSENSE_GOOGLE_ID || '', // 谷歌广告ID e.g ca-pub-xxxxxxxxxxxxxxxx - - // 自定义配置notion数据库字段名 - NOTION_PROPERTY_NAME: { - password: process.env.NEXT_PUBLIC_NOTION_PROPERTY_PASSWORD || 'password', - type: process.env.NEXT_PUBLIC_NOTION_PROPERTY_TYPE || 'type', // 文章类型, - type_post: process.env.NEXT_PUBLIC_NOTION_PROPERTY_TYPE_POST || 'Post', // 当type文章类型与此值相同时,为博文。 - type_page: process.env.NEXT_PUBLIC_NOTION_PROPERTY_TYPE_PAGE || 'Page', // 当type文章类型与此值相同时,为单页。 - type_notice: - process.env.NEXT_PUBLIC_NOTION_PROPERTY_TYPE_NOTICE || 'Notice', // 当type文章类型与此值相同时,为公告。 - type_menu: process.env.NEXT_PUBLIC_NOTION_PROPERTY_TYPE_MENU || 'Menu', // 当type文章类型与此值相同时,为菜单。 - type_sub_menu: - process.env.NEXT_PUBLIC_NOTION_PROPERTY_TYPE_SUB_MENU || 'SubMenu', // 当type文章类型与此值相同时,为子菜单。 - title: process.env.NEXT_PUBLIC_NOTION_PROPERTY_TITLE || 'title', // 文章标题 - status: process.env.NEXT_PUBLIC_NOTION_PROPERTY_STATUS || 'status', - status_publish: - process.env.NEXT_PUBLIC_NOTION_PROPERTY_STATUS_PUBLISH || 'Published', // 当status状态值与此相同时为发布,可以为中文 - status_invisible: - process.env.NEXT_PUBLIC_NOTION_PROPERTY_STATUS_INVISIBLE || 'Invisible', // 当status状态值与此相同时为隐藏发布,可以为中文 , 除此之外其他页面状态不会显示在博客上 - summary: process.env.NEXT_PUBLIC_NOTION_PROPERTY_SUMMARY || 'summary', - slug: process.env.NEXT_PUBLIC_NOTION_PROPERTY_SLUG || 'slug', - category: process.env.NEXT_PUBLIC_NOTION_PROPERTY_CATEGORY || 'category', - date: process.env.NEXT_PUBLIC_NOTION_PROPERTY_DATE || 'date', - tags: process.env.NEXT_PUBLIC_NOTION_PROPERTY_TAGS || 'tags', - icon: process.env.NEXT_PUBLIC_NOTION_PROPERTY_ICON || 'icon' - }, - - // RSS - ENABLE_RSS: process.env.NEXT_PUBLIC_ENABLE_RSS || true, // 是否开启RSS订阅功能 - - // 作废配置 - AVATAR: process.env.NEXT_PUBLIC_AVATAR || '/avatar.svg', // 作者头像,被notion中的ICON覆盖。若无ICON则取public目录下的avatar.png - TITLE: process.env.NEXT_PUBLIC_TITLE || 'NotionNext BLOG', // 站点标题 ,被notion中的页面标题覆盖 - HOME_BANNER_IMAGE: - process.env.NEXT_PUBLIC_HOME_BANNER_IMAGE || './bg_image.jpg', // 首页背景大图, 会被notion中的封面图覆盖,若无封面图则会使用代码中的 /public/bg_image.jpg 文件 - DESCRIPTION: - process.env.NEXT_PUBLIC_DESCRIPTION || '这是一个由NotionNext生成的站点', // 站点描述,被notion中的页面描述覆盖 - - // 网站图片 - IMG_URL_TYPE: process.env.NEXT_PUBLIC_IMG_TYPE || 'Notion', // 此配置已失效,请勿使用;AMAZON方案不再支持,仅支持Notion方案。 ['Notion','AMAZON'] 站点图片前缀 默认 Notion:(https://notion.so/images/xx) , AMAZON(https://s3.us-west-2.amazonaws.com/xxx) - IMG_SHADOW: process.env.NEXT_PUBLIC_IMG_SHADOW || false, // 文章图片是否自动添加阴影 - - // 开发相关 - NOTION_ACCESS_TOKEN: process.env.NOTION_ACCESS_TOKEN || '', // Useful if you prefer not to make your database public - DEBUG: process.env.NEXT_PUBLIC_DEBUG || false, // 是否显示调试按钮 - ENABLE_CACHE: process.env.ENABLE_CACHE || false, // 开启缓存会将Notion数据缓存在内存中,通常在开发调试中使用,正式部署开启此功能意义不大。 - isProd: process.env.VERCEL_ENV === 'production', // distinguish between development and production environment (ref: https://vercel.com/docs/environment-variables#system-environment-variables) isProd: process.env.VERCEL_ENV === 'production' // distinguish between development and production environment (ref: https://vercel.com/docs/environment-variables#system-environment-variables) - VERSION: process.env.NEXT_PUBLIC_VERSION // 版本号 -} - -module.exports = BLOG From 2db4816eeae969fd1149ee99586a44b1d1024055 Mon Sep 17 00:00:00 2001 From: RedhairHambagu <129669334+RedhairHambagu@users.noreply.github.com> Date: Mon, 24 Apr 2023 21:35:27 +0800 Subject: [PATCH 011/414] fix only display toc of current page --- pages/[...slug].js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/[...slug].js b/pages/[...slug].js index 8ed9f270..d51ef3ef 100644 --- a/pages/[...slug].js +++ b/pages/[...slug].js @@ -31,7 +31,7 @@ const Slug = props => { setLock(true) } else { if (!lock && post?.blockMap?.block) { - post.content = Object.keys(post.blockMap.block) + post.content = Object.keys(post.blockMap.block).filter(key => post.blockMap.block[key]?.value.parent_id === post.id) post.toc = getPageTableOfContents(post, post.blockMap) } From 7bd83370191b9dc84dda694998672d3ee15cb5a3 Mon Sep 17 00:00:00 2001 From: emengweb Date: Tue, 25 Apr 2023 11:53:44 +0000 Subject: [PATCH 012/414] =?UTF-8?q?=E4=BF=AE=E6=94=B9hexo=E5=8D=A1?= =?UTF-8?q?=E7=89=87=E5=85=83=E7=B4=A0=E4=BD=8D=E7=BD=AE=E5=92=8C=E9=97=B4?= =?UTF-8?q?=E9=9A=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/hexo/LayoutBase.js | 2 +- themes/hexo/components/Announcement.js | 4 ++-- themes/hexo/components/ArticleRecommend.js | 17 +++++++++----- themes/hexo/components/BlogPostCard.js | 2 +- themes/hexo/components/BlogPostCardInfo.js | 24 +++++++++++--------- themes/hexo/components/Card.js | 2 +- themes/hexo/components/Catalog.js | 4 ++-- themes/hexo/components/HeaderArticle.js | 26 ++++++++++++---------- themes/hexo/components/LatestPostsGroup.js | 6 ++--- themes/hexo/components/Progress.js | 4 ++-- themes/hexo/components/SideBarDrawer.js | 2 +- themes/hexo/components/TocDrawer.js | 2 +- 12 files changed, 52 insertions(+), 43 deletions(-) diff --git a/themes/hexo/LayoutBase.js b/themes/hexo/LayoutBase.js index 27c8e1a9..1f9f458b 100644 --- a/themes/hexo/LayoutBase.js +++ b/themes/hexo/LayoutBase.js @@ -33,7 +33,7 @@ const FacebookPage = dynamic( * @constructor */ const LayoutBase = props => { - const { children, headerSlot, floatSlot, meta, siteInfo } = props + const { children, headerSlot, floatSlot, meta, siteInfo, showTag } = props const [showFloatButton, switchShow] = useState(false) // const [percent, changePercent] = useState(0) // 页面阅读百分比 const rightAreaSlot = ( diff --git a/themes/hexo/components/Announcement.js b/themes/hexo/components/Announcement.js index 02270982..695c26a4 100644 --- a/themes/hexo/components/Announcement.js +++ b/themes/hexo/components/Announcement.js @@ -7,10 +7,10 @@ const Announcement = ({ post, className }) => { const { locale } = useGlobal() if (post?.blockMap) { return
    -
    +
    {locale.COMMON.ANNOUNCEMENT}
    {post && (
    - +
    )}
    diff --git a/themes/hexo/components/ArticleRecommend.js b/themes/hexo/components/ArticleRecommend.js index d2354cd3..446dfb9c 100644 --- a/themes/hexo/components/ArticleRecommend.js +++ b/themes/hexo/components/ArticleRecommend.js @@ -2,6 +2,7 @@ import Link from 'next/link' import CONFIG_HEXO from '../config_hexo' import BLOG from '@/blog.config' import { useGlobal } from '@/lib/global' +import TagItemMini from './TagItemMini' /** * 关联推荐文章 @@ -20,7 +21,7 @@ export default function ArticleRecommend({ recommendPosts, siteInfo }) { } return ( -
    +
    @@ -46,12 +47,16 @@ export default function ArticleRecommend({ recommendPosts, siteInfo }) { style={{ backgroundImage: headerImage }} >
    -
    -
    - - {post.date?.start_date} +
    +
    {post.title}
    +
    +
    + {' '} + {post.tagItems.map(tag => ( +
    {selected && } {tag.name + (tag.count ? `(${tag.count})` : '')}
    + ))} +
    -
    {post.title}
    diff --git a/themes/hexo/components/BlogPostCard.js b/themes/hexo/components/BlogPostCard.js index 56a69368..4725350b 100644 --- a/themes/hexo/components/BlogPostCard.js +++ b/themes/hexo/components/BlogPostCard.js @@ -36,7 +36,7 @@ const BlogPostCard = ({ index, post, showSummary, siteInfo }) => { {showPageCover && (
    -
    +
    )} diff --git a/themes/hexo/components/BlogPostCardInfo.js b/themes/hexo/components/BlogPostCardInfo.js index 88ceaeed..b44dfef3 100644 --- a/themes/hexo/components/BlogPostCardInfo.js +++ b/themes/hexo/components/BlogPostCardInfo.js @@ -17,24 +17,24 @@ export const BlogPostCardInfo = ({ post, showPreview, showPageCover, showSummary href={`${BLOG.SUB_PATH}/${post.slug}`} passHref className={`replace cursor-pointer hover:underline text-2xl ${showPreview ? 'text-center' : '' - } leading-tight text-gray-600 dark:text-gray-100 hover:text-indigo-700 dark:hover:text-indigo-400`}> + } leading-tight font-normal text-gray-600 dark:text-gray-100 hover:text-indigo-700 dark:hover:text-indigo-400`}> {post.title} - {/* 日期 */} + {/* 分类 */}
    + className="cursor-pointer font-light text-sm hover:underline hover:text-indigo-700 dark:hover:text-indigo-400 transform"> - - {post.date?.start_date || post.lastEditedTime} + + {post.category}
    @@ -64,17 +64,19 @@ export const BlogPostCardInfo = ({ post, showPreview, showPageCover, showSummary
    - {/* 分类标签 */} + {/* 日期标签 */}
    + {/* 日期 */} + className="font-light hover:underline cursor-pointer text-sm leading-4 mr-3"> - - {post.category} + + {post.date?.start_date || post.lastEditedTime} +
    {' '} diff --git a/themes/hexo/components/Card.js b/themes/hexo/components/Card.js index c166ffc1..c2db0e49 100644 --- a/themes/hexo/components/Card.js +++ b/themes/hexo/components/Card.js @@ -1,7 +1,7 @@ const Card = ({ children, headerSlot, className }) => { return
    <>{headerSlot} -
    +
    {children}
    diff --git a/themes/hexo/components/Catalog.js b/themes/hexo/components/Catalog.js index 1e7d5b40..980be47b 100644 --- a/themes/hexo/components/Catalog.js +++ b/themes/hexo/components/Catalog.js @@ -61,7 +61,7 @@ const Catalog = ({ toc }) => { return <> } - return
    + return
    {locale.COMMON.TABLE_OF_CONTENTS}
    @@ -79,7 +79,7 @@ const Catalog = ({ toc }) => { notion-table-of-contents-item-indent-level-${tocItem.indentLevel} `} > {tocItem.text} diff --git a/themes/hexo/components/HeaderArticle.js b/themes/hexo/components/HeaderArticle.js index 8c0f2a0e..c4b33a6d 100644 --- a/themes/hexo/components/HeaderArticle.js +++ b/themes/hexo/components/HeaderArticle.js @@ -3,6 +3,7 @@ import TagItemMini from './TagItemMini' import { useGlobal } from '@/lib/global' import formatDate from '@/lib/formatDate' import BLOG from '@/blog.config' +import NotionIcon from '@/components/NotionIcon' export default function HeaderArticle({ post, siteInfo }) { const { locale } = useGlobal() @@ -30,24 +31,25 @@ export default function HeaderArticle({ post, siteInfo }) { data-aos-anchor-placement="top-bottom" className="bg-black bg-opacity-70 absolute top-0 w-full h-96 py-10 flex justify-center items-center "> -
    - {/* 文章Title */} -
    - {post.title} -
    - -
    -
    +
    +
    {post.category && <> -
    - +
    {post.category}
    }
    -
    + + {/* 文章Title */} +
    + {post.title} +
    + +
    + +
    {post?.type !== 'Page' && ( <> }
    -
    +
    {post.tagItems && (
    {post.tagItems.map(tag => ( diff --git a/themes/hexo/components/LatestPostsGroup.js b/themes/hexo/components/LatestPostsGroup.js index e5d02a71..0ba78886 100644 --- a/themes/hexo/components/LatestPostsGroup.js +++ b/themes/hexo/components/LatestPostsGroup.js @@ -37,9 +37,9 @@ const LatestPostsGroup = ({ latestPosts, siteInfo }) => { title={post.title} href={`${BLOG.SUB_PATH}/${post.slug}`} passHref - className={'my-2 flex'}> + className={'my-3 flex'}> -
    +
    {/* { quality={10} alt={post.title} /> */} {/* eslint-disable-next-line @next/next/no-img-element */} - +
    { }, []) return ( -
    +
    {showPercent && ( diff --git a/themes/hexo/components/SideBarDrawer.js b/themes/hexo/components/SideBarDrawer.js index 629889b9..07c122fd 100644 --- a/themes/hexo/components/SideBarDrawer.js +++ b/themes/hexo/components/SideBarDrawer.js @@ -39,7 +39,7 @@ const SideBarDrawer = ({ children, isOpen, onOpen, onClose, className }) => { return
    +
    + {/* 分享 */} + +
    +
    {/* 文章内嵌广告 */} { const { post, lock, validPassword } = props @@ -76,6 +77,9 @@ export const LayoutSlug = props => {
    + {/* 分享 */} + + {/* 评论互动 */}
    diff --git a/themes/matery/LayoutSlug.js b/themes/matery/LayoutSlug.js index 12fefce4..e938942b 100644 --- a/themes/matery/LayoutSlug.js +++ b/themes/matery/LayoutSlug.js @@ -10,6 +10,7 @@ import { ArticleInfo } from './components/ArticleInfo' import Catalog from './components/Catalog' import JumpToCommentButton from './components/JumpToCommentButton' import throttle from 'lodash.throttle' +import ShareBar from '@/components/ShareBar' export const LayoutSlug = props => { const { post, lock, validPassword } = props @@ -87,7 +88,8 @@ export const LayoutSlug = props => {
    - + {/* 分享 */} + {/* 评论互动 */}
    diff --git a/themes/medium/LayoutSlug.js b/themes/medium/LayoutSlug.js index 6000c3f3..b6d54077 100644 --- a/themes/medium/LayoutSlug.js +++ b/themes/medium/LayoutSlug.js @@ -13,6 +13,7 @@ import ArticleAround from './components/ArticleAround' import TocDrawer from './components/TocDrawer' import CategoryItem from './components/CategoryItem' import TagItemMini from './components/TagItemMini' +import ShareBar from '@/components/ShareBar' export const LayoutSlug = props => { const { post, prev, next, siteInfo, lock, validPassword } = props @@ -92,6 +93,8 @@ export const LayoutSlug = props => {
    {post.type === 'Post' && } + {/* 分享 */} +
    diff --git a/themes/next/components/ArticleDetail.js b/themes/next/components/ArticleDetail.js index e5b8dba2..75fc7f7d 100644 --- a/themes/next/components/ArticleDetail.js +++ b/themes/next/components/ArticleDetail.js @@ -2,7 +2,7 @@ import BLOG from '@/blog.config' import BlogAround from './BlogAround' import Comment from '@/components/Comment' import RecommendPosts from './RecommendPosts' -import ShareBar from './ShareBar' +import ShareBar from '@/components/ShareBar' import TagItem from './TagItem' import formatDate from '@/lib/formatDate' import { useGlobal } from '@/lib/global' @@ -100,6 +100,9 @@ export default function ArticleDetail(props) { {/* 推荐文章 */} {post.type === 'Post' && } + {/* 分享 */} + +
    {/* 分类 */} {post.category && <> @@ -124,7 +127,6 @@ export default function ArticleDetail(props) { ))}
    )} - )} diff --git a/themes/next/config_next.js b/themes/next/config_next.js index 5504b8df..d341cee0 100644 --- a/themes/next/config_next.js +++ b/themes/next/config_next.js @@ -30,7 +30,6 @@ const CONFIG_NEXT = { WIDGET_DARK_MODE: false, // 显示日间/夜间模式切换 WIDGET_TOC: true, // 移动端显示悬浮目录 - ARTICLE_SHARE: process.env.NEXT_PUBLIC_ARTICLE_SHARE || false, // 文章分享功能 ARTICLE_RELATE_POSTS: true, // 相关文章推荐 ARTICLE_COPYRIGHT: true // 文章版权声明 diff --git a/themes/nobelium/LayoutSlug.js b/themes/nobelium/LayoutSlug.js index d60062a0..d27628af 100644 --- a/themes/nobelium/LayoutSlug.js +++ b/themes/nobelium/LayoutSlug.js @@ -4,6 +4,7 @@ import NotionPage from '@/components/NotionPage' import { ArticleInfo } from './components/ArticleInfo' import Comment from '@/components/Comment' import { ArticleFooter } from './components/ArticleFooter' +import ShareBar from '@/components/ShareBar' export const LayoutSlug = props => { const { post, lock, validPassword } = props @@ -21,6 +22,7 @@ export const LayoutSlug = props => { {post && <> + } diff --git a/themes/simple/LayoutSlug.js b/themes/simple/LayoutSlug.js index 6cf7c82b..d0cd2a1d 100644 --- a/themes/simple/LayoutSlug.js +++ b/themes/simple/LayoutSlug.js @@ -4,6 +4,7 @@ import NotionPage from '@/components/NotionPage' import { ArticleInfo } from './components/ArticleInfo' import Comment from '@/components/Comment' import ArticleAround from './components/ArticleAround' +import ShareBar from '@/components/ShareBar' export const LayoutSlug = props => { const { post, lock, validPassword, prev, next } = props @@ -23,6 +24,8 @@ export const LayoutSlug = props => { {post.type === 'Post' && } + {/* 分享 */} + }
    } From 90a430299d08b43fe941012ae03aafa40e5b5555 Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Wed, 26 Apr 2023 15:34:26 +0800 Subject: [PATCH 019/414] readme --- README_EN.md | 9 ++++++--- package.json | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README_EN.md b/README_EN.md index b2a9f85c..dbb75684 100644 --- a/README_EN.md +++ b/README_EN.md @@ -35,12 +35,15 @@ Live Demo:[https://preview.tangly1024.com/](https://preview.tangly1024.com/) It only takes a few minutes to set up your personal site: -- [快速部署教程 - 多种方案可供选择](https://tangly1024.com/article/notion-next) +- [Quick Deployment Tutorial - Multiple Options Available](https://tangly1024.com/article/notion-next) -- [个性配置手册 - 如何配置功能插件](https://tangly1024.com/article/notion-next-guide) +- [Customization Guide - How to Configure Feature Plugins](https://tangly1024.com/article/notion-next-guide) -- [二次开发指引 - 如何进行本地开发](https://tangly1024.com/article/how-to-develop-with-notion-next) +- [Development Guide - How to Conduct Local Development](https://tangly1024.com/article/how-to-develop-with-notion-next) +- [Update Guide - How to Get the Latest Upgrade Patch](https://tangly1024.com/article/how-to-update-notionnext) + +- [Version History - Check Feature Highlights for Each Version](https://tangly1024.com/article/notion-next-changelogs) ## Acknowledgements diff --git a/package.json b/package.json index 58e579fd..8bd5a1df 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "react-facebook": "^8.1.4", "react-messenger-customer-chat": "^0.8.0", "react-notion-x": "6.16.0", - "react-share": "^4.4.0", + "react-share": "^4.4.1", "react-tweet-embed": "~2.0.0", "smoothscroll-polyfill": "^0.4.4", "twikoo": "^1.6.16", From c71d51c8002f78c18fa33dfeb1a7611842d86402 Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Wed, 26 Apr 2023 15:34:32 +0800 Subject: [PATCH 020/414] readme --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2fefab40..2505564c 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,10 @@ - [个性配置手册 - 如何配置功能插件](https://tangly1024.com/article/notion-next-guide) - [二次开发指引 - 如何进行本地开发](https://tangly1024.com/article/how-to-develop-with-notion-next) - + +- [更新操作指南 - 获取最新升级补丁](https://tangly1024.com/article/how-to-update-notionnext) + +- [历史版本汇总 - 查询版本功能特性](https://tangly1024.com/article/notion-next-changelogs) ## 致谢 感谢Craig Hart发起的Nobelium项目 From 4ca8f39a6bb4dd6caaaefe746e5b47425c2343e4 Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Wed, 26 Apr 2023 16:11:01 +0800 Subject: [PATCH 021/414] =?UTF-8?q?feat=20-=20=E5=88=86=E4=BA=AB=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- blog.config.js | 4 +- components/ShareBar.js | 82 ++------ components/ShareButton.js | 34 ---- components/ShareButtons.js | 370 +++++++++++++++++++++++++++++++++++++ lib/lang/zh-CN.js | 2 +- 5 files changed, 385 insertions(+), 107 deletions(-) delete mode 100644 components/ShareButton.js create mode 100644 components/ShareButtons.js diff --git a/blog.config.js b/blog.config.js index 1b01e9dc..fa0fad99 100644 --- a/blog.config.js +++ b/blog.config.js @@ -96,7 +96,9 @@ const BLOG = { BACKGROUND_DARK: '#000000', // use hex value, don't forget '#' SUB_PATH: '', // leave this empty unless you want to deploy in a folder - POST_SHARE_BAR_ENABLE: process.env.NEXT_PUBLIC_POST_SHARE_BAR || 'false', // 文章分享功能 ,将在底部显示一个分享条 + POST_SHARE_BAR_ENABLE: process.env.NEXT_PUBLIC_POST_SHARE_BAR || 'true', // 文章分享功能 ,将在底部显示一个分享条 + POSTS_SHARE_SERVICES: process.env.NEXT_PUBLIC_POST_SHARE_SERVICES || 'link,wechat,qq,weibo,email,facebook,twitter,telegram,messenger,line,reddit,whatsapp,linkedin', // 分享的服務,选填逗号隔开 + // 所有支持的分享服务:link(复制链接),wechat(微信),qq,weibo(微博),email(邮件),facebook,twitter,telegram,messenger,line,reddit,whatsapp,linkedin,vkshare,okshare,tumblr,livejournal,mailru,viber,workplace,pocket,instapaper,hatena POST_URL_PREFIX: process.env.NEXT_PUBLIC_POST_URL_PREFIX || 'article', // POST类型文章的默认路径前缀,例如默认POST类型的路径是 /article/[slug] diff --git a/components/ShareBar.js b/components/ShareBar.js index 97f46395..1cf57776 100644 --- a/components/ShareBar.js +++ b/components/ShareBar.js @@ -1,15 +1,10 @@ import BLOG from '@/blog.config' import { useRouter } from 'next/router' import React from 'react' -import { createPopper } from '@popperjs/core' -import copy from 'copy-to-clipboard' -import QRCode from 'qrcode.react' -import { useGlobal } from '@/lib/global' +import ShareButtons from './ShareButtons' const ShareBar = ({ post }) => { const router = useRouter() - const [qrCodeShow, setQrCodeShow] = React.useState(false) - const { locale } = useGlobal() if (!JSON.parse(BLOG.POST_SHARE_BAR_ENABLE) || !post || post?.type !== 'Post') { return <> @@ -17,71 +12,16 @@ const ShareBar = ({ post }) => { const shareUrl = BLOG.LINK + router.asPath - // 二维码悬浮 - const btnRef = React.createRef() - const popoverRef = React.createRef() - - const openPopover = () => { - createPopper(btnRef.current, popoverRef.current, { - placement: 'top' - }) - setQrCodeShow(true) - } - const closePopover = () => { - setQrCodeShow(false) - } - - const copyUrl = () => { - copy(shareUrl) - alert(locale.COMMON.URL_COPIED) - } - - return
    -
    {locale.COMMON.SHARE}:
    -
    - - - -
    -
    - - - -
    -
    - - - -
    - -
    - - - -
    -
    - - - -
    -
    - - - -
    + return
    +
    } export default ShareBar diff --git a/components/ShareButton.js b/components/ShareButton.js deleted file mode 100644 index 39fea1f2..00000000 --- a/components/ShareButton.js +++ /dev/null @@ -1,34 +0,0 @@ -import React from 'react' -import ShareBar from './ShareBar' - -/** - * 悬浮在屏幕右下角,分享按钮 - * @returns {JSX.Element} - * @constructor - */ -const ShareButton = ({ post }) => { - const [popoverShow, setPopoverShow] = React.useState(false) - const btnRef = React.createRef() - - const openPopover = () => { - setPopoverShow(true) - } - const closePopover = () => { - setPopoverShow(false) - } - return ( -
    { openPopover() }} - onMouseLeave={() => { closePopover() }}> -
    - -
    -
    - -
    -
    - ) -} - -export default ShareButton diff --git a/components/ShareButtons.js b/components/ShareButtons.js new file mode 100644 index 00000000..cc686d55 --- /dev/null +++ b/components/ShareButtons.js @@ -0,0 +1,370 @@ +import BLOG from '@/blog.config' +import { useGlobal } from '@/lib/global' +import copy from 'copy-to-clipboard' +import QRCode from 'qrcode.react' +import { useState } from 'react' + +import { + FacebookShareButton, + FacebookIcon, + FacebookMessengerShareButton, + FacebookMessengerIcon, + RedditShareButton, + RedditIcon, + LineShareButton, + LineIcon, + EmailShareButton, + EmailIcon, + TwitterShareButton, + TwitterIcon, + TelegramShareButton, + TelegramIcon, + WhatsappShareButton, + WhatsappIcon, + LinkedinShareButton, + LinkedinIcon, + PinterestShareButton, + PinterestIcon, + VKIcon, + VKShareButton, + OKShareButton, + OKIcon, + TumblrShareButton, + TumblrIcon, + LivejournalIcon, + LivejournalShareButton, + MailruShareButton, + MailruIcon, + ViberIcon, + ViberShareButton, + WorkplaceShareButton, + WorkplaceIcon, + WeiboShareButton, + WeiboIcon, + PocketShareButton, + PocketIcon, + InstapaperShareButton, + InstapaperIcon, + HatenaShareButton, + HatenaIcon +} from 'react-share' + +/** + * @author https://github.com/txs + * @param {*} param0 + * @returns + */ +const ShareButtons = ({ shareUrl, title, body, image }) => { + const services = BLOG.POSTS_SHARE_SERVICES.split(',') + const titleWithSiteInfo = title + ' | ' + BLOG.TITLE + const { locale } = useGlobal() + const [qrCodeShow, setQrCodeShow] = useState(false) + + const copyUrl = () => { + copy(shareUrl) + alert(locale.COMMON.URL_COPIED) + } + + const openPopover = () => { + setQrCodeShow(true) + } + const closePopover = () => { + setQrCodeShow(false) + } + + return ( + <> + {services.map(singleService => { + if (singleService === 'facebook') { + return ( + + + + ) + } + if (singleService === 'messenger') { + return ( + + + + ) + } + if (singleService === 'line') { + return ( + + + + ) + } + if (singleService === 'reddit') { + return ( + + + + ) + } + if (singleService === 'email') { + return ( + + + + ) + } + if (singleService === 'twitter') { + return ( + + + + ) + } + if (singleService === 'telegram') { + return ( + + + + ) + } + if (singleService === 'whatsapp') { + return ( + + + + ) + } + if (singleService === 'linkedin') { + return ( + + + + ) + } + if (singleService === 'pinterest') { + return ( + + + + ) + } + if (singleService === 'vkshare') { + return ( + + + + ) + } + if (singleService === 'okshare') { + return ( + + + + ) + } + if (singleService === 'tumblr') { + return ( + + + + ) + } + if (singleService === 'livejournal') { + return ( + + + + ) + } + if (singleService === 'mailru') { + return ( + + + + ) + } + if (singleService === 'viber') { + return ( + + + + ) + } + if (singleService === 'workplace') { + return ( + + + + ) + } + if (singleService === 'weibo') { + return ( + + + + ) + } + if (singleService === 'pocket') { + return ( + + + + ) + } + if (singleService === 'instapaper') { + return ( + + + + ) + } + if (singleService === 'hatena') { + return ( + + + + ) + } + if (singleService === 'qq') { + return + } + if (singleService === 'wechat') { + return + } + if (singleService === 'link') { + return + } + return <> + })} + + ) +} + +export default ShareButtons diff --git a/lib/lang/zh-CN.js b/lib/lang/zh-CN.js index 1dddddb9..8379c75f 100644 --- a/lib/lang/zh-CN.js +++ b/lib/lang/zh-CN.js @@ -17,7 +17,7 @@ export default { NO_TAG: 'NoTag', CATEGORY: '分类', SHARE: '分享', - SCAN_QR_CODE: '扫一扫二维码', + SCAN_QR_CODE: '微信扫码分享', URL_COPIED: '链接已复制!', TABLE_OF_CONTENTS: '目录', RELATE_POSTS: '相关文章', From 15a59f61f87c13a5ddde20adcdc90a6a4e4242ff Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Wed, 26 Apr 2023 16:13:07 +0800 Subject: [PATCH 022/414] config --- blog.config.js | 2 +- package.json | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/blog.config.js b/blog.config.js index fa0fad99..7ea32205 100644 --- a/blog.config.js +++ b/blog.config.js @@ -97,7 +97,7 @@ const BLOG = { SUB_PATH: '', // leave this empty unless you want to deploy in a folder POST_SHARE_BAR_ENABLE: process.env.NEXT_PUBLIC_POST_SHARE_BAR || 'true', // 文章分享功能 ,将在底部显示一个分享条 - POSTS_SHARE_SERVICES: process.env.NEXT_PUBLIC_POST_SHARE_SERVICES || 'link,wechat,qq,weibo,email,facebook,twitter,telegram,messenger,line,reddit,whatsapp,linkedin', // 分享的服務,选填逗号隔开 + POSTS_SHARE_SERVICES: process.env.NEXT_PUBLIC_POST_SHARE_SERVICES || 'link,wechat,qq,weibo,email,facebook,twitter,telegram,messenger,line,reddit,whatsapp,linkedin', // 分享的服務,按顺序显示,逗号隔开 // 所有支持的分享服务:link(复制链接),wechat(微信),qq,weibo(微博),email(邮件),facebook,twitter,telegram,messenger,line,reddit,whatsapp,linkedin,vkshare,okshare,tumblr,livejournal,mailru,viber,workplace,pocket,instapaper,hatena POST_URL_PREFIX: process.env.NEXT_PUBLIC_POST_URL_PREFIX || 'article', diff --git a/package.json b/package.json index 8bd5a1df..372d36fe 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,6 @@ "dependencies": { "@giscus/react": "^2.2.6", "@next/bundle-analyzer": "^12.1.1", - "@popperjs/core": "^2.9.3", "@vercel/analytics": "^1.0.0", "animate.css": "^4.1.1", "animejs": "^3.2.1", From d44edb2d85bd92afeeb5cf9424e60d9e498d3dd1 Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Wed, 26 Apr 2023 16:14:00 +0800 Subject: [PATCH 023/414] v3.13.5 --- .env.local | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.local b/.env.local index fd53e2f4..35e50011 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.13.4 \ No newline at end of file +NEXT_PUBLIC_VERSION=3.13.5 \ No newline at end of file diff --git a/package.json b/package.json index 372d36fe..db5d13fc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "notion-next", - "version": "3.13.4", + "version": "3.13.5", "homepage": "https://github.com/tangly1024/NotionNext.git", "license": "MIT", "repository": { From 262dca325189e29f9c5fcde9f2ec0de16b2e0156 Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Wed, 26 Apr 2023 16:19:51 +0800 Subject: [PATCH 024/414] =?UTF-8?q?=E5=88=86=E4=BA=AB=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/ShareBar.js | 2 +- components/ShareButtons.js | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/components/ShareBar.js b/components/ShareBar.js index 1cf57776..39f7c3d9 100644 --- a/components/ShareBar.js +++ b/components/ShareBar.js @@ -12,7 +12,7 @@ const ShareBar = ({ post }) => { const shareUrl = BLOG.LINK + router.asPath - return
    + return
    { ) } if (singleService === 'qq') { - return } if (singleService === 'wechat') { - return } if (singleService === 'link') { - return } From abd80f4c8d537c582ebec0af19d05bf7571ca167 Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Wed, 26 Apr 2023 16:39:52 +0800 Subject: [PATCH 025/414] sharebar position --- components/ShareBar.js | 2 +- components/ShareButtons.js | 4 +++- themes/hexo/LayoutSlug.js | 5 ++--- themes/matery/LayoutSlug.js | 6 +++--- themes/medium/LayoutSlug.js | 7 +++++-- themes/next/components/ArticleDetail.js | 7 ++++--- themes/simple/LayoutSlug.js | 2 +- 7 files changed, 19 insertions(+), 14 deletions(-) diff --git a/components/ShareBar.js b/components/ShareBar.js index 39f7c3d9..347dc16e 100644 --- a/components/ShareBar.js +++ b/components/ShareBar.js @@ -12,7 +12,7 @@ const ShareBar = ({ post }) => { const shareUrl = BLOG.LINK + router.asPath - return
    + return
    { } if (singleService === 'wechat') { - return } if (singleService === 'link') { diff --git a/themes/hexo/LayoutSlug.js b/themes/hexo/LayoutSlug.js index cc9bdab5..69478a09 100644 --- a/themes/hexo/LayoutSlug.js +++ b/themes/hexo/LayoutSlug.js @@ -69,6 +69,8 @@ export const LayoutSlug = props => { data-ad-slot="3806269138" /> + {/* 分享 */} + {post.type === 'Post' && } {post.type === 'Post' && } {post.type === 'Post' && } @@ -77,9 +79,6 @@ export const LayoutSlug = props => {
    - {/* 分享 */} - - {/* 评论互动 */}
    diff --git a/themes/matery/LayoutSlug.js b/themes/matery/LayoutSlug.js index e938942b..da07db06 100644 --- a/themes/matery/LayoutSlug.js +++ b/themes/matery/LayoutSlug.js @@ -81,15 +81,15 @@ export const LayoutSlug = props => { data-ad-client="ca-pub-2708419466378217" data-ad-slot="3806269138" /> - + {/* 分享 */} + {/* 文章版权说明 */} {post.type === 'Post' && }
    - {/* 分享 */} - + {/* 评论互动 */}
    diff --git a/themes/medium/LayoutSlug.js b/themes/medium/LayoutSlug.js index b6d54077..401c4a03 100644 --- a/themes/medium/LayoutSlug.js +++ b/themes/medium/LayoutSlug.js @@ -86,15 +86,18 @@ export const LayoutSlug = props => {
    + + {/* 分享 */} + + {/* 文章分类和标签信息 */}
    {CONFIG_MEDIUM.POST_DETAIL_CATEGORY && post.category && }
    {CONFIG_MEDIUM.POST_DETAIL_TAG && post?.tagItems?.map(tag => )}
    + {post.type === 'Post' && } - {/* 分享 */} -
    diff --git a/themes/next/components/ArticleDetail.js b/themes/next/components/ArticleDetail.js index 75fc7f7d..c0c2efac 100644 --- a/themes/next/components/ArticleDetail.js +++ b/themes/next/components/ArticleDetail.js @@ -94,15 +94,16 @@ export default function ArticleDetail(props) { {showArticleInfo && <> + + {/* 分享 */} + + {/* 版权声明 */} {post.type === 'Post' && } {/* 推荐文章 */} {post.type === 'Post' && } - {/* 分享 */} - -
    {/* 分类 */} {post.category && <> diff --git a/themes/simple/LayoutSlug.js b/themes/simple/LayoutSlug.js index d0cd2a1d..96f42c3e 100644 --- a/themes/simple/LayoutSlug.js +++ b/themes/simple/LayoutSlug.js @@ -23,9 +23,9 @@ export const LayoutSlug = props => { {post && <> - {post.type === 'Post' && } {/* 分享 */} + {post.type === 'Post' && } }
    } From 477cdf99e491576e35c223f1c122b034405ff8eb Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Wed, 26 Apr 2023 16:46:36 +0800 Subject: [PATCH 026/414] fontawesome --- blog.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blog.config.js b/blog.config.js index 7ea32205..c51d97a2 100644 --- a/blog.config.js +++ b/blog.config.js @@ -66,7 +66,7 @@ const BLOG = { '"Segoe UI Symbol"', '"Apple Color Emoji"' ], - FONT_AWESOME: '/css/all.min.css', // font-awesome 字体图标地址、默认读取本地; 可选 https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/font-awesome/6.0.0/css/all.min.css + FONT_AWESOME: process.env.NEXT_PUBLIC_FONT_AWESOME_PATH || '/css/all.min.css', // font-awesome 字体图标地址、默认读取本地; 可选 https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/font-awesome/6.0.0/css/all.min.css // 自定义外部脚本,外部样式 CUSTOM_EXTERNAL_JS: [''], // e.g. ['http://xx.com/script.js','http://xx.com/script.js'] From 671c428e206e810cfa9caba71a114a89e1c4885c Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Wed, 3 May 2023 14:28:04 +0800 Subject: [PATCH 027/414] =?UTF-8?q?sharebar-=E7=A7=BB=E5=8A=A8=E7=AB=AF?= =?UTF-8?q?=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/ShareBar.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/ShareBar.js b/components/ShareBar.js index 347dc16e..b55c4dc9 100644 --- a/components/ShareBar.js +++ b/components/ShareBar.js @@ -12,7 +12,8 @@ const ShareBar = ({ post }) => { const shareUrl = BLOG.LINK + router.asPath - return
    + return
    +
    { ' ' + post.summary } /> +
    } export default ShareBar From 2db7b473ddc972e52f23ea3bb671b46504c5147a Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Wed, 3 May 2023 15:10:10 +0800 Subject: [PATCH 028/414] =?UTF-8?q?=E7=A8=B3=E5=AE=9Anextjs=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index db5d13fc..3e855451 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "memory-cache": "^0.2.0", "mermaid": "9.2.2", "mongodb": "^4.6.0", - "next": "^13.1.1", + "next": "13.3.1", "notion-client": "6.15.6", "notion-utils": "6.15.6", "nprogress": "^0.2.0", From 0319acea704d9a48e74780c3bdd269ff4da5f2b8 Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Thu, 4 May 2023 18:24:47 +0800 Subject: [PATCH 029/414] =?UTF-8?q?matery=20=E5=85=AC=E5=91=8A=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/DebugPanel.js | 2 +- lib/lang/en-US.js | 3 +- lib/lang/zh-CN.js | 3 +- themes/matery/LayoutBase.js | 19 +-- themes/matery/LayoutIndex.js | 3 +- themes/matery/LayoutSlug.js | 133 +++++++++--------- themes/matery/components/Announcement.js | 29 ++++ themes/matery/components/BlogPostListPage.js | 2 +- .../matery/components/BlogPostListScroll.js | 2 +- .../matery/components/FloatDarkModeButton.js | 5 +- themes/matery/components/Header.js | 7 +- .../matery/components/JumpToCommentButton.js | 9 +- themes/matery/components/JumpToTopButton.js | 13 +- 13 files changed, 134 insertions(+), 96 deletions(-) create mode 100644 themes/matery/components/Announcement.js diff --git a/components/DebugPanel.js b/components/DebugPanel.js index 01e3c579..55c4a465 100644 --- a/components/DebugPanel.js +++ b/components/DebugPanel.js @@ -58,7 +58,7 @@ export function DebugPanel() {
    {show diff --git a/lib/lang/en-US.js b/lib/lang/en-US.js index 10ac5bf9..58bec1e5 100644 --- a/lib/lang/en-US.js +++ b/lib/lang/en-US.js @@ -39,7 +39,8 @@ export default { DEBUG_OPEN: 'Debug', DEBUG_CLOSE: 'Close', THEME_SWITCH: 'Theme Switch', - ANNOUNCEMENT: 'Announcement' + ANNOUNCEMENT: 'Announcement', + START_READING: 'Start Reading' }, PAGINATION: { PREV: 'Prev', diff --git a/lib/lang/zh-CN.js b/lib/lang/zh-CN.js index 8379c75f..511bb3bf 100644 --- a/lib/lang/zh-CN.js +++ b/lib/lang/zh-CN.js @@ -41,7 +41,8 @@ export default { DEBUG_OPEN: '开启调试', DEBUG_CLOSE: '关闭调试', THEME_SWITCH: '切换主题', - ANNOUNCEMENT: '公告' + ANNOUNCEMENT: '公告', + START_READING: '开始阅读' }, PAGINATION: { PREV: '上一页', diff --git a/themes/matery/LayoutBase.js b/themes/matery/LayoutBase.js index fb5df18e..0fcba177 100644 --- a/themes/matery/LayoutBase.js +++ b/themes/matery/LayoutBase.js @@ -51,9 +51,15 @@ const LayoutBase = props => { {headerSlot}
    + {/* 嵌入区域 */} +
    + {props.containerSlot} +
    +
    {onLoading ? : children}
    +
    {/* 左下角悬浮 */} @@ -61,15 +67,12 @@ const LayoutBase = props => {
    -
    - -
    - {/* 右下角悬浮 */} -