From 634ea6c3894b11e1c6eeba82a0d4c072fd84e69e Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Fri, 29 Oct 2021 17:50:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E5=BE=AE=E8=B0=83=E3=80=81?= =?UTF-8?q?=E5=8A=A0=E5=85=A5=E8=83=8C=E6=99=AF=E8=89=B2=EF=BC=8C=E5=8A=A0?= =?UTF-8?q?=E5=85=A5Tidio=E5=9C=A8=E7=BA=BF=E8=81=8A=E5=A4=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 3 ++- blog.config.js | 9 +++++---- components/Drawer.js | 2 +- components/DrawerRight.js | 2 +- components/JumpToTop.js | 5 ++--- components/Logo.js | 6 ++++-- components/ThirdPartyScript.js | 8 ++++++++ layouts/BaseLayout.js | 6 ++++-- package.json | 1 + pages/article/[slug].js | 3 +-- 10 files changed, 29 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index b5797614..f771ea4e 100644 --- a/README.md +++ b/README.md @@ -63,13 +63,14 @@ - Notion token 的有效期只有 180 天,请确保在 Vercel Dashboard 上手动更新,我们可能会在未来切换到官方 API 来解决这个问题。此外,如果数据库是非公开到,Notion 中的图片可能无法正常显示到网页上。 - **稍微等等就可以访问了!** 简单吗? -## 技术细节 +## 引用技术 - **生成**: Next.js SSG 和 Incremental Static Regeneration - **页面渲染**: [React-notion-x](https://github.com/NotionX/react-notion-x) - **样式**: Tailwind CSS 和 `@tailwindcss/jit` compiler - **评论**: Gitalk,Cusdis,Utterances - **图标**:[fontawesome](https://fontawesome.com/v4.7/icons/?d=gallery) +- **背景**: 动态几何线条[react-canvas-nest](https://github.com/flyerH/react-canvas-nest) ## 页面样式主题 - 仿照 [fukasawa](https://andersnoren.se/themes/fukasawa) diff --git a/blog.config.js b/blog.config.js index 88cab08a..382fdeb3 100644 --- a/blog.config.js +++ b/blog.config.js @@ -1,9 +1,9 @@ const BLOG = { - title: '1024技术分享', - author: 'tangly1024', + title: '唐里1024', + author: '唐哼哼', email: 'tlyong1992@hotmail.com', link: 'https://tangly1024.com', - description: '分享有趣的技术', + description: '分享有趣的技术与思考', lang: 'zh-CN', // ['zh-CN','en-US'] notionPageId: process.env.NOTION_PAGE_ID || 'bee1fccfa3bd47a1a7be83cc71372d83', // Important page_id!!! notionAccessToken: process.env.NOTION_ACCESS_TOKEN || '', // Useful if you prefer not to make your database public @@ -59,7 +59,8 @@ const BLOG = { }, isProd: process.env.VERCEL_ENV === 'production', // distinguish between development and production environment (ref: https://vercel.com/docs/environment-variables#system-environment-variables) googleAdsenseId: 'ca-pub-2708419466378217', - DaoVoiceId: '' // 在线聊天 DaoVoice http://dashboard.daovoice.io/get-started + DaoVoiceId: '', // 在线聊天 DaoVoice http://dashboard.daovoice.io/get-started + TidioId: '8lgekxyr9hr9m7archbs0a4a2gu9ckbg' // 在线聊天 https://www.tidio.com/ } // export default BLOG module.exports = BLOG diff --git a/components/Drawer.js b/components/Drawer.js index 40738826..155a02f7 100644 --- a/components/Drawer.js +++ b/components/Drawer.js @@ -63,7 +63,7 @@ const Drawer = ({ post, currentTag, cRef, tags }) => { {/* 背景蒙版 */} -
} diff --git a/components/DrawerRight.js b/components/DrawerRight.js index 07592e44..4dd2711d 100644 --- a/components/DrawerRight.js +++ b/components/DrawerRight.js @@ -44,7 +44,7 @@ const DrawerRight = ({ post, cRef }) => {
{/* 背景蒙版 */} -
} diff --git a/components/JumpToTop.js b/components/JumpToTop.js index 18514766..9f369241 100644 --- a/components/JumpToTop.js +++ b/components/JumpToTop.js @@ -20,7 +20,6 @@ const JumpToTop = ({ targetRef, showPercent = true }) => { const scrollY = window.pageYOffset const fullHeight = clientHeight - window.outerHeight const shouldShow = scrollY > 100 - console.log(clientHeight, scrollY, fullHeight, shouldShow) if (shouldShow !== show) { switchShow(shouldShow) } @@ -38,8 +37,8 @@ const JumpToTop = ({ targetRef, showPercent = true }) => {
window.scrollTo({ top: 0, behavior: 'smooth' })} - style={{ backgroundColor: 'rgb(56, 144, 255)' }} - className={(show ? 'animate__fadeInUp' : 'animate__fadeOutUp') + ' p-1 cursor-pointer rounded-full animate__animated animate__faster shadow-xl'}> + style={{ 'box-shadow': 'rgba(41, 50, 60, 0.5) 0px 2px 16px' }} + className={(show ? 'animate__fadeInUp' : 'animate__fadeOutUp') + ' bg-gray-800 p-2 cursor-pointer rounded-full animate__animated animate__faster shadow-2xl'}>
{showPercent && (
{percent}%
)} diff --git a/components/Logo.js b/components/Logo.js index ff74193d..929cdc91 100644 --- a/components/Logo.js +++ b/components/Logo.js @@ -4,8 +4,10 @@ import React from 'react' const Logo = () => { return -
{BLOG.title}
- +
+ Tangly + 1024 +
{/*
{BLOG.title}
*/} diff --git a/components/ThirdPartyScript.js b/components/ThirdPartyScript.js index 912d1f12..34d369a6 100644 --- a/components/ThirdPartyScript.js +++ b/components/ThirdPartyScript.js @@ -25,6 +25,14 @@ const ThirdPartyScript = () => { }} /> )} + + {BLOG.TidioId && (<> + {/* Tidio在线反馈 */} +