From 4e289dda616f1fd47135ad9178794ab46d5a3148 Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Thu, 23 Dec 2021 17:42:06 +0800 Subject: [PATCH 01/31] =?UTF-8?q?feature:=20=E8=AF=95=E4=B8=80=E4=B8=8B?= =?UTF-8?q?=E5=9B=BE=E7=89=87API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- blog.config.js | 3 ++- components/Header.js | 2 +- components/InfoCard.js | 4 ++-- components/LatestPostsGroup.js | 4 ++-- components/SideAreaLeft.js | 4 ++-- components/SideAreaRight.js | 4 ++-- pages/_document.js | 2 +- 7 files changed, 12 insertions(+), 11 deletions(-) diff --git a/blog.config.js b/blog.config.js index d250381b..b1b45541 100644 --- a/blog.config.js +++ b/blog.config.js @@ -4,7 +4,8 @@ const BLOG = { email: 'tlyong1992@hotmail.com', link: 'https://tangly1024.com', description: '分享编程技术与记录生活', - headerStrings: ['Hi,我是一个程序员', 'Hi,我是一个打工人', 'Hi,我是一个干饭人', '欢迎来到我的博客🎉'], // 首页文字 + headerStrings: ['Hi,我是一个程序员', 'Hi,我是一个打工人', 'Hi,我是一个干饭人', '唐风集里,收卷波澜'], // Index words + bannerImage: 'http://bing.creepersan.com/api/v1/img-current', // Index Banner Image 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..2f1873f8 100644 --- a/components/Header.js +++ b/components/Header.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.5), rgba(0,0,0,0.4), rgba(0, 0, 0, 0.5) ),url('${BLOG.bannerImage}')` }} >
diff --git a/components/InfoCard.js b/components/InfoCard.js index 9afc803f..27e03a23 100644 --- a/components/InfoCard.js +++ b/components/InfoCard.js @@ -5,7 +5,7 @@ import React from 'react' const InfoCard = ({ postCount }) => { return <> -
{ Router.push('/') }}> +
{ Router.push('/') }}>
{BLOG.title} { height={120} loading='lazy' src='/avatar.jpg' - className='rounded-full border-black' + className='rounded-full' />
{BLOG.title}
diff --git a/components/LatestPostsGroup.js b/components/LatestPostsGroup.js index a754553c..3b7d5b31 100644 --- a/components/LatestPostsGroup.js +++ b/components/LatestPostsGroup.js @@ -33,8 +33,8 @@ const LatestPostsGroup = ({ posts, sliceCount = 5 }) => { return ( -
+
{post.title}
diff --git a/components/SideAreaLeft.js b/components/SideAreaLeft.js index 0e402c89..9c388745 100644 --- a/components/SideAreaLeft.js +++ b/components/SideAreaLeft.js @@ -25,7 +25,7 @@ const SideAreaLeft = ({ title, tags, currentTag, post, posts, categories, curren return <>
-
+
@@ -58,7 +58,7 @@ const SideAreaLeft = ({ title, tags, currentTag, post, posts, categories, curren {showToc && (
-
+
{locale.COMMON.TABLE_OF_CONTENTS}
diff --git a/components/SideAreaRight.js b/components/SideAreaRight.js index 1bdbf3fb..d10fcaf0 100644 --- a/components/SideAreaRight.js +++ b/components/SideAreaRight.js @@ -78,7 +78,7 @@ const SideAreaRight = ({ {categories && (
-
{locale.COMMON.CATEGORY}
+
{locale.COMMON.CATEGORY}
{locale.COMMON.MORE} @@ -93,7 +93,7 @@ const SideAreaRight = ({ {posts && (
-
+
{locale.COMMON.LATEST_POSTS} NEW diff --git a/pages/_document.js b/pages/_document.js index b9d762a3..9fe7f67b 100644 --- a/pages/_document.js +++ b/pages/_document.js @@ -18,7 +18,7 @@ class MyDocument extends Document { - +
From 81ebac1df9b9b8120db8820e2ed9812a7a410b6e Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Fri, 24 Dec 2021 12:31:02 +0800 Subject: [PATCH 02/31] =?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 | 4 ++-- components/Header.js | 8 ++++---- components/SideBar.js | 15 +-------------- components/SideBarDrawer.js | 19 ++++++++++++------- public/bg_image.jpg | Bin 296266 -> 267547 bytes 5 files changed, 19 insertions(+), 27 deletions(-) diff --git a/blog.config.js b/blog.config.js index b1b45541..d590af63 100644 --- a/blog.config.js +++ b/blog.config.js @@ -4,8 +4,8 @@ const BLOG = { email: 'tlyong1992@hotmail.com', link: 'https://tangly1024.com', description: '分享编程技术与记录生活', - headerStrings: ['Hi,我是一个程序员', 'Hi,我是一个打工人', 'Hi,我是一个干饭人', '唐风集里,收卷波澜'], // Index words - bannerImage: 'http://bing.creepersan.com/api/v1/img-current', // Index Banner Image + 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 2f1873f8..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('${BLOG.bannerImage}')` + `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