From 7bb7ba136dff1ec344600240866d4b35c833a2cc Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Thu, 28 Oct 2021 16:50:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0Logo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- blog.config.js | 4 ++-- components/Drawer.js | 12 ++++-------- components/Logo.js | 7 +++++-- components/TopNav.js | 8 ++------ pages/article/[slug].js | 1 - 5 files changed, 13 insertions(+), 19 deletions(-) diff --git a/blog.config.js b/blog.config.js index 80ab9bec..88cab08a 100644 --- a/blog.config.js +++ b/blog.config.js @@ -1,9 +1,9 @@ const BLOG = { - title: '汤里博客', + title: '1024技术分享', author: 'tangly1024', 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 diff --git a/components/Drawer.js b/components/Drawer.js index 208ad2a3..40738826 100644 --- a/components/Drawer.js +++ b/components/Drawer.js @@ -6,6 +6,7 @@ import TocBar from '@/components/TocBar' import React, { useImperativeHandle, useState } from 'react' import InfoCard from '@/components/InfoCard' import TagList from '@/components/TagList' +import Logo from '@/components/Logo' /** * 抽屉面板,可以从侧面拉出 @@ -30,17 +31,12 @@ const Drawer = ({ post, currentTag, cRef, tags }) => { className={(showDrawer ? 'shadow-2xl' : '-ml-72') + ' overflow-y-auto duration-200 w-72 h-full bg-white dark:bg-gray-800 border-r dark:border-gray-600'}> {/* LOGO */}
+ className='sticky top-0 z-20 bg-white w-72 flex space-x-4 px-5 py-1 dark:border-gray-500 border-b dark:bg-gray-600 '>
+ className='z-10 py-2 duration-200 mr-2 bg-white dark:bg-gray-600 text-gray-600 text-xl cursor-pointer dark:text-gray-300'>
- - {BLOG.title} - +
diff --git a/components/Logo.js b/components/Logo.js index 8fc5902c..aec7e940 100644 --- a/components/Logo.js +++ b/components/Logo.js @@ -4,8 +4,11 @@ import React from 'react' const Logo = () => { return -
{BLOG.title}
+ {/*
{BLOG.title}
*/} + +
{BLOG.title}
+ } export default Logo diff --git a/components/TopNav.js b/components/TopNav.js index 28fcda3f..67538d5f 100644 --- a/components/TopNav.js +++ b/components/TopNav.js @@ -5,6 +5,7 @@ import DarkModeButton from '@/components/DarkModeButton' import SearchInput from '@/components/SearchInput' import Drawer from '@/components/Drawer' import DrawerRight from '@/components/DrawerRight' +import Logo from '@/components/Logo' const TopNav = ({ tags, currentTag, post }) => { const drawer = useRef() @@ -25,12 +26,7 @@ const TopNav = ({ tags, currentTag, post }) => { - - {BLOG.title} - + {/* 中间搜索框 */} diff --git a/pages/article/[slug].js b/pages/article/[slug].js index c9edda52..790c635a 100644 --- a/pages/article/[slug].js +++ b/pages/article/[slug].js @@ -1,6 +1,5 @@ import { getAllPosts, getAllTags, getPostBlocks } from '@/lib/notion' import BLOG from '@/blog.config' -import { createHash } from 'crypto' import { getPageTableOfContents } from 'notion-utils' import { useRouter } from 'next/router' import Progress from '@/components/Progress'