diff --git a/README.md b/README.md index 8622c2c2..249466b3 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ - **页面渲染**: [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) +- **图标**:[fontawesome](https://fontawesome.com/v5.15/icons?d=gallery) ## 页面样式主题 - 仿照 [fukasawa](https://andersnoren.se/themes/fukasawa) 分支-https://github.com/tangly1024/NotionNext/tree/theme-Fukasawa diff --git a/components/BlogPostCard.js b/components/BlogPostCard.js index 2ddc2bb7..06802429 100644 --- a/components/BlogPostCard.js +++ b/components/BlogPostCard.js @@ -2,32 +2,30 @@ import BLOG from '@/blog.config' import TagItemMini from '@/components/TagItemMini' import Link from 'next/link' import React from 'react' +import Image from 'next/image' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { faFolderOpen } from '@fortawesome/free-solid-svg-icons' const BlogPostCard = ({ post, tags }) => { return ( -
- - {post.page_cover && post.page_cover.length > 1 && ( - - {post.title} - - )} - -
+
+
+ 1) ? post.page_cover : BLOG.defaultImgCover} alt={post.title} layout='fill' objectFit='cover' loading='lazy' /> +
+
- + - {post.category} + {post.category} | {post.date.start_date}
- +
{post.title}
@@ -39,7 +37,7 @@ const BlogPostCard = ({ post, tags }) => {
{post.tagItems.map(tag => ())}
-
+
) } diff --git a/components/CategoryGroup.js b/components/CategoryGroup.js index 8ce7f074..48e79dce 100644 --- a/components/CategoryGroup.js +++ b/components/CategoryGroup.js @@ -1,13 +1,16 @@ +import { faFolder, faFolderOpen } from '@fortawesome/free-solid-svg-icons' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import Link from 'next/link' import React from 'react' const CategoryGroup = ({ currentCategory, categories }) => { return
-
+
{Object.keys(categories).map(category => { const selected = currentCategory === category - return -
{category}({categories[category]})
+ return +
+ {category}({categories[category]})
})}
diff --git a/components/CategoryList.js b/components/CategoryList.js index 045487d8..3e242698 100644 --- a/components/CategoryList.js +++ b/components/CategoryList.js @@ -1,25 +1,27 @@ import Link from 'next/link' import React from 'react' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { faFolder, faFolderOpen, faThList } from '@fortawesome/free-solid-svg-icons' const CategoryList = ({ currentCategory, categories }) => { if (!categories) { return <> } return
    -
  • 分类:
  • +
  • 分类:
  • {Object.keys(categories).map(category => { const selected = category === currentCategory return ( - +
  • - + {`${category} `}
  • diff --git a/components/ContactButton.js b/components/ContactButton.js index f02b05be..705cb19d 100644 --- a/components/ContactButton.js +++ b/components/ContactButton.js @@ -1,5 +1,7 @@ import React from 'react' import Link from 'next/link' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { faInfo } from '@fortawesome/free-solid-svg-icons' /** * 悬浮在屏幕右下角,联系我的按钮 @@ -12,7 +14,7 @@ const ContactButton = () => { - + diff --git a/components/DarkModeButton.js b/components/DarkModeButton.js index d1aca4fd..a5031881 100644 --- a/components/DarkModeButton.js +++ b/components/DarkModeButton.js @@ -1,4 +1,6 @@ import { loadUserThemeFromCookies, saveTheme, useGlobal } from '@/lib/global' +import { faMoon, faSun } from '@fortawesome/free-solid-svg-icons' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' const DarkModeButton = () => { const { changeTheme } = useGlobal() @@ -10,7 +12,7 @@ const DarkModeButton = () => { changeTheme(newTheme) } return
    -
    } diff --git a/components/Footer.js b/components/Footer.js index 25b7f1d4..08b6dfa2 100644 --- a/components/Footer.js +++ b/components/Footer.js @@ -1,4 +1,7 @@ +import { faCopyright, faEye, faShieldAlt, faUser } from '@fortawesome/free-solid-svg-icons' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import React from 'react' +import Link from 'next/link' const Footer = ({ fullWidth = true }) => { const d = new Date() @@ -7,23 +10,16 @@ const Footer = ({ fullWidth = true }) => { ) } diff --git a/components/JumpToTopButton.js b/components/JumpToTopButton.js index 69349846..6a124e3d 100644 --- a/components/JumpToTopButton.js +++ b/components/JumpToTopButton.js @@ -1,5 +1,7 @@ import React, { useEffect, useState } from 'react' import { useGlobal } from '@/lib/global' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { faArrowUp } from '@fortawesome/free-solid-svg-icons' /** * 跳转到网页顶部 @@ -40,7 +42,9 @@ const JumpToTopButton = ({ targetRef, showPercent = true }) => { style={{ boxShadow: 'rgba(41, 50, 60, 0.5) 0px 2px 16px', borderRadius: '28px' }} className={(show ? 'animate__fadeInUp' : 'animate__fadeOutUp') + ' bg-white dark:bg-gray-700 px-1 py-1 cursor-pointer animate__animated animate__faster shadow-2xl'}>
    -
    +
    + +
    {showPercent && (
    {percent}
    )}
diff --git a/components/LeftFloatButton.js b/components/LeftFloatButton.js index c6367832..5d339da0 100644 --- a/components/LeftFloatButton.js +++ b/components/LeftFloatButton.js @@ -1,6 +1,8 @@ import React, { useEffect, useState } from 'react' import throttle from 'lodash.throttle' import DarkModeButton from '@/components/DarkModeButton' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { faBars } from '@fortawesome/free-solid-svg-icons' /** * 左上角悬浮菜单栏 @@ -30,7 +32,7 @@ const LeftFloatButton = () => { {/* 菜单折叠 */}
- changeCollapse(!collapse)} />
{/* 夜间模式 */} diff --git a/components/Logo.js b/components/Logo.js index 43e8e130..0b98e685 100644 --- a/components/Logo.js +++ b/components/Logo.js @@ -3,13 +3,11 @@ import BLOG from '@/blog.config' import React from 'react' const Logo = () => { - return + return
Tangly 1024
- {/*
{BLOG.title}
*/} - } export default Logo diff --git a/components/MenuButtonGroup.js b/components/MenuButtonGroup.js index 7f825083..a22ee1e8 100644 --- a/components/MenuButtonGroup.js +++ b/components/MenuButtonGroup.js @@ -2,21 +2,23 @@ import React from 'react' import Link from 'next/link' import { useRouter } from 'next/router' import { useGlobal } from '@/lib/global' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { faHome, faInfoCircle } from '@fortawesome/free-solid-svg-icons' const MenuButtonGroup = ({ allowCollapse = false }) => { const { locale } = useGlobal() const router = useRouter() const links = [ - { id: 0, icon: 'fa-home', name: locale.NAV.INDEX, to: '/' || '/', show: true }, - { id: 1, icon: 'fa-info-circle', name: locale.NAV.ABOUT, to: '/article/about', show: true } - // { id: 7, icon: 'fa-github', name: 'Github', to: 'https://github.com/tangly1024', show: true }, - // { id: 5, icon: 'fa-weibo', name: '微博', to: 'https://weibo.com/tangly1024', show: true }, - // { id: 4, icon: 'fa-envelope', name: locale.NAV.MAIL, to: 'mailto:tlyong1992@hotmail.com', show: true } - // { id: 2, icon: 'fa-rss-square', name: locale.NAV.RSS, to: '/feed', show: true }, - // { id: 3, icon: 'fa-compass', name: '发现', to: 'https://search.tangly1024.com/', show: true } - // { id: 6, icon: 'fa-map-marker', name: 'Fuzhou', to: '#', show: true }, - // { id: 8, icon: 'fa-twitter', name: 'Twitter', to: 'https://twitter.com/troy1024_1', show: true }, - // { id: 9, icon: 'fa-telegram', name: 'Telegram', to: 'https://t.me/tangly_1024', show: true } + { id: 0, icon: faHome, name: locale.NAV.INDEX, to: '/' || '/', show: true }, + { id: 1, icon: faInfoCircle, name: locale.NAV.ABOUT, to: '/article/about', show: true } + // { id: 7, icon: 'faGithub', name: 'Github', to: 'https://github.com/tangly1024', show: true }, + // { id: 5, icon: 'faWeibo', name: '微博', to: 'https://weibo.com/tangly1024', show: true }, + // { id: 4, icon: 'faEnvelope', name: locale.NAV.MAIL, to: 'mailto:tlyong1992@hotmail.com', show: true } + // { id: 2, icon: 'faRssSquare', name: locale.NAV.RSS, to: '/feed', show: true }, + // { id: 3, icon: 'faCompass', name: '发现', to: 'https://search.tangly1024.com/', show: true } + // { id: 6, icon: 'faMapMarker', name: 'Fuzhou', to: '#', show: true }, + // { id: 8, icon: 'faTwitter', name: 'Twitter', to: 'https://twitter.com/troy1024_1', show: true }, + // { id: 9, icon: 'faTelegram', name: 'Telegram', to: 'https://t.me/tangly_1024', show: true } ] return