From 4fd338119fbf7c9e8dee93ccc39944018f4ee58d Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Fri, 24 Dec 2021 12:31:02 +0800 Subject: [PATCH 01/28] =?UTF-8?q?feature:=20=E9=A6=96=E5=B1=8F=E6=89=93?= =?UTF-8?q?=E5=BC=80=E4=BC=98=E5=8C=96=EF=BC=9B=20banner=E5=9B=BE=E5=8A=A0?= =?UTF-8?q?=E5=85=A5=E9=85=8D=E7=BD=AE=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- blog.config.js | 1 + components/Header.js | 8 ++++---- components/SideBar.js | 15 +-------------- components/SideBarDrawer.js | 19 ++++++++++++------- public/bg_image.jpg | Bin 296266 -> 267547 bytes 5 files changed, 18 insertions(+), 25 deletions(-) diff --git a/blog.config.js b/blog.config.js index d250381b..d590af63 100644 --- a/blog.config.js +++ b/blog.config.js @@ -5,6 +5,7 @@ const BLOG = { link: 'https://tangly1024.com', description: '分享编程技术与记录生活', headerStrings: ['Hi,我是一个程序员', 'Hi,我是一个打工人', 'Hi,我是一个干饭人', '欢迎来到我的博客🎉'], // 首页文字 + bannerImage: './bg_image.jpg', // 首图 lang: 'zh-CN', // ['zh-CN','en-US'] default lang => see /lib/lang.js for more. 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/Header.js b/components/Header.js index 668d20b8..f9a247be 100644 --- a/components/Header.js +++ b/components/Header.js @@ -1,6 +1,6 @@ import BLOG from '@/blog.config' import { useGlobal } from '@/lib/global' -import { faArrowDown } from '@fortawesome/free-solid-svg-icons' +import { faAngleDown } from '@fortawesome/free-solid-svg-icons' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { useCallback, useEffect, useState } from 'react' import Typed from 'typed.js' @@ -93,7 +93,7 @@ export default function Header () { style={{ height: 'calc(100vh + 1px)', backgroundImage: - 'linear-gradient(rgba(0, 0, 0, 0.5), rgba(0,0,0,0.4), rgba(0, 0, 0, 0.5) ),url("./bg_image.jpg")' + `linear-gradient(rgba(0, 0, 0, 0.8), rgba(0,0,0,0.2), rgba(0, 0, 0, 0.8) ),url("${BLOG.bannerImage}")` }} >
@@ -103,9 +103,9 @@ export default function Header () { onClick={() => { scrollTo(wrapperTop, autoScrollEnd) }} - className="cursor-pointer w-full text-center text-2xl animate-bounce absolute bottom-10 text-white" + className="cursor-pointer w-full text-center py-4 text-5xl animate-bounce absolute bottom-10 text-white" > - +
) diff --git a/components/SideBar.js b/components/SideBar.js index 55522df6..3ce2a3b2 100644 --- a/components/SideBar.js +++ b/components/SideBar.js @@ -7,7 +7,6 @@ import CategoryGroup from '@/components/CategoryGroup' import SearchInput from '@/components/SearchInput' import Link from 'next/link' import { useGlobal } from '@/lib/global' -import Toc from '@/components/Toc' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { faAngleDoubleRight, faArchive, faTags, faThList } from '@fortawesome/free-solid-svg-icons' @@ -27,10 +26,7 @@ const SideBar = ({ title, tags, currentTag, post, posts, categories, currentCate const { locale } = useGlobal() return