From ba951cd2aa9e8aa32f53fe2e33e1a7c1ac168c79 Mon Sep 17 00:00:00 2001 From: anime Date: Thu, 24 Jul 2025 15:06:39 +0800 Subject: [PATCH] feat: change all Link component to SmartLink Close #3512 --- components/AlgoliaSearchModal.js | 6 ++--- components/CustomContextMenu.js | 10 +++---- components/ui/dashboard/DashboardButton.js | 4 +-- components/ui/dashboard/DashboardHeader.js | 6 ++--- .../ui/dashboard/DashboardItemAffliate.js | 6 ++--- components/ui/dashboard/DashboardMenuList.js | 6 ++--- themes/commerce/components/ArticleAdjacent.js | 10 +++---- .../commerce/components/ArticleCopyright.js | 6 ++--- .../commerce/components/ArticleRecommend.js | 6 ++--- themes/commerce/components/BlogPostArchive.js | 6 ++--- .../commerce/components/BlogPostCardInfo.js | 14 +++++----- themes/commerce/components/CategoryGroup.js | 6 ++--- themes/commerce/components/Footer.js | 10 +++---- .../commerce/components/HexoRecentComments.js | 4 +-- .../commerce/components/LatestPostsGroup.js | 6 ++--- themes/commerce/components/LogoBar.js | 6 ++--- themes/commerce/components/MenuGroupCard.js | 6 ++--- .../commerce/components/MenuItemCollapse.js | 10 +++---- themes/commerce/components/MenuItemDrop.js | 10 +++---- themes/commerce/components/NavButtonGroup.js | 6 ++--- .../commerce/components/PaginationNumber.js | 14 +++++----- themes/commerce/components/PostHeader.js | 6 ++--- themes/commerce/components/ProductCard.js | 6 ++--- .../commerce/components/ProductCategories.js | 6 ++--- themes/commerce/components/SearchNav.js | 6 ++--- themes/commerce/components/SlotBar.js | 6 ++--- themes/commerce/components/TagItemMini.js | 6 ++--- themes/commerce/index.js | 6 ++--- themes/example/components/BlogItem.js | 14 +++++----- themes/example/components/BlogListArchive.js | 6 ++--- themes/example/components/BlogListPage.js | 10 +++---- themes/example/components/Header.js | 6 ++--- themes/example/components/MenuItemDrop.js | 10 +++---- themes/example/components/PostMeta.js | 10 +++---- .../components/RecentCommentListForExample.js | 6 ++--- themes/example/components/SideBar.js | 10 +++---- themes/example/index.js | 10 +++---- themes/fukasawa/components/ArticleAround.js | 10 +++---- themes/fukasawa/components/ArticleDetail.js | 10 +++---- themes/fukasawa/components/BlogCard.js | 14 +++++----- themes/fukasawa/components/BlogPostArchive.js | 6 ++--- themes/fukasawa/components/GroupCategory.js | 6 ++--- themes/fukasawa/components/Logo.js | 6 ++--- .../fukasawa/components/MenuItemCollapse.js | 10 +++---- themes/fukasawa/components/MenuItemDrop.js | 10 +++---- themes/fukasawa/components/MenuItemNormal.js | 6 ++--- .../fukasawa/components/PaginationSimple.js | 10 +++---- themes/fukasawa/components/TagItem.js | 6 ++--- themes/fukasawa/components/TagItemMini.js | 6 ++--- themes/fukasawa/index.js | 6 ++--- themes/game/components/BlogArchiveItem.js | 6 ++--- themes/game/components/BlogPost.js | 6 ++--- .../game/components/ExampleRecentComments.js | 4 +-- themes/game/components/GameEmbed.js | 6 ++--- .../game/components/GameListIndexCombine.js | 6 ++--- themes/game/components/GameListNormal.js | 6 ++--- themes/game/components/GameListRealate.js | 6 ++--- themes/game/components/GroupCategory.js | 10 +++---- themes/game/components/GroupTag.js | 6 ++--- themes/game/components/Logo.js | 6 ++--- themes/game/components/LogoMini.js | 6 ++--- themes/game/components/MenuItemCollapse.js | 10 +++---- themes/game/components/MenuItemDrop.js | 10 +++---- themes/game/components/PaginationSimple.js | 10 +++---- themes/game/components/PostInfo.js | 6 ++--- themes/game/components/SideBar.js | 10 +++---- themes/game/components/TagItem.js | 6 ++--- themes/game/components/TagItemMini.js | 6 ++--- themes/game/components/Tags.js | 6 ++--- themes/game/index.js | 10 +++---- themes/gitbook/components/ArticleAround.js | 10 +++---- themes/gitbook/components/BlogArchiveItem.js | 6 ++--- themes/gitbook/components/BlogPostCard.js | 6 ++--- themes/gitbook/components/CategoryItem.js | 6 ++--- themes/gitbook/components/LeftMenuBar.js | 6 ++--- themes/gitbook/components/LogoBar.js | 6 ++--- themes/gitbook/components/MenuItemCollapse.js | 10 +++---- themes/gitbook/components/MenuItemDrop.js | 10 +++---- .../components/MenuItemMobileNormal.js | 6 ++--- themes/gitbook/components/MenuItemPCNormal.js | 6 ++--- themes/gitbook/components/PaginationSimple.js | 10 +++---- themes/gitbook/components/TagItemMini.js | 6 ++--- themes/gitbook/index.js | 6 ++--- themes/heo/components/BlogPostArchive.js | 14 +++++----- themes/heo/components/BlogPostCard.js | 14 +++++----- themes/heo/components/CategoryBar.js | 8 +++--- themes/heo/components/CategoryGroup.js | 6 ++--- themes/heo/components/Hero.js | 18 ++++++------- themes/heo/components/HexoRecentComments.js | 6 ++--- themes/heo/components/InfoCard.js | 14 +++++----- themes/heo/components/LatestPostsGroup.js | 6 ++--- themes/heo/components/LatestPostsGroupMini.js | 6 ++--- themes/heo/components/Logo.js | 6 ++--- themes/heo/components/MenuGroupCard.js | 6 ++--- themes/heo/components/MenuItemCollapse.js | 10 +++---- themes/heo/components/MenuItemDrop.js | 10 +++---- themes/heo/components/NavButtonGroup.js | 6 ++--- themes/heo/components/PaginationNumber.js | 22 ++++++++-------- themes/heo/components/PostAdjacent.js | 14 +++++----- themes/heo/components/PostCopyright.js | 6 ++--- themes/heo/components/PostHeader.js | 14 +++++----- themes/heo/components/PostRecommend.js | 6 ++--- themes/heo/components/SearchNav.js | 6 ++--- themes/heo/components/SlideOver.js | 6 ++--- themes/heo/components/TagGroups.js | 6 ++--- themes/heo/components/TagItemMini.js | 6 ++--- themes/heo/components/TouchMeCard.js | 6 ++--- themes/heo/index.js | 14 +++++----- themes/hexo/components/ArticleAdjacent.js | 10 +++---- themes/hexo/components/ArticleCopyright.js | 6 ++--- themes/hexo/components/ArticleRecommend.js | 6 ++--- themes/hexo/components/BlogPostArchive.js | 6 ++--- themes/hexo/components/BlogPostCard.js | 6 ++--- themes/hexo/components/BlogPostCardInfo.js | 14 +++++----- themes/hexo/components/CategoryGroup.js | 6 ++--- themes/hexo/components/Header.js | 10 +++---- themes/hexo/components/HexoRecentComments.js | 4 +-- themes/hexo/components/LatestPostsGroup.js | 6 ++--- themes/hexo/components/Logo.js | 6 ++--- themes/hexo/components/MenuGroupCard.js | 6 ++--- themes/hexo/components/MenuItemCollapse.js | 10 +++---- themes/hexo/components/MenuItemDrop.js | 10 +++---- themes/hexo/components/NavButtonGroup.js | 6 ++--- themes/hexo/components/PaginationNumber.js | 14 +++++----- themes/hexo/components/PostHero.js | 10 +++---- themes/hexo/components/SearchNav.js | 6 ++--- themes/hexo/components/SlotBar.js | 6 ++--- themes/hexo/components/TagItemMini.js | 6 ++--- themes/hexo/index.js | 6 ++--- themes/landing/components/Footer.js | 4 +-- themes/landing/components/Header.js | 10 +++---- themes/landing/components/Logo.js | 6 ++--- themes/landing/components/MobileMenu.js | 10 +++---- themes/landing/components/Pricing.js | 14 +++++----- themes/magzine/components/BannerItem.js | 4 +-- themes/magzine/components/CategoryGroup.js | 6 ++--- themes/magzine/components/CategoryItem.js | 6 ++--- themes/magzine/components/Footer.js | 6 ++--- themes/magzine/components/LeftMenuBar.js | 6 ++--- themes/magzine/components/LogoBar.js | 6 ++--- themes/magzine/components/MenuItemCollapse.js | 10 +++---- themes/magzine/components/MenuItemDrop.js | 10 +++---- .../components/MenuItemMobileNormal.js | 6 ++--- themes/magzine/components/MenuItemPCNormal.js | 6 ++--- themes/magzine/components/PaginationSimple.js | 10 +++---- themes/magzine/components/PostGroupLatest.js | 6 ++--- themes/magzine/components/PostItemCard.js | 10 +++---- .../magzine/components/PostItemCardSimple.js | 6 ++--- themes/magzine/components/PostItemCardTop.js | 14 +++++----- themes/magzine/components/PostItemCardWide.js | 10 +++---- .../magzine/components/PostListHorizontal.js | 10 +++---- .../components/PostListSimpleHorizontal.js | 10 +++---- themes/magzine/components/PostNavAround.js | 14 +++++----- themes/magzine/components/TagItemMini.js | 6 ++--- themes/magzine/components/TouchMeCard.js | 6 ++--- themes/magzine/index.js | 6 ++--- themes/matery/components/ArticleCopyright.js | 6 ++--- themes/matery/components/ArticleInfo.js | 6 ++--- themes/matery/components/ArticleRecommend.js | 6 ++--- themes/matery/components/BlogListBar.js | 6 ++--- themes/matery/components/BlogPostArchive.js | 6 ++--- themes/matery/components/BlogPostCard.js | 14 +++++----- themes/matery/components/CategoryGroup.js | 6 ++--- themes/matery/components/Header.js | 10 +++---- .../matery/components/HexoRecentComments.js | 4 +-- themes/matery/components/Logo.js | 6 ++--- themes/matery/components/MenuGroupCard.js | 6 ++--- themes/matery/components/MenuItemCollapse.js | 10 +++---- themes/matery/components/MenuItemDrop.js | 10 +++---- themes/matery/components/MenuItemNormal.js | 6 ++--- themes/matery/components/MenuList.js | 6 ++--- themes/matery/components/NavButtonGroup.js | 6 ++--- themes/matery/components/PaginationNumber.js | 14 +++++----- themes/matery/components/PaginationSimple.js | 10 +++---- themes/matery/components/SearchNav.js | 6 ++--- themes/matery/components/TagItemMiddle.js | 6 ++--- themes/matery/components/TagItemMini.js | 6 ++--- themes/matery/index.js | 6 ++--- themes/medium/components/ArticleAround.js | 10 +++---- themes/medium/components/ArticleInfo.js | 6 ++--- themes/medium/components/BlogArchiveItem.js | 6 ++--- themes/medium/components/BlogPostCard.js | 10 +++---- themes/medium/components/BottomMenuBar.js | 10 +++---- themes/medium/components/CategoryItem.js | 6 ++--- themes/medium/components/LeftMenuBar.js | 6 ++--- themes/medium/components/LogoBar.js | 6 ++--- themes/medium/components/MenuItemCollapse.js | 10 +++---- themes/medium/components/MenuItemDrop.js | 10 +++---- .../medium/components/MenuItemMobileNormal.js | 6 ++--- themes/medium/components/MenuItemPCNormal.js | 6 ++--- themes/medium/components/PaginationSimple.js | 10 +++---- themes/medium/components/TagItemMini.js | 6 ++--- themes/medium/index.js | 6 ++--- themes/movie/components/ArchiveDateList.js | 6 ++--- themes/movie/components/ArticleInfo.js | 14 +++++----- .../movie/components/BlogListGroupByDate.js | 6 ++--- themes/movie/components/BlogPostCard.js | 6 ++--- themes/movie/components/BlogRecommend.js | 6 ++--- themes/movie/components/CategoryGroup.js | 6 ++--- themes/movie/components/CategoryItem.js | 6 ++--- .../movie/components/ExampleRecentComments.js | 4 +-- themes/movie/components/Header.js | 6 ++--- themes/movie/components/LatestPostsGroup.js | 6 ++--- themes/movie/components/MenuItemCollapse.js | 10 +++---- themes/movie/components/MenuItemDrop.js | 10 +++---- themes/movie/components/NormalMenuItem.js | 6 ++--- themes/movie/components/PaginationNumber.js | 22 ++++++++-------- themes/movie/components/SideBar.js | 10 +++---- themes/movie/components/TagGroups.js | 6 ++--- themes/movie/components/TagItem.js | 6 ++--- themes/movie/components/TagItemMini.js | 6 ++--- themes/nav/components/ArticleAround.js | 10 +++---- themes/nav/components/BlogArchiveItem.js | 6 ++--- themes/nav/components/BlogPostCard.js | 6 ++--- themes/nav/components/CategoryItem.js | 6 ++--- themes/nav/components/LeftMenuBar.js | 6 ++--- themes/nav/components/LogoBar.js | 6 ++--- themes/nav/components/MenuItem.js | 10 +++---- themes/nav/components/MenuItemCollapse.js | 10 +++---- themes/nav/components/MenuItemDrop.js | 10 +++---- themes/nav/components/MenuItemMobileNormal.js | 6 ++--- themes/nav/components/MenuItemPCNormal.js | 6 ++--- themes/nav/components/NavPostList.js | 6 ++--- themes/nav/components/PaginationSimple.js | 10 +++---- themes/nav/components/TagItemMini.js | 6 ++--- themes/nav/index.js | 6 ++--- themes/next/components/ArticleCopyright.js | 6 ++--- themes/next/components/ArticleDetail.js | 10 +++---- themes/next/components/BlogAround.js | 10 +++---- themes/next/components/BlogPostArchive.js | 6 ++--- themes/next/components/BlogPostCard.js | 22 ++++++++-------- themes/next/components/CategoryGroup.js | 6 ++--- themes/next/components/CategoryList.js | 6 ++--- themes/next/components/ContactButton.js | 6 ++--- themes/next/components/LatestPostsGroup.js | 6 ++--- themes/next/components/Live2DWaifu.js | 2 +- themes/next/components/Logo.js | 6 ++--- themes/next/components/MenuItemCollapse.js | 10 +++---- themes/next/components/MenuItemDrop.js | 10 +++---- themes/next/components/NextRecentComments.js | 4 +-- themes/next/components/PaginationNumber.js | 14 +++++----- themes/next/components/PaginationSimple.js | 10 +++---- themes/next/components/RecommendPosts.js | 6 ++--- themes/next/components/SideAreaRight.js | 10 +++---- themes/next/components/SideBar.js | 10 +++---- themes/next/components/TagItem.js | 6 ++--- themes/next/components/TagItemMini.js | 6 ++--- themes/next/components/TopNav.js | 10 +++---- themes/next/index.js | 6 ++--- themes/nobelium/components/BlogArchiveItem.js | 6 ++--- themes/nobelium/components/BlogListPage.js | 10 +++---- themes/nobelium/components/BlogListScroll.js | 6 ++--- themes/nobelium/components/BlogPost.js | 6 ++--- .../components/ExampleRecentComments.js | 4 +-- .../nobelium/components/MenuItemCollapse.js | 10 +++---- themes/nobelium/components/MenuItemDrop.js | 10 +++---- themes/nobelium/components/Nav.js | 6 ++--- themes/nobelium/components/SideBar.js | 10 +++---- themes/nobelium/components/TagItem.js | 6 ++--- themes/nobelium/components/Tags.js | 6 ++--- themes/nobelium/index.js | 10 +++---- themes/photo/components/ArchiveDateList.js | 6 ++--- themes/photo/components/ArticleFooter.js | 14 +++++----- .../photo/components/BlogListGroupByDate.js | 6 ++--- themes/photo/components/BlogPostCard.js | 6 ++--- themes/photo/components/BlogRecommend.js | 6 ++--- themes/photo/components/CategoryGroup.js | 6 ++--- themes/photo/components/CategoryItem.js | 6 ++--- .../photo/components/ExampleRecentComments.js | 4 +-- themes/photo/components/Header.js | 6 ++--- themes/photo/components/LatestPostsGroup.js | 6 ++--- themes/photo/components/MenuItemCollapse.js | 10 +++---- themes/photo/components/MenuItemDrop.js | 10 +++---- themes/photo/components/NormalMenuItem.js | 6 ++--- themes/photo/components/PaginationNumber.js | 22 ++++++++-------- themes/photo/components/PostItemCard.js | 10 +++---- themes/photo/components/SideBar.js | 10 +++---- themes/photo/components/TagGroups.js | 6 ++--- themes/photo/components/TagItem.js | 6 ++--- themes/photo/components/TagItemMini.js | 6 ++--- themes/plog/components/BlogArchiveItem.js | 6 ++--- themes/plog/components/BlogListPage.js | 10 +++---- themes/plog/components/BlogListScroll.js | 6 ++--- themes/plog/components/BlogPost.js | 6 ++--- .../plog/components/ExampleRecentComments.js | 4 +-- themes/plog/components/LogoBar.js | 12 ++++----- themes/plog/components/MenuItemCollapse.js | 10 +++---- themes/plog/components/MenuItemDrop.js | 10 +++---- themes/plog/components/Modal.js | 10 +++---- themes/plog/components/Nav.js | 6 ++--- themes/plog/components/SideBar.js | 10 +++---- themes/plog/components/TagItem.js | 6 ++--- themes/plog/components/Tags.js | 6 ++--- themes/plog/index.js | 10 +++---- themes/proxio/components/Blog.js | 10 +++---- themes/proxio/components/CTA.js | 6 ++--- themes/proxio/components/Career.js | 2 +- themes/proxio/components/Features.js | 6 ++--- themes/proxio/components/Footer.js | 6 ++--- themes/proxio/components/Header.js | 2 +- themes/proxio/components/Hero.js | 6 ++--- themes/proxio/components/MenuItem.js | 10 +++---- themes/proxio/components/Pricing.js | 14 +++++----- themes/proxio/components/Team.js | 6 ++--- themes/proxio/components/Testimonials.js | 6 ++--- themes/proxio/index.js | 26 +++++++++---------- themes/simple/components/ArticleAround.js | 10 +++---- themes/simple/components/ArticleInfo.js | 8 +++--- themes/simple/components/BlogArchiveItem.js | 6 ++--- themes/simple/components/BlogItem.js | 26 +++++++++---------- themes/simple/components/BlogListPage.js | 10 +++---- .../components/ExampleRecentComments.js | 4 +-- themes/simple/components/Header.js | 6 ++--- themes/simple/components/MenuItemCollapse.js | 10 +++---- themes/simple/components/MenuItemDrop.js | 10 +++---- themes/simple/components/RecommendPosts.js | 6 ++--- themes/simple/index.js | 10 +++---- themes/starter/components/About.js | 6 ++--- themes/starter/components/Blog.js | 10 +++---- themes/starter/components/CTA.js | 6 ++--- themes/starter/components/Features.js | 18 ++++++------- themes/starter/components/Footer.js | 22 ++++++++-------- themes/starter/components/Header.js | 18 ++++++------- themes/starter/components/Hero.js | 10 +++---- themes/starter/components/MenuItem.js | 10 +++---- themes/starter/components/Pricing.js | 14 +++++----- themes/starter/index.js | 26 +++++++++---------- themes/typography/components/ArticleAround.js | 10 +++---- themes/typography/components/ArticleInfo.js | 14 +++++----- .../typography/components/BlogArchiveItem.js | 6 ++--- themes/typography/components/BlogItem.js | 22 ++++++++-------- themes/typography/components/BlogListPage.js | 10 +++---- .../components/ExampleRecentComments.js | 4 +-- .../typography/components/MenuItemCollapse.js | 10 +++---- themes/typography/components/MenuItemDrop.js | 10 +++---- themes/typography/components/NavBar.js | 6 ++--- .../typography/components/RecommendPosts.js | 6 ++--- themes/typography/index.js | 10 +++---- 338 files changed, 1381 insertions(+), 1381 deletions(-) diff --git a/components/AlgoliaSearchModal.js b/components/AlgoliaSearchModal.js index f398c461..175b5eb6 100644 --- a/components/AlgoliaSearchModal.js +++ b/components/AlgoliaSearchModal.js @@ -3,7 +3,7 @@ import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' import algoliasearch from 'algoliasearch' import throttle from 'lodash/throttle' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { Fragment, @@ -356,7 +356,7 @@ function TagGroups() {
{firstTenTags?.map((tag, index) => { return ( - )}
- + ) })} diff --git a/components/CustomContextMenu.js b/components/CustomContextMenu.js index 19b65395..7475bbed 100644 --- a/components/CustomContextMenu.js +++ b/components/CustomContextMenu.js @@ -2,7 +2,7 @@ import useWindowSize from '@/hooks/useWindowSize' import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' import { THEMES, saveDarkModeToLocalStorage } from '@/themes/theme' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { useEffect, useLayoutEffect, useRef, useState } from 'react' @@ -198,23 +198,23 @@ export default function CustomContextMenu(props) { )} {CUSTOM_RIGHT_CLICK_CONTEXT_MENU_CATEGORY && ( -
{locale.MENU.CATEGORY}
- + )} {CUSTOM_RIGHT_CLICK_CONTEXT_MENU_TAG && ( -
{locale.MENU.TAGS}
- + )} diff --git a/components/ui/dashboard/DashboardButton.js b/components/ui/dashboard/DashboardButton.js index ff866a5f..fd61b5ee 100644 --- a/components/ui/dashboard/DashboardButton.js +++ b/components/ui/dashboard/DashboardButton.js @@ -1,5 +1,5 @@ import { siteConfig } from '@/lib/config' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' /** * 跳转仪表盘的按钮 @@ -24,7 +24,7 @@ export default function DashboardButton({ className }) { ) } diff --git a/components/ui/dashboard/DashboardHeader.js b/components/ui/dashboard/DashboardHeader.js index f564374f..ae49dbd3 100644 --- a/components/ui/dashboard/DashboardHeader.js +++ b/components/ui/dashboard/DashboardHeader.js @@ -1,7 +1,7 @@ import LazyImage from '@/components/LazyImage' import { useGlobal } from '@/lib/global' import formatDate from '@/lib/utils/formatDate' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import DashboardSignOutButton from './DashboardSignOutButton' /** @@ -25,11 +25,11 @@ export default function DashboardHeader() {
{user?.fullName} - + 普通用户 - +
{user?.username} diff --git a/components/ui/dashboard/DashboardItemAffliate.js b/components/ui/dashboard/DashboardItemAffliate.js index 443e0ac7..21adcf01 100644 --- a/components/ui/dashboard/DashboardItemAffliate.js +++ b/components/ui/dashboard/DashboardItemAffliate.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 联盟行销 @@ -140,11 +140,11 @@ export default function DashboardItemAffliate() { for='remember' className='ms-2 text-sm font-medium text-gray-900 dark:text-gray-300'> 我以阅读并同意{' '} - 服务协议 - + .
diff --git a/components/ui/dashboard/DashboardMenuList.js b/components/ui/dashboard/DashboardMenuList.js index b0ffed2a..53c51066 100644 --- a/components/ui/dashboard/DashboardMenuList.js +++ b/components/ui/dashboard/DashboardMenuList.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 仪表盘菜单 @@ -43,12 +43,12 @@ export default function DashboardMenuList() { className={`rounded-lg cursor-pointer block ${ isActive ? 'bg-blue-100 text-blue-600' : 'hover:bg-gray-100' }`}> - {item.title} - + ) })} diff --git a/themes/commerce/components/ArticleAdjacent.js b/themes/commerce/components/ArticleAdjacent.js index 21ca9e32..aaadd6d9 100644 --- a/themes/commerce/components/ArticleAdjacent.js +++ b/themes/commerce/components/ArticleAdjacent.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import CONFIG from '../config' /** @@ -12,22 +12,22 @@ export default function ArticleAdjacent ({ prev, next }) { } return (
- {prev.title} - - + {next.title} - +
) } diff --git a/themes/commerce/components/ArticleCopyright.js b/themes/commerce/components/ArticleCopyright.js index b418a655..be56f052 100644 --- a/themes/commerce/components/ArticleCopyright.js +++ b/themes/commerce/components/ArticleCopyright.js @@ -1,5 +1,5 @@ import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { useEffect, useState } from 'react' import CONFIG from '../config' @@ -24,9 +24,9 @@ export default function ArticleCopyright() {
  • {locale.COMMON.AUTHOR}: - + {siteConfig('AUTHOR')} - +
  • {locale.COMMON.URL}: diff --git a/themes/commerce/components/ArticleRecommend.js b/themes/commerce/components/ArticleRecommend.js index b26aace1..ebd6bc62 100644 --- a/themes/commerce/components/ArticleRecommend.js +++ b/themes/commerce/components/ArticleRecommend.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import CONFIG from '../config' import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' @@ -35,7 +35,7 @@ export default function ArticleRecommend({ recommendPosts, siteInfo }) { : siteInfo?.pageCover return ( - (
- ) + ) ) })} diff --git a/themes/commerce/components/BlogPostArchive.js b/themes/commerce/components/BlogPostArchive.js index 8c3fbaaf..527efb44 100644 --- a/themes/commerce/components/BlogPostArchive.js +++ b/themes/commerce/components/BlogPostArchive.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { siteConfig } from '@/lib/config' /** @@ -29,14 +29,14 @@ const BlogPostArchive = ({ posts = [], archiveTitle }) => {
{post.date?.start_date}{' '}   - {post.title} - +
))} diff --git a/themes/commerce/components/BlogPostCardInfo.js b/themes/commerce/components/BlogPostCardInfo.js index 8b2f4a48..4c37ee2a 100644 --- a/themes/commerce/components/BlogPostCardInfo.js +++ b/themes/commerce/components/BlogPostCardInfo.js @@ -1,5 +1,5 @@ import NotionPage from '@/components/NotionPage' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import TagItemMini from './TagItemMini' import TwikooCommentCount from '@/components/TwikooCommentCount' import { siteConfig } from '@/lib/config' @@ -14,7 +14,7 @@ export const BlogPostCardInfo = ({ post, showPreview, showPageCover, showSummary return
{/* 标题 */} - {post.title} - + {/* 分类 */} { post?.category &&
- @@ -37,7 +37,7 @@ export const BlogPostCardInfo = ({ post, showPreview, showPageCover, showSummary {post.category} - +
} @@ -70,7 +70,7 @@ export const BlogPostCardInfo = ({ post, showPreview, showPageCover, showSummary {/* 日期标签 */}
{/* 日期 */} - @@ -78,7 +78,7 @@ export const BlogPostCardInfo = ({ post, showPreview, showPageCover, showSummary {post?.publishDay || post.lastEditedDay} - +
diff --git a/themes/commerce/components/CategoryGroup.js b/themes/commerce/components/CategoryGroup.js index 0b313088..aeccc262 100644 --- a/themes/commerce/components/CategoryGroup.js +++ b/themes/commerce/components/CategoryGroup.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' const CategoryGroup = ({ currentCategory, categories }) => { if (!categories) { @@ -9,7 +9,7 @@ const CategoryGroup = ({ currentCategory, categories }) => { {categories.map(category => { const selected = currentCategory === category.name return ( - {
{category.name}({category.count})
- + ); })}
diff --git a/themes/commerce/components/Footer.js b/themes/commerce/components/Footer.js index 3411773c..ba36e511 100644 --- a/themes/commerce/components/Footer.js +++ b/themes/commerce/components/Footer.js @@ -2,7 +2,7 @@ import { BeiAnGongAn } from '@/components/BeiAnGongAn' import BeiAnSite from '@/components/BeiAnSite' import CopyRightDate from '@/components/CopyRightDate' import { siteConfig } from '@/lib/config' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import CONFIG from '../config' /** @@ -40,13 +40,13 @@ const Footer = props => { className={'flex flex-col space-y-2 text-start'}> {categoryOptions?.map(category => { return ( - {category.name} - + ) })} @@ -62,13 +62,13 @@ const Footer = props => { className={'flex flex-col space-y-2 text-start'}> {customMenu?.map(menu => { return ( - {menu.name} - + ) })} diff --git a/themes/commerce/components/HexoRecentComments.js b/themes/commerce/components/HexoRecentComments.js index db712bea..f1e59612 100644 --- a/themes/commerce/components/HexoRecentComments.js +++ b/themes/commerce/components/HexoRecentComments.js @@ -2,7 +2,7 @@ import { useEffect, useState } from 'react' import { siteConfig } from '@/lib/config' import Card from '@/themes/hexo/components/Card' import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { RecentComments } from '@waline/client' /** @@ -36,7 +36,7 @@ const HexoRecentComments = (props) => { {!onLoading && comments && comments.length > 0 && comments.map((comment) =>
- --{comment.nick} + --{comment.nick}
)} diff --git a/themes/commerce/components/LatestPostsGroup.js b/themes/commerce/components/LatestPostsGroup.js index 3c4fadbc..5a702a16 100644 --- a/themes/commerce/components/LatestPostsGroup.js +++ b/themes/commerce/components/LatestPostsGroup.js @@ -2,7 +2,7 @@ import { siteConfig } from '@/lib/config' import LazyImage from '@/components/LazyImage' import { useGlobal } from '@/lib/global' // import Image from 'next/image' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' /** @@ -33,7 +33,7 @@ const LatestPostsGroup = ({ latestPosts, siteInfo }) => { const headerImage = post?.pageCoverThumbnail ? post.pageCoverThumbnail : siteInfo?.pageCover return ( - ( {
- ) + ) ) })} diff --git a/themes/commerce/components/LogoBar.js b/themes/commerce/components/LogoBar.js index de5a5bfe..c3943c1d 100644 --- a/themes/commerce/components/LogoBar.js +++ b/themes/commerce/components/LogoBar.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' // import { siteConfig } from '@/lib/config' import LazyImage from '@/components/LazyImage'; @@ -11,9 +11,9 @@ export default function LogoBar (props) { const { siteInfo } = props return (
- + - + {/*
{siteConfig('TITLE')}
*/}
); diff --git a/themes/commerce/components/MenuGroupCard.js b/themes/commerce/components/MenuGroupCard.js index 63f0f48e..1733abd1 100644 --- a/themes/commerce/components/MenuGroupCard.js +++ b/themes/commerce/components/MenuGroupCard.js @@ -1,5 +1,5 @@ import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import CONFIG from '../config' const MenuGroupCard = props => { @@ -45,7 +45,7 @@ const MenuGroupCard = props => { {links.map(link => { if (link.show) { return ( - {
{link.name}
{link.slot}
- + ) } else { return null diff --git a/themes/commerce/components/MenuItemCollapse.js b/themes/commerce/components/MenuItemCollapse.js index ad8f4b93..31d0af61 100644 --- a/themes/commerce/components/MenuItemCollapse.js +++ b/themes/commerce/components/MenuItemCollapse.js @@ -1,5 +1,5 @@ import Collapse from '@/components/Collapse' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useState } from 'react' /** @@ -32,7 +32,7 @@ export const MenuItemCollapse = props => { className='w-full px-8 py-3 text-left dark:bg-hexo-black-gray' onClick={toggleShow}> {!hasSubMenu && ( - @@ -40,7 +40,7 @@ export const MenuItemCollapse = props => { {link?.icon && } {link?.name} - + )} {hasSubMenu && (
{
- + {link?.icon && }{' '} {sLink.title} - +
) })} diff --git a/themes/commerce/components/MenuItemDrop.js b/themes/commerce/components/MenuItemDrop.js index d5b80449..16c98dcf 100644 --- a/themes/commerce/components/MenuItemDrop.js +++ b/themes/commerce/components/MenuItemDrop.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { useState } from 'react' @@ -22,13 +22,13 @@ export const MenuItemDrop = ({ link }) => { onMouseOut={() => changeShow(false)} className='h-full'> {!hasSubMenu && ( - {link?.icon && }
{link?.name}
{/* {hasSubMenu && } */} - + )} {hasSubMenu && ( @@ -50,12 +50,12 @@ export const MenuItemDrop = ({ link }) => {
  • - + {link?.icon &&   } {sLink.title} - +
  • ) })} diff --git a/themes/commerce/components/NavButtonGroup.js b/themes/commerce/components/NavButtonGroup.js index 8539eb49..8d671a7a 100644 --- a/themes/commerce/components/NavButtonGroup.js +++ b/themes/commerce/components/NavButtonGroup.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 首页导航大按钮组件 @@ -15,14 +15,14 @@ const NavButtonGroup = (props) => { diff --git a/themes/commerce/components/PaginationNumber.js b/themes/commerce/components/PaginationNumber.js index d041fe6c..8eff44c5 100644 --- a/themes/commerce/components/PaginationNumber.js +++ b/themes/commerce/components/PaginationNumber.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' /** @@ -18,7 +18,7 @@ const PaginationNumber = ({ page, totalPage }) => { return (
    {/* 上一页 */} - { - + {pages} {/* 下一页 */} - { - +
    ) } function getPageElement(page, currentPage, pagePrefix) { return ( - () + ) ) } diff --git a/themes/commerce/components/PostHeader.js b/themes/commerce/components/PostHeader.js index 4a258cb5..1f819fca 100644 --- a/themes/commerce/components/PostHeader.js +++ b/themes/commerce/components/PostHeader.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import NotionIcon from '@/components/NotionIcon' import LazyImage from '@/components/LazyImage' import { siteConfig } from '@/lib/config' @@ -19,11 +19,11 @@ export default function PostHeader({ post }) {
    {post.category && <> - +
    {post.category}
    - +
    }
    diff --git a/themes/commerce/components/ProductCard.js b/themes/commerce/components/ProductCard.js index 8ec25b6c..b413d397 100644 --- a/themes/commerce/components/ProductCard.js +++ b/themes/commerce/components/ProductCard.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import CONFIG from '../config' import { siteConfig } from '@/lib/config' import LazyImage from '@/components/LazyImage' @@ -19,11 +19,11 @@ const ProductCard = ({ index, post, siteInfo }) => {
    {/* 图片封面 */} - +
    - +
    {post.title}
    diff --git a/themes/commerce/components/ProductCategories.js b/themes/commerce/components/ProductCategories.js index 4a6b7422..c2334314 100644 --- a/themes/commerce/components/ProductCategories.js +++ b/themes/commerce/components/ProductCategories.js @@ -1,5 +1,5 @@ import { siteConfig } from '@/lib/config' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import CONFIG from '../config' export default function ProductCategories(props) { @@ -21,14 +21,14 @@ export default function ProductCategories(props) { className={'flex flex-col space-y-2 text-start'}> {categoryOptions?.map(category => { return ( - {category.name} - + ) })} diff --git a/themes/commerce/components/SearchNav.js b/themes/commerce/components/SearchNav.js index fc393c1b..05d06197 100644 --- a/themes/commerce/components/SearchNav.js +++ b/themes/commerce/components/SearchNav.js @@ -1,5 +1,5 @@ import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useEffect, useRef } from 'react' import Card from './Card' import SearchInput from './SearchInput' @@ -31,7 +31,7 @@ export default function SearchNav(props) {
    {categoryOptions?.map(category => { return ( - {category.name}({category.count})
    - + ) })}
    diff --git a/themes/commerce/components/SlotBar.js b/themes/commerce/components/SlotBar.js index c7c1c802..ad1ee121 100644 --- a/themes/commerce/components/SlotBar.js +++ b/themes/commerce/components/SlotBar.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 博客列表上方嵌入条 @@ -10,10 +10,10 @@ export default function SlotBar(props) { if (tag) { return
    -
    #{tag}
    - +
    } else if (category) { return
    diff --git a/themes/commerce/components/TagItemMini.js b/themes/commerce/components/TagItemMini.js index fea3b755..a3dea43b 100644 --- a/themes/commerce/components/TagItemMini.js +++ b/themes/commerce/components/TagItemMini.js @@ -1,8 +1,8 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' const TagItemMini = ({ tag, selected = false }) => { return ( - {
    {selected && } {tag.name + (tag.count ? `(${tag.count})` : '')}
    - + ); } diff --git a/themes/commerce/index.js b/themes/commerce/index.js index 9efbd684..ae77e4ac 100644 --- a/themes/commerce/index.js +++ b/themes/commerce/index.js @@ -7,7 +7,7 @@ import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' import { isBrowser, scanAndConvertToLinks } from '@/lib/utils' import { Transition } from '@headlessui/react' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { useEffect, useRef } from 'react' import { ArticleLock } from './components/ArticleLock' @@ -346,7 +346,7 @@ const LayoutCategoryIndex = props => {
    {categoryOptions?.map(category => { return ( - { {category.name}( {category.count})
    - + ) })}
    diff --git a/themes/example/components/BlogItem.js b/themes/example/components/BlogItem.js index 90a40f3a..4e6d84a8 100644 --- a/themes/example/components/BlogItem.js +++ b/themes/example/components/BlogItem.js @@ -2,7 +2,7 @@ import LazyImage from '@/components/LazyImage' import NotionIcon from '@/components/NotionIcon' import TwikooCommentCount from '@/components/TwikooCommentCount' import { siteConfig } from '@/lib/config' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import CONFIG from '../config' /** @@ -20,14 +20,14 @@ const BlogItem = ({ post }) => { className={`${showPageCover ? 'flex md:flex-row flex-col-reverse' : ''} replace mb-12 `}>

    - {siteConfig('POST_TITLE_ICON') && ( )} {post?.title} - +

    @@ -40,11 +40,11 @@ const BlogItem = ({ post }) => { {post.category && ( <> | - {post.category} - + )} {/* | */} @@ -68,12 +68,12 @@ const BlogItem = ({ post }) => { {/* 图片封面 */} {showPageCover && (
    - + - +
    )} diff --git a/themes/example/components/BlogListArchive.js b/themes/example/components/BlogListArchive.js index 256edbdf..f38434b6 100644 --- a/themes/example/components/BlogListArchive.js +++ b/themes/example/components/BlogListArchive.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 博客归档列表;仅归档页面使用 @@ -21,11 +21,11 @@ export default function BlogListArchive({ archiveTitle, archivePosts }) { className='border-l-2 p-1 text-xs md:text-base items-center hover:scale-x-105 hover:border-gray-500 dark:hover:border-gray-300 dark:border-gray-400 transform duration-500'>
    {post?.publishDay}   - {post.title} - +
    ) diff --git a/themes/example/components/BlogListPage.js b/themes/example/components/BlogListPage.js index fe56e0bf..2d374f73 100644 --- a/themes/example/components/BlogListPage.js +++ b/themes/example/components/BlogListPage.js @@ -1,6 +1,6 @@ import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import CONFIG from '../config' import BlogItem from './BlogItem' @@ -37,7 +37,7 @@ export const BlogListPage = props => {
    - { }} className={`${showPrev ? 'bg-black dark:bg-hexo-black-gray' : 'bg-gray pointer-events-none invisible'} text-white no-underline py-2 px-3 rounded`}> {locale.PAGINATION.PREV} - - + {locale.PAGINATION.NEXT} - +
    ) diff --git a/themes/example/components/Header.js b/themes/example/components/Header.js index 12111edd..486fb79a 100644 --- a/themes/example/components/Header.js +++ b/themes/example/components/Header.js @@ -1,5 +1,5 @@ import { siteConfig } from '@/lib/config' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { MenuList } from './MenuList' /** @@ -11,11 +11,11 @@ export const Header = props => { return (
    - {siteConfig('TITLE')} - +
    {/* 右侧文字 */}
    diff --git a/themes/example/components/MenuItemDrop.js b/themes/example/components/MenuItemDrop.js index 2610b585..198c2b00 100644 --- a/themes/example/components/MenuItemDrop.js +++ b/themes/example/components/MenuItemDrop.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useState } from 'react' /** @@ -17,10 +17,10 @@ export const MenuItemDrop = ({ link }) => { onMouseOut={() => changeShow(false)}> {!hasSubMenu && (
    - + {link?.icon && } {link?.name} {hasSubMenu && } - +
    )} @@ -41,12 +41,12 @@ export const MenuItemDrop = ({ link }) => {
  • - + {link?.icon &&   } {sLink.title} - +
  • ) })} diff --git a/themes/example/components/PostMeta.js b/themes/example/components/PostMeta.js index 19a6cab2..ebbb14b0 100644 --- a/themes/example/components/PostMeta.js +++ b/themes/example/components/PostMeta.js @@ -1,6 +1,6 @@ import { useGlobal } from '@/lib/global' import { formatDateFmt } from '@/lib/utils/formatDate' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 文章详情的元信息 * 标题、作者、分类、标签、创建日期等等。 @@ -14,25 +14,25 @@ export const PostMeta = props => {
    {post?.type !== 'Page' && ( <> - {post?.category} - + | )} {post?.type !== 'Page' && ( <> - {post?.publishDay} - + | {locale.COMMON.LAST_EDITED_TIME}: {post?.lastEditedDay} diff --git a/themes/example/components/RecentCommentListForExample.js b/themes/example/components/RecentCommentListForExample.js index e6c97c4c..0fbd075e 100644 --- a/themes/example/components/RecentCommentListForExample.js +++ b/themes/example/components/RecentCommentListForExample.js @@ -1,6 +1,6 @@ import { siteConfig } from '@/lib/config' import { RecentComments } from '@waline/client' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useEffect, useState } from 'react' /** @@ -44,14 +44,14 @@ const RecentCommentListForExample = props => { dangerouslySetInnerHTML={{ __html: comment.comment }} />
    - --{comment.nick} - +
    ))} diff --git a/themes/example/components/SideBar.js b/themes/example/components/SideBar.js index 35c95b1e..42be608f 100644 --- a/themes/example/components/SideBar.js +++ b/themes/example/components/SideBar.js @@ -2,7 +2,7 @@ import Live2D from '@/components/Live2D' import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' import dynamic from 'next/dynamic' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import CONFIG from '../config' import Announcement from './Announcement' import Catalog from './Catalog' @@ -53,7 +53,7 @@ export const SideBar = props => {
      {categoryOptions?.map(category => { return ( - { {category.name}({category.count}) - + ) })}
    @@ -83,7 +83,7 @@ export const SideBar = props => {
      {latestPosts?.map(p => { return ( - +
    • {' '} { {p.title}
    • - +
      ) })}
    diff --git a/themes/example/index.js b/themes/example/index.js index 4834039b..0f5751da 100644 --- a/themes/example/index.js +++ b/themes/example/index.js @@ -8,7 +8,7 @@ import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' import { isBrowser } from '@/lib/utils' import { Transition } from '@headlessui/react' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { useEffect } from 'react' import BlogListArchive from './components/BlogListArchive' @@ -292,7 +292,7 @@ const LayoutCategoryIndex = props => { <>
    {categoryOptions?.map(category => ( - { {category.name}({category.count})
    - + ))}
    @@ -323,7 +323,7 @@ const LayoutTagIndex = props => {
    {tagOptions.map(tag => (
    - { {' '} {tag.name + (tag.count ? `(${tag.count})` : '')}{' '}
    - +
    ))}
    diff --git a/themes/fukasawa/components/ArticleAround.js b/themes/fukasawa/components/ArticleAround.js index b0de69c7..ffcd69cf 100644 --- a/themes/fukasawa/components/ArticleAround.js +++ b/themes/fukasawa/components/ArticleAround.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 上一篇,下一篇文章 @@ -11,22 +11,22 @@ export default function ArticleAround ({ prev, next }) { } return (
    - {prev.title} - - + {next.title} - +
    ); } diff --git a/themes/fukasawa/components/ArticleDetail.js b/themes/fukasawa/components/ArticleDetail.js index 62a0a0d8..63b193bc 100644 --- a/themes/fukasawa/components/ArticleDetail.js +++ b/themes/fukasawa/components/ArticleDetail.js @@ -8,7 +8,7 @@ import WWAds from '@/components/WWAds' import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' import { formatDateFmt } from '@/lib/utils/formatDate' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import ArticleAround from './ArticleAround' import TagItemMini from './TagItemMini' @@ -55,25 +55,25 @@ export default function ArticleDetail(props) {
    {post?.category && ( <> - {post.category} - + | )} {post?.type !== 'Page' && ( <> - {post?.publishDay} - + | {locale.COMMON.LAST_EDITED_TIME}: {post.lastEditedDay} diff --git a/themes/fukasawa/components/BlogCard.js b/themes/fukasawa/components/BlogCard.js index 2cfb0ce4..3b478c49 100644 --- a/themes/fukasawa/components/BlogCard.js +++ b/themes/fukasawa/components/BlogCard.js @@ -2,7 +2,7 @@ import LazyImage from '@/components/LazyImage' import NotionIcon from '@/components/NotionIcon' import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import CONFIG from '../config' import TagItemMini from './TagItemMini' @@ -51,7 +51,7 @@ const {siteInfo} =useGlobal()
    {/* 封面图 */} {showPageCover && ( - +
    - +
    )} {/* 文字部分 */}

    - @@ -73,7 +73,7 @@ const {siteInfo} =useGlobal() )}{' '} {post.title} - +

    {(!showPreview || showSummary) && ( @@ -85,13 +85,13 @@ const {siteInfo} =useGlobal() {/* 分类标签 */}
    {post.category && ( - {post.category} - + )}
    diff --git a/themes/fukasawa/components/BlogPostArchive.js b/themes/fukasawa/components/BlogPostArchive.js index bcdafccf..61c1b1ee 100644 --- a/themes/fukasawa/components/BlogPostArchive.js +++ b/themes/fukasawa/components/BlogPostArchive.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 博客归档 @@ -27,12 +27,12 @@ const BlogArchiveItem = ({ posts = [], archiveTitle }) => {
    {post.date?.start_date}{' '}   - {post.title} - +
    ) diff --git a/themes/fukasawa/components/GroupCategory.js b/themes/fukasawa/components/GroupCategory.js index 1753afd2..df1a0805 100644 --- a/themes/fukasawa/components/GroupCategory.js +++ b/themes/fukasawa/components/GroupCategory.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' function GroupCategory ({ currentCategory, categories }) { if (!categories) { @@ -10,7 +10,7 @@ function GroupCategory ({ currentCategory, categories }) { {categories.map(category => { const selected = currentCategory === category.name return ( - {category.name}({category.count}) - + ) })}
    diff --git a/themes/fukasawa/components/Logo.js b/themes/fukasawa/components/Logo.js index ae951363..6cc2bd8f 100644 --- a/themes/fukasawa/components/Logo.js +++ b/themes/fukasawa/components/Logo.js @@ -1,14 +1,14 @@ import { siteConfig } from '@/lib/config' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' const Logo = props => { return (
    - {siteConfig('TITLE')} - +
    ) } diff --git a/themes/fukasawa/components/MenuItemCollapse.js b/themes/fukasawa/components/MenuItemCollapse.js index eb00850f..d0da4902 100644 --- a/themes/fukasawa/components/MenuItemCollapse.js +++ b/themes/fukasawa/components/MenuItemCollapse.js @@ -1,5 +1,5 @@ import Collapse from '@/components/Collapse' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { useState } from 'react' @@ -42,7 +42,7 @@ export const MenuItemCollapse = props => { } onClick={toggleShow}> {!hasSubMenu && ( - @@ -50,7 +50,7 @@ export const MenuItemCollapse = props => {
    {link.name}
    - + )} {hasSubMenu && ( @@ -79,14 +79,14 @@ export const MenuItemCollapse = props => { className='whitespace-nowrap dark:text-gray-200 not:last-child:border-b-0 border-b dark:border-gray-800 py-2 px-14 cursor-pointer hover:bg-gray-100 font-extralight dark:bg-black text-left justify-start text-gray-600 bg-gray-50 dark:hover:bg-gray-900 tracking-widest transition-all duration-200'> - +
    {sLink.title}
    - +
    ) })} diff --git a/themes/fukasawa/components/MenuItemDrop.js b/themes/fukasawa/components/MenuItemDrop.js index 1de272c2..8bd7da3d 100644 --- a/themes/fukasawa/components/MenuItemDrop.js +++ b/themes/fukasawa/components/MenuItemDrop.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useState } from 'react' export const MenuItemDrop = ({ link }) => { @@ -13,7 +13,7 @@ export const MenuItemDrop = ({ link }) => { onMouseOut={() => changeShow(false)} className='relative py-1 mb-1.5 duration-500 justify-between text-gray-500 dark:text-gray-300 hover:text-black hover:underline cursor-pointer flex flex-nowrap items-center '> {!hasSubMenu && ( - @@ -22,7 +22,7 @@ export const MenuItemDrop = ({ link }) => { {link.name}
    {link.slot} - + )} {hasSubMenu && ( @@ -48,7 +48,7 @@ export const MenuItemDrop = ({ link }) => { {link?.subMenus?.map((sLink, index) => { return (
  • - @@ -57,7 +57,7 @@ export const MenuItemDrop = ({ link }) => { )}
    {sLink.name}
    {sLink.slot} - +
  • ) })} diff --git a/themes/fukasawa/components/MenuItemNormal.js b/themes/fukasawa/components/MenuItemNormal.js index a4ccf59d..4c69e72b 100644 --- a/themes/fukasawa/components/MenuItemNormal.js +++ b/themes/fukasawa/components/MenuItemNormal.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' export const MenuItemNormal = props => { @@ -9,7 +9,7 @@ export const MenuItemNormal = props => { return null } return ( - {
    {link.name}
    {link.slot} - + ) } diff --git a/themes/fukasawa/components/PaginationSimple.js b/themes/fukasawa/components/PaginationSimple.js index 11c0d3f3..792989e5 100644 --- a/themes/fukasawa/components/PaginationSimple.js +++ b/themes/fukasawa/components/PaginationSimple.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { useGlobal } from '@/lib/global' @@ -17,7 +17,7 @@ const PaginationSimple = ({ page, showNext }) => { return (
    - { } text-center w-full duration-200 px-4 py-2 hover:border-black border-b-2 hover:font-bold`}> ←{locale.PAGINATION.PREV} - - + { } text-center w-full duration-200 px-4 py-2 hover:border-black border-b-2 hover:font-bold`}> {locale.PAGINATION.NEXT}→ - +
    ) } diff --git a/themes/fukasawa/components/TagItem.js b/themes/fukasawa/components/TagItem.js index 179da9db..00771ca3 100644 --- a/themes/fukasawa/components/TagItem.js +++ b/themes/fukasawa/components/TagItem.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useGlobal } from '@/lib/global' const TagItem = ({ tag, selected }) => { @@ -7,7 +7,7 @@ const TagItem = ({ tag, selected }) => {
    { locale.COMMON.NOTAG }
    } return ( - @@ -19,7 +19,7 @@ const TagItem = ({ tag, selected }) => { {selected && } {`${tag.name} `} {tag.count ? `(${tag.count})` : ''}
    - + ); } diff --git a/themes/fukasawa/components/TagItemMini.js b/themes/fukasawa/components/TagItemMini.js index 26295088..c83b9f0f 100644 --- a/themes/fukasawa/components/TagItemMini.js +++ b/themes/fukasawa/components/TagItemMini.js @@ -1,8 +1,8 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' const TagItemMini = ({ tag, selected = false }) => { return ( - {
    {selected && } {tag.name + (tag.count ? `(${tag.count})` : '')}
    - + ); } diff --git a/themes/fukasawa/index.js b/themes/fukasawa/index.js index 4176ed11..2bb9c57b 100644 --- a/themes/fukasawa/index.js +++ b/themes/fukasawa/index.js @@ -9,7 +9,7 @@ import { useGlobal } from '@/lib/global' import { isBrowser } from '@/lib/utils' import { Transition } from '@headlessui/react' import dynamic from 'next/dynamic' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { createContext, useContext, useEffect, useRef } from 'react' import ArticleDetail from './components/ArticleDetail' @@ -258,7 +258,7 @@ const LayoutCategoryIndex = props => {
    {categoryOptions?.map(category => { return ( - { {category.name}({category.count})
    - + ) })}
    diff --git a/themes/game/components/BlogArchiveItem.js b/themes/game/components/BlogArchiveItem.js index 4a92959e..7a010961 100644 --- a/themes/game/components/BlogArchiveItem.js +++ b/themes/game/components/BlogArchiveItem.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 归档分组文章 @@ -21,12 +21,12 @@ export default function BlogArchiveItem({ archiveTitle, archivePosts }) {
    {post.date?.start_date}{' '}   - {post.title} - +
    ) diff --git a/themes/game/components/BlogPost.js b/themes/game/components/BlogPost.js index 51354bd8..e33c3da2 100644 --- a/themes/game/components/BlogPost.js +++ b/themes/game/components/BlogPost.js @@ -2,7 +2,7 @@ import NotionIcon from '@/components/NotionIcon' import NotionPage from '@/components/NotionPage' import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' const BlogPost = ({ post }) => { const { NOTION_CONFIG } = useGlobal() @@ -10,7 +10,7 @@ const BlogPost = ({ post }) => { siteConfig('POST_LIST_PREVIEW', false, NOTION_CONFIG) && post?.blockMap return ( - +

    @@ -37,7 +37,7 @@ const BlogPost = ({ post }) => { )}

    - +
    ) } diff --git a/themes/game/components/ExampleRecentComments.js b/themes/game/components/ExampleRecentComments.js index 9dbdfa7f..cf1f5bed 100644 --- a/themes/game/components/ExampleRecentComments.js +++ b/themes/game/components/ExampleRecentComments.js @@ -1,6 +1,6 @@ import { useEffect, useState } from 'react' import { siteConfig } from '@/lib/config' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { RecentComments } from '@waline/client' /** @@ -26,7 +26,7 @@ const ExampleRecentComments = (props) => { {!onLoading && comments && comments.length === 0 &&
    No Comments
    } {!onLoading && comments && comments.length > 0 && comments.map((comment) =>
    -
    --{comment.nick}
    +
    --{comment.nick}
    )} diff --git a/themes/game/components/GameEmbed.js b/themes/game/components/GameEmbed.js index cb83c8f3..1de42784 100644 --- a/themes/game/components/GameEmbed.js +++ b/themes/game/components/GameEmbed.js @@ -2,7 +2,7 @@ import { Draggable } from '@/components/Draggable' import { siteConfig } from '@/lib/config' import { deepClone } from '@/lib/utils' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useEffect, useState } from 'react' import DownloadButton from './DownloadButton' import FullScreenButton from './FullScreenButton' @@ -100,12 +100,12 @@ export default function GameEmbed({ post, siteInfo }) {
    - - {' '} + {' '} { diff --git a/themes/game/components/GameListIndexCombine.js b/themes/game/components/GameListIndexCombine.js index ac8b14ba..8e5d703c 100644 --- a/themes/game/components/GameListIndexCombine.js +++ b/themes/game/components/GameListIndexCombine.js @@ -3,7 +3,7 @@ import { AdSlot } from '@/components/GoogleAdsense' import LazyImage from '@/components/LazyImage' import { siteConfig } from '@/lib/config' import { deepClone } from '@/lib/utils' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useState } from 'react' import CONFIG from '../config' @@ -142,7 +142,7 @@ const GameItem = ({ item, isLargeCard }) => { const video = item?.ext?.video return ( - { alt={title} fill='full' /> - + ) } diff --git a/themes/game/components/GameListNormal.js b/themes/game/components/GameListNormal.js index 22fc4a6f..9a15d185 100644 --- a/themes/game/components/GameListNormal.js +++ b/themes/game/components/GameListNormal.js @@ -1,6 +1,6 @@ /* eslint-disable @next/next/no-img-element */ import { deepClone } from '@/lib/utils' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useState } from 'react' /** @@ -45,7 +45,7 @@ const GameItem = ({ item }) => { const video = item?.ext?.video return ( - { setShowType('video') @@ -77,6 +77,6 @@ const GameItem = ({ item }) => { src={img} alt={title} /> - + ) } diff --git a/themes/game/components/GameListRealate.js b/themes/game/components/GameListRealate.js index 3d925c3a..b22cff64 100644 --- a/themes/game/components/GameListRealate.js +++ b/themes/game/components/GameListRealate.js @@ -1,6 +1,6 @@ /* eslint-disable @next/next/no-img-element */ import { deepClone } from '@/lib/utils' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useState } from 'react' /** @@ -46,7 +46,7 @@ const GameItem = ({ item }) => { const video = item?.ext?.video return ( - { setShowType('video') @@ -78,6 +78,6 @@ const GameItem = ({ item }) => { src={img} alt={title} /> - + ) } diff --git a/themes/game/components/GroupCategory.js b/themes/game/components/GroupCategory.js index 4da5128c..b91abefc 100644 --- a/themes/game/components/GroupCategory.js +++ b/themes/game/components/GroupCategory.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' function GroupCategory({ currentCategory, categoryOptions }) { if (!categoryOptions) { @@ -7,16 +7,16 @@ function GroupCategory({ currentCategory, categoryOptions }) { return (
    - + - +
    {categoryOptions.map(category => { const selected = currentCategory === category.name return ( - {category.count} */} - + ) })}
    diff --git a/themes/game/components/GroupTag.js b/themes/game/components/GroupTag.js index 2fa712bd..3c6806dd 100644 --- a/themes/game/components/GroupTag.js +++ b/themes/game/components/GroupTag.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import TagItemMini from './TagItemMini' /** @@ -12,9 +12,9 @@ function GroupTag({ tagOptions, currentTag }) { if (!tagOptions) return <> return (
    - + - +
    {tagOptions?.slice(0, 20)?.map(tag => { const selected = tag.name === currentTag diff --git a/themes/game/components/Logo.js b/themes/game/components/Logo.js index 896ae725..8de33512 100644 --- a/themes/game/components/Logo.js +++ b/themes/game/components/Logo.js @@ -1,10 +1,10 @@ import { siteConfig } from '@/lib/config' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /* eslint-disable @next/next/no-html-link-for-pages */ export default function Logo({ siteInfo }) { return ( - @@ -16,6 +16,6 @@ export default function Logo({ siteInfo }) { {siteConfig('BIO')}
    - + ) } diff --git a/themes/game/components/LogoMini.js b/themes/game/components/LogoMini.js index b540e6e6..8b8899a8 100644 --- a/themes/game/components/LogoMini.js +++ b/themes/game/components/LogoMini.js @@ -1,11 +1,11 @@ import { siteConfig } from '@/lib/config' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /* eslint-disable @next/next/no-html-link-for-pages */ export default function LogoMini() { return ( - + {siteConfig('TITLE')?.charAt(0)} - + ) } diff --git a/themes/game/components/MenuItemCollapse.js b/themes/game/components/MenuItemCollapse.js index f70ed8d1..d7fd1993 100644 --- a/themes/game/components/MenuItemCollapse.js +++ b/themes/game/components/MenuItemCollapse.js @@ -1,5 +1,5 @@ import Collapse from '@/components/Collapse' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useState } from 'react' /** @@ -32,7 +32,7 @@ export const MenuItemCollapse = props => { className='w-full px-4 py-2 text-left dark:bg-hexo-black-gray dark:border-black' onClick={toggleShow}> {!hasSubMenu && ( - @@ -44,7 +44,7 @@ export const MenuItemCollapse = props => { )} {link?.name} - + )} {hasSubMenu && (
    {
    - + {sLink.title} - +
    ) })} diff --git a/themes/game/components/MenuItemDrop.js b/themes/game/components/MenuItemDrop.js index e72a87dd..54f13cc0 100644 --- a/themes/game/components/MenuItemDrop.js +++ b/themes/game/components/MenuItemDrop.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useState } from 'react' export const MenuItemDrop = ({ link }) => { @@ -17,7 +17,7 @@ export const MenuItemDrop = ({ link }) => { onMouseOut={() => changeShow(false)}> {!hasSubMenu && (
    - @@ -25,7 +25,7 @@ export const MenuItemDrop = ({ link }) => { {link?.icon && }
    {link?.name} - +
    )} @@ -47,12 +47,12 @@ export const MenuItemDrop = ({ link }) => {
    - + {link?.icon &&   } {sLink.title} - +
    ) })} diff --git a/themes/game/components/PaginationSimple.js b/themes/game/components/PaginationSimple.js index 6df710f5..c2874b59 100644 --- a/themes/game/components/PaginationSimple.js +++ b/themes/game/components/PaginationSimple.js @@ -1,5 +1,5 @@ import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' /** @@ -21,7 +21,7 @@ const PaginationSimple = ({ page, showNext }) => { return (
    - { currentPage === 1 ? 'invisible' : 'visible' } text-center w-full duration-200 px-4 py-2 hover:border-black dark:border-hexo-black-gray border-b-2 hover:font-bold`}> ←{locale.PAGINATION.PREV} - - + { showNext ? 'visible' : 'invisible' } text-center w-full duration-200 px-4 py-2 hover:border-black dark:border-hexo-black-gray border-b-2 hover:font-bold`}> {locale.PAGINATION.NEXT}→ - +
    ) } diff --git a/themes/game/components/PostInfo.js b/themes/game/components/PostInfo.js index 0e430765..243d569e 100644 --- a/themes/game/components/PostInfo.js +++ b/themes/game/components/PostInfo.js @@ -1,5 +1,5 @@ import NotionIcon from '@/components/NotionIcon' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import TagItem from './TagItem' import { siteConfig } from '@/lib/config' @@ -15,12 +15,12 @@ export default function PostInfo(props) {
    {post?.type !== 'Page' && ( <> - {post?.category} - + )}
    diff --git a/themes/game/components/SideBar.js b/themes/game/components/SideBar.js index a4d1e060..5cc321ba 100644 --- a/themes/game/components/SideBar.js +++ b/themes/game/components/SideBar.js @@ -1,7 +1,7 @@ import { siteConfig } from '@/lib/config' import Live2D from '@/components/Live2D' import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import dynamic from 'next/dynamic' const ExampleRecentComments = dynamic(() => import('./ExampleRecentComments')) @@ -18,13 +18,13 @@ export const SideBar = (props) => { @@ -39,9 +39,9 @@ export const SideBar = (props) => {
      {latestPosts?.map(p => { return ( - +
    • {p.title}
    • - +
      ); })}
    diff --git a/themes/game/components/TagItem.js b/themes/game/components/TagItem.js index 4f01fb72..fd94acbd 100644 --- a/themes/game/components/TagItem.js +++ b/themes/game/components/TagItem.js @@ -1,11 +1,11 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' const TagItem = ({ tag }) => ( - +

    {tag}

    - +
    ) export default TagItem diff --git a/themes/game/components/TagItemMini.js b/themes/game/components/TagItemMini.js index 3fe0c7bf..48f101b5 100644 --- a/themes/game/components/TagItemMini.js +++ b/themes/game/components/TagItemMini.js @@ -1,8 +1,8 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' const TagItemMini = ({ tag, selected = false }) => { return ( - { {tag.count ? `${tag.count}` : ''} - + ) } diff --git a/themes/game/components/Tags.js b/themes/game/components/Tags.js index bdab3ee5..db94dd93 100644 --- a/themes/game/components/Tags.js +++ b/themes/game/components/Tags.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' const Tags = props => { const { tagOptions, tag } = props @@ -19,14 +19,14 @@ const Tags = props => { : 'bg-gray-100 border-gray-100 text-gray-400 dark:bg-night dark:border-gray-800' }`} > - {`${tag.name} (${tag.count})`} - + ) })} diff --git a/themes/game/index.js b/themes/game/index.js index a2ad09e0..e57fea09 100644 --- a/themes/game/index.js +++ b/themes/game/index.js @@ -9,7 +9,7 @@ import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' import { loadWowJS } from '@/lib/plugins/wow' import { deepClone, isBrowser, shuffleArray } from '@/lib/utils' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { createContext, useContext, useEffect, useRef, useState } from 'react' import Announcement from './components/Announcement' @@ -400,7 +400,7 @@ const LayoutCategoryIndex = props => { className='duration-200 flex flex-wrap my-4 gap-2'> {categoryOptions?.map(category => { return ( - { {/* */} {category.name}({category.count})
    - + ) })}
    @@ -433,14 +433,14 @@ const LayoutTagIndex = props => {
    {tagOptions.map(tag => { return ( - {' '} {tag.name + (tag.count ? `(${tag.count})` : '')}{' '} - + ) })}
    diff --git a/themes/gitbook/components/ArticleAround.js b/themes/gitbook/components/ArticleAround.js index 4125e1cc..62893af4 100644 --- a/themes/gitbook/components/ArticleAround.js +++ b/themes/gitbook/components/ArticleAround.js @@ -1,5 +1,5 @@ import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 上一篇,下一篇文章 @@ -15,7 +15,7 @@ export default function ArticleAround({ prev, next }) { return (
    - @@ -24,9 +24,9 @@ export default function ArticleAround({ prev, next }) {
    {locale.COMMON.PREV_POST}
    {prev.title}
    - + - @@ -35,7 +35,7 @@ export default function ArticleAround({ prev, next }) {
    {next.title}
    - + ) } diff --git a/themes/gitbook/components/BlogArchiveItem.js b/themes/gitbook/components/BlogArchiveItem.js index 7d7b5a1c..a6d77c51 100644 --- a/themes/gitbook/components/BlogArchiveItem.js +++ b/themes/gitbook/components/BlogArchiveItem.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 归档分组 @@ -20,12 +20,12 @@ export default function BlogArchiveItem({ archiveTitle, archivePosts }) {
    {post.date?.start_date}{' '}   - {post.title} - +
    ) diff --git a/themes/gitbook/components/BlogPostCard.js b/themes/gitbook/components/BlogPostCard.js index a311f47c..c19a099b 100644 --- a/themes/gitbook/components/BlogPostCard.js +++ b/themes/gitbook/components/BlogPostCard.js @@ -1,7 +1,7 @@ import Badge from '@/components/Badge' import NotionIcon from '@/components/NotionIcon' import { siteConfig } from '@/lib/config' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' const BlogPostCard = ({ post, className }) => { @@ -10,7 +10,7 @@ const BlogPostCard = ({ post, className }) => { decodeURIComponent(router.asPath.split('?')[0]) === post?.href return ( - +
    { )}
    - +
    ) } diff --git a/themes/gitbook/components/CategoryItem.js b/themes/gitbook/components/CategoryItem.js index 779488de..8b7cbcfc 100644 --- a/themes/gitbook/components/CategoryItem.js +++ b/themes/gitbook/components/CategoryItem.js @@ -1,8 +1,8 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' export default function CategoryItem ({ selected, category, categoryCount }) { return ( - {category} {categoryCount && `(${categoryCount})`}
    - + ); } diff --git a/themes/gitbook/components/LeftMenuBar.js b/themes/gitbook/components/LeftMenuBar.js index 6bde6c51..6f9da093 100644 --- a/themes/gitbook/components/LeftMenuBar.js +++ b/themes/gitbook/components/LeftMenuBar.js @@ -1,14 +1,14 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' export default function LeftMenuBar () { return (
    - +
    - +
    ); diff --git a/themes/gitbook/components/LogoBar.js b/themes/gitbook/components/LogoBar.js index b3f96cdf..0ca4f479 100644 --- a/themes/gitbook/components/LogoBar.js +++ b/themes/gitbook/components/LogoBar.js @@ -1,6 +1,6 @@ import LazyImage from '@/components/LazyImage' import { siteConfig } from '@/lib/config' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import CONFIG from '../config' /** @@ -12,7 +12,7 @@ export default function LogoBar(props) { const { siteInfo } = props return (
    - {siteInfo?.title || siteConfig('TITLE')} - +
    ) } diff --git a/themes/gitbook/components/MenuItemCollapse.js b/themes/gitbook/components/MenuItemCollapse.js index 96186533..a199cf9e 100644 --- a/themes/gitbook/components/MenuItemCollapse.js +++ b/themes/gitbook/components/MenuItemCollapse.js @@ -1,5 +1,5 @@ import Collapse from '@/components/Collapse' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { useState } from 'react' @@ -42,7 +42,7 @@ export const MenuItemCollapse = props => { } onClick={toggleShow}> {!hasSubMenu && ( - @@ -50,7 +50,7 @@ export const MenuItemCollapse = props => {
    {link.name}
    - + )} {hasSubMenu && ( @@ -79,14 +79,14 @@ export const MenuItemCollapse = props => { className=' not:last-child:border-b-0 border-b dark:border-gray-800 py-2 px-14 cursor-pointer hover:bg-gray-100 dark:text-gray-200 font-extralight dark:bg-black text-left justify-start text-gray-600 bg-gray-50 dark:hover:bg-gray-900 tracking-widest transition-all duration-200'> - +
    {sLink.title}
    - +
    ) })} diff --git a/themes/gitbook/components/MenuItemDrop.js b/themes/gitbook/components/MenuItemDrop.js index 9cc721d7..7fb7d2f5 100644 --- a/themes/gitbook/components/MenuItemDrop.js +++ b/themes/gitbook/components/MenuItemDrop.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { useState } from 'react' @@ -24,9 +24,9 @@ export const MenuItemDrop = ({ link }) => { ? 'bg-green-600 text-white hover:text-white' : 'hover:text-green-600') }> - + {link?.icon && } {link?.name} - +
    )} @@ -56,12 +56,12 @@ export const MenuItemDrop = ({ link }) => {
  • - + {link?.icon &&   } {sLink.title} - +
  • ) })} diff --git a/themes/gitbook/components/MenuItemMobileNormal.js b/themes/gitbook/components/MenuItemMobileNormal.js index de16827d..d04ba79b 100644 --- a/themes/gitbook/components/MenuItemMobileNormal.js +++ b/themes/gitbook/components/MenuItemMobileNormal.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' export const NormalMenu = props => { @@ -12,7 +12,7 @@ export const NormalMenu = props => { const selected = router.pathname === link.href || router.asPath === link.href return ( - {
    {link.name}
    {link.slot} - + ) } diff --git a/themes/gitbook/components/MenuItemPCNormal.js b/themes/gitbook/components/MenuItemPCNormal.js index bf3a22c7..06bee8a6 100644 --- a/themes/gitbook/components/MenuItemPCNormal.js +++ b/themes/gitbook/components/MenuItemPCNormal.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' export const MenuItemPCNormal = props => { @@ -10,7 +10,7 @@ export const MenuItemPCNormal = props => { } return ( - {
    {link.name}
    {link.slot} - + ) } diff --git a/themes/gitbook/components/PaginationSimple.js b/themes/gitbook/components/PaginationSimple.js index b48259ea..90d6101b 100644 --- a/themes/gitbook/components/PaginationSimple.js +++ b/themes/gitbook/components/PaginationSimple.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { useGlobal } from '@/lib/global' @@ -18,7 +18,7 @@ const PaginationSimple = ({ page, totalPage }) => { return (
    - { } text-center w-full duration-200 px-4 py-2 hover:border-green-500 border-b-2 hover:font-bold`}> ←{locale.PAGINATION.PREV} - - + { } text-center w-full duration-200 px-4 py-2 hover:border-green-500 border-b-2 hover:font-bold`}> {locale.PAGINATION.NEXT}→ - +
    ) } diff --git a/themes/gitbook/components/TagItemMini.js b/themes/gitbook/components/TagItemMini.js index 9922a069..e8fde285 100644 --- a/themes/gitbook/components/TagItemMini.js +++ b/themes/gitbook/components/TagItemMini.js @@ -1,8 +1,8 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' const TagItemMini = ({ tag, selected = false }) => { return ( - {
    {selected && } {tag.name + (tag.count ? `(${tag.count})` : '')}
    - + ) } diff --git a/themes/gitbook/index.js b/themes/gitbook/index.js index eda1faa3..e18c3f1f 100644 --- a/themes/gitbook/index.js +++ b/themes/gitbook/index.js @@ -16,7 +16,7 @@ import { getShortId } from '@/lib/utils/pageId' import { SignIn, SignUp } from '@clerk/nextjs' import dynamic from 'next/dynamic' import Head from 'next/head' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { createContext, useContext, useEffect, useRef, useState } from 'react' import Announcement from './components/Announcement' @@ -479,7 +479,7 @@ const LayoutCategoryIndex = props => {
    {categoryOptions?.map(category => { return ( - { {category.name}({category.count})
    - + ) })} diff --git a/themes/heo/components/BlogPostArchive.js b/themes/heo/components/BlogPostArchive.js index 1ba8b2da..3d6dc60d 100644 --- a/themes/heo/components/BlogPostArchive.js +++ b/themes/heo/components/BlogPostArchive.js @@ -1,6 +1,6 @@ import LazyImage from '@/components/LazyImage' import { siteConfig } from '@/lib/config' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import CONFIG from '../config' import TagItemMini from './TagItemMini' @@ -44,12 +44,12 @@ const BlogPostArchive = ({ posts = [], archiveTitle, siteInfo }) => { {/* 图片封面 */} {showPageCover && (
    - + - +
    )} @@ -60,24 +60,24 @@ const BlogPostArchive = ({ posts = [], archiveTitle, siteInfo }) => { {post?.category && ( )} {/* 标题 */} - {post.title} - + {/* 摘要 */} diff --git a/themes/heo/components/BlogPostCard.js b/themes/heo/components/BlogPostCard.js index c6e09f4a..ebbb6238 100644 --- a/themes/heo/components/BlogPostCard.js +++ b/themes/heo/components/BlogPostCard.js @@ -1,7 +1,7 @@ import LazyImage from '@/components/LazyImage' import NotionIcon from './NotionIcon' import { siteConfig } from '@/lib/config' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import CONFIG from '../config' import TagItemMini from './TagItemMini' @@ -38,7 +38,7 @@ const BlogPostCard = ({ index, post, showSummary, siteInfo }) => { }> {/* 图片封面 */} {showPageCover && ( - +
    { className='h-full w-full object-cover group-hover:scale-105 group-hover:brightness-75 transition-all duration-500 ease-in-out' //宽高都调整为自适应,保证封面居中 />
    - +
    )} {/* 文字区块 */} @@ -65,17 +65,17 @@ const BlogPostCard = ({ index, post, showSummary, siteInfo }) => { {post?.category && ( )} {/* 标题和图标 */} - { /> )} {post.title} - + {/* 摘要 */} diff --git a/themes/heo/components/CategoryBar.js b/themes/heo/components/CategoryBar.js index d5548f9d..5a955c29 100644 --- a/themes/heo/components/CategoryBar.js +++ b/themes/heo/components/CategoryBar.js @@ -1,6 +1,6 @@ import { ChevronDoubleLeft, ChevronDoubleRight } from '@/components/HeroIcons' import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { useRef, useState } from 'react' @@ -55,11 +55,11 @@ export default function CategoryBar(props) { )} - {locale.MENU.CATEGORY} - + ) @@ -77,7 +77,7 @@ const MenuItem = ({ href, name }) => { return (
    - {name} + {name}
    ) } diff --git a/themes/heo/components/CategoryGroup.js b/themes/heo/components/CategoryGroup.js index 21915d72..a3bde599 100644 --- a/themes/heo/components/CategoryGroup.js +++ b/themes/heo/components/CategoryGroup.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' const CategoryGroup = ({ currentCategory, categories }) => { if (!categories) { @@ -9,7 +9,7 @@ const CategoryGroup = ({ currentCategory, categories }) => { {categories.map(category => { const selected = currentCategory === category.name return ( - {
    {category.name}({category.count})
    - + ) })} diff --git a/themes/heo/components/Hero.js b/themes/heo/components/Hero.js index 8c2a871b..a0cae172 100644 --- a/themes/heo/components/Hero.js +++ b/themes/heo/components/Hero.js @@ -3,7 +3,7 @@ import { ArrowSmallRight, PlusSmall } from '@/components/HeroIcons' import LazyImage from '@/components/LazyImage' import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { useImperativeHandle, useRef, useState } from 'react' import CONFIG from '../config' @@ -176,7 +176,7 @@ function GroupMenu() { return (
    -
    @@ -186,8 +186,8 @@ function GroupMenu() {
    - - +
    @@ -197,9 +197,9 @@ function GroupMenu() {
    - + {/* 第三个标签在小屏上不显示 */} -
    @@ -209,7 +209,7 @@ function GroupMenu() {
    - +
    ) } @@ -239,7 +239,7 @@ function TopGroup(props) { className='w-full flex space-x-3 xl:space-x-0 xl:grid xl:grid-cols-3 xl:gap-3 xl:h-[342px]'> {topPosts?.map((p, index) => { return ( - +
    - +
    ) })}
    diff --git a/themes/heo/components/HexoRecentComments.js b/themes/heo/components/HexoRecentComments.js index 354e2182..11b403b1 100644 --- a/themes/heo/components/HexoRecentComments.js +++ b/themes/heo/components/HexoRecentComments.js @@ -1,7 +1,7 @@ import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' import { RecentComments } from '@waline/client' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useEffect, useState } from 'react' /** @@ -49,14 +49,14 @@ const HexoRecentComments = props => { dangerouslySetInnerHTML={{ __html: comment.comment }} />
    - --{comment.nick} - +
    ))} diff --git a/themes/heo/components/InfoCard.js b/themes/heo/components/InfoCard.js index af31d060..5c5cbccc 100644 --- a/themes/heo/components/InfoCard.js +++ b/themes/heo/components/InfoCard.js @@ -1,7 +1,7 @@ import { ArrowRightCircle } from '@/components/HeroIcons' import LazyImage from '@/components/LazyImage' import { siteConfig } from '@/lib/config' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { useState } from 'react' import CONFIG from '../config' @@ -50,16 +50,16 @@ export function InfoCard(props) { {/* 两个社交按钮 */} {url1 && (
    - + - +
    )} {url2 && (
    - + - +
    )}
    @@ -81,7 +81,7 @@ function MoreButton() { return <> } return ( - +
    {text3}
    - +
    ) } diff --git a/themes/heo/components/LatestPostsGroup.js b/themes/heo/components/LatestPostsGroup.js index 1eb19022..b3350e95 100644 --- a/themes/heo/components/LatestPostsGroup.js +++ b/themes/heo/components/LatestPostsGroup.js @@ -1,5 +1,5 @@ import LazyImage from '@/components/LazyImage' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 最新文章列表 @@ -22,7 +22,7 @@ const LatestPostsGroup = ({ latestPosts, siteInfo }) => { : siteInfo?.pageCover return ( - { }>
    {post.title}
    - + ) })} diff --git a/themes/heo/components/LatestPostsGroupMini.js b/themes/heo/components/LatestPostsGroupMini.js index 32094157..519f0f6e 100644 --- a/themes/heo/components/LatestPostsGroupMini.js +++ b/themes/heo/components/LatestPostsGroupMini.js @@ -2,7 +2,7 @@ import LazyImage from '@/components/LazyImage' import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' // import Image from 'next/image' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' /** @@ -33,7 +33,7 @@ export default function LatestPostsGroupMini({ latestPosts, siteInfo }) { : siteInfo?.pageCover return ( - {post.lastEditedDay} - + ) })} diff --git a/themes/heo/components/Logo.js b/themes/heo/components/Logo.js index 55ab2b4f..828d485f 100644 --- a/themes/heo/components/Logo.js +++ b/themes/heo/components/Logo.js @@ -1,12 +1,12 @@ import { Home } from '@/components/HeroIcons' import LazyImage from '@/components/LazyImage' import { siteConfig } from '@/lib/config' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' const Logo = props => { const { siteInfo } = props return ( - +
    {
    - +
    ) } export default Logo diff --git a/themes/heo/components/MenuGroupCard.js b/themes/heo/components/MenuGroupCard.js index e9810411..bd5b3f31 100644 --- a/themes/heo/components/MenuGroupCard.js +++ b/themes/heo/components/MenuGroupCard.js @@ -1,6 +1,6 @@ import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import CONFIG from '../config' const MenuGroupCard = props => { @@ -39,7 +39,7 @@ const MenuGroupCard = props => { if (link.show) { return (
    - {
    {link.name} :
    {link.slot}
    - +
    ) } else { diff --git a/themes/heo/components/MenuItemCollapse.js b/themes/heo/components/MenuItemCollapse.js index 6278cebe..8cd2e463 100644 --- a/themes/heo/components/MenuItemCollapse.js +++ b/themes/heo/components/MenuItemCollapse.js @@ -1,5 +1,5 @@ import Collapse from '@/components/Collapse' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useState } from 'react' /** @@ -31,7 +31,7 @@ export const MenuItemCollapse = ({ link }) => { className='select-none w-full p-2 border dark:border-gray-600 rounded-lg text-left dark:bg-[#1e1e1e]' onClick={toggleShow}> {!hasSubMenu && ( - @@ -39,7 +39,7 @@ export const MenuItemCollapse = ({ link }) => { {link?.icon && } {link?.name} - + )} {hasSubMenu && (
    {
    - + {link?.icon && }{' '} {sLink.title} - +
    ) })} diff --git a/themes/heo/components/MenuItemDrop.js b/themes/heo/components/MenuItemDrop.js index 48f80ad8..11c5ea84 100644 --- a/themes/heo/components/MenuItemDrop.js +++ b/themes/heo/components/MenuItemDrop.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useState } from 'react' export const MenuItemDrop = ({ link }) => { @@ -15,12 +15,12 @@ export const MenuItemDrop = ({ link }) => { onMouseOut={() => changeShow(false)}> {/* 不含子菜单 */} {!hasSubMenu && ( - {link?.icon && } {link?.name} - + )} {/* 含子菜单的按钮 */} {hasSubMenu && ( @@ -44,12 +44,12 @@ export const MenuItemDrop = ({ link }) => {
  • - + {link?.icon &&   } {sLink.title} - +
  • ) })} diff --git a/themes/heo/components/NavButtonGroup.js b/themes/heo/components/NavButtonGroup.js index 82331852..947acbfb 100644 --- a/themes/heo/components/NavButtonGroup.js +++ b/themes/heo/components/NavButtonGroup.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 首页导航大按钮组件 @@ -15,14 +15,14 @@ const NavButtonGroup = (props) => { diff --git a/themes/heo/components/PaginationNumber.js b/themes/heo/components/PaginationNumber.js index a68f33e5..ae4359b4 100644 --- a/themes/heo/components/PaginationNumber.js +++ b/themes/heo/components/PaginationNumber.js @@ -1,6 +1,6 @@ import { ChevronDoubleRight } from '@/components/HeroIcons' import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { useState } from 'react' @@ -47,7 +47,7 @@ const PaginationNumber = ({ page, totalPage }) => { {/* pc端分页按钮 */}
    {/* 上一页 */} - { {locale.PAGINATION.PREV}
    - + {/* 分页 */}
    @@ -84,7 +84,7 @@ const PaginationNumber = ({ page, totalPage }) => {
    {/* 下一页 */} - { {locale.PAGINATION.NEXT} - + {/* 移动端分页 */}
    {/* 上一页 */} - { rel='prev' className={`${showPrev ? 'block' : 'hidden'} dark:text-white relative w-full flex-1 h-14 flex items-center transition-all duration-200 justify-center py-2 px-2 bg-white dark:bg-[#1e1e1e] border rounded-xl cursor-pointer`}> {locale.PAGINATION.PREV} - + {showPrev && showNext &&
    } {/* 下一页 */} - { rel='next' className={`${+showNext ? 'block' : 'hidden'} dark:text-white relative w-full flex-1 h-14 flex items-center transition-all duration-200 justify-center py-2 px-2 bg-white dark:bg-[#1e1e1e] border rounded-xl cursor-pointer`}> {locale.PAGINATION.NEXT} - +
    ) @@ -147,7 +147,7 @@ function getPageElement(page, currentPage, pagePrefix) { return <> } return ( - {page} - + ) } diff --git a/themes/heo/components/PostAdjacent.js b/themes/heo/components/PostAdjacent.js index 9f97eac7..f49efb73 100644 --- a/themes/heo/components/PostAdjacent.js +++ b/themes/heo/components/PostAdjacent.js @@ -1,6 +1,6 @@ import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { useEffect, useState } from 'react' import CONFIG from '../config' @@ -63,7 +63,7 @@ export default function PostAdjacent({ prev, next }) {
    {/* 移动端 */}
    - @@ -71,8 +71,8 @@ export default function PostAdjacent({ prev, next }) {
    {prev.title}
    - - + @@ -80,7 +80,7 @@ export default function PostAdjacent({ prev, next }) {
    {next.title}
    - +
    {/* 桌面端 */} @@ -88,13 +88,13 @@ export default function PostAdjacent({ prev, next }) {
    ) diff --git a/themes/heo/components/PostCopyright.js b/themes/heo/components/PostCopyright.js index 4fb1eb25..22775d4c 100644 --- a/themes/heo/components/PostCopyright.js +++ b/themes/heo/components/PostCopyright.js @@ -1,6 +1,6 @@ import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { useEffect, useState } from 'react' import CONFIG from '../config' @@ -28,9 +28,9 @@ export default function PostCopyright() {
    • {locale.COMMON.AUTHOR}: - + {siteConfig('AUTHOR')} - +
    • {locale.COMMON.URL}: diff --git a/themes/heo/components/PostHeader.js b/themes/heo/components/PostHeader.js index 88711b50..cbb137fa 100644 --- a/themes/heo/components/PostHeader.js +++ b/themes/heo/components/PostHeader.js @@ -4,7 +4,7 @@ import NotionIcon from '@/components/NotionIcon' import WordCount from '@/components/WordCount' import { siteConfig } from '@/lib/config' import { formatDateFmt } from '@/lib/utils/formatDate' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import WavesArea from './WavesArea' /** @@ -60,7 +60,7 @@ export default function PostHeader({ post, siteInfo, isDarkMode }) {
      {post.category && ( <> - {post.category}
      - + )} {post.tagItems && (
      {post.tagItems.map((tag, index) => ( - {' '} {tag.name + (tag.count ? `(${tag.count})` : '')}{' '}
      - + ))} )} @@ -111,13 +111,13 @@ export default function PostHeader({ post, siteInfo, isDarkMode }) { {post?.type !== 'Page' && ( <> - {' '} {post?.publishDay} - + )} diff --git a/themes/heo/components/PostRecommend.js b/themes/heo/components/PostRecommend.js index c66b8d4f..48d273ef 100644 --- a/themes/heo/components/PostRecommend.js +++ b/themes/heo/components/PostRecommend.js @@ -1,7 +1,7 @@ import LazyImage from '@/components/LazyImage' import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import CONFIG from '../config' /** @@ -39,7 +39,7 @@ export default function PostRecommend({ recommendPosts, siteInfo }) { : siteInfo?.pageCover return ( - - + ) })} diff --git a/themes/heo/components/SearchNav.js b/themes/heo/components/SearchNav.js index 7be2b8ce..4970a5dd 100644 --- a/themes/heo/components/SearchNav.js +++ b/themes/heo/components/SearchNav.js @@ -1,5 +1,5 @@ import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useEffect, useRef } from 'react' import Card from './Card' import SearchInput from './SearchInput' @@ -30,7 +30,7 @@ export default function SearchNav(props) {
      {categoryOptions?.map(category => { return ( - {category.name}({category.count})
      - + ) })} diff --git a/themes/heo/components/SlideOver.js b/themes/heo/components/SlideOver.js index e7bb95de..e015dd38 100644 --- a/themes/heo/components/SlideOver.js +++ b/themes/heo/components/SlideOver.js @@ -1,7 +1,7 @@ import DarkModeButton from '@/components/DarkModeButton' import { useGlobal } from '@/lib/global' import { Dialog, Transition } from '@headlessui/react' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { Fragment, @@ -149,12 +149,12 @@ function DarkModeBlockButton() { */ function Button({ title, url }) { return ( - {title} - + ) } diff --git a/themes/heo/components/TagGroups.js b/themes/heo/components/TagGroups.js index 34bf1839..a5e926a7 100644 --- a/themes/heo/components/TagGroups.js +++ b/themes/heo/components/TagGroups.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' /** @@ -18,7 +18,7 @@ const TagGroups = ({ tags, className }) => { {tags.map((tag, index) => { const selected = currentTag === tag.name return ( -
      { <> )}
      - + ) })} diff --git a/themes/heo/components/TagItemMini.js b/themes/heo/components/TagItemMini.js index 7b9a7c56..66d6d5ba 100644 --- a/themes/heo/components/TagItemMini.js +++ b/themes/heo/components/TagItemMini.js @@ -1,9 +1,9 @@ import { HashTag } from '@/components/HeroIcons' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' const TagItemMini = ({ tag, selected = false }) => { return ( - { {' '} {tag.name + (tag.count ? `(${tag.count})` : '')}{' '} - + ) } diff --git a/themes/heo/components/TouchMeCard.js b/themes/heo/components/TouchMeCard.js index 42129ae0..7ed4dbe9 100644 --- a/themes/heo/components/TouchMeCard.js +++ b/themes/heo/components/TouchMeCard.js @@ -1,6 +1,6 @@ import FlipCard from '@/components/FlipCard' import { siteConfig } from '@/lib/config' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import CONFIG from '../config' /** @@ -32,11 +32,11 @@ export default function TouchMeCard() { } backContent={ - +
      {siteConfig('HEO_SOCIAL_CARD_TITLE_3', null, CONFIG)}
      - +
      } /> diff --git a/themes/heo/index.js b/themes/heo/index.js index ab779940..fd21adeb 100644 --- a/themes/heo/index.js +++ b/themes/heo/index.js @@ -20,7 +20,7 @@ import { useGlobal } from '@/lib/global' import { loadWowJS } from '@/lib/plugins/wow' import { isBrowser } from '@/lib/utils' import { Transition } from '@headlessui/react' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { useEffect, useState } from 'react' import BlogPostArchive from './components/BlogPostArchive' @@ -397,11 +397,11 @@ const Layout404 = props => { 404
      请尝试站内搜索寻找文章
      - + - + @@ -435,7 +435,7 @@ const LayoutCategoryIndex = props => { className='duration-200 flex flex-wrap m-10 justify-center'> {categoryOptions?.map(category => { return ( - { {category.count} - + ) })} @@ -477,7 +477,7 @@ const LayoutTagIndex = props => { className='duration-200 flex flex-wrap space-x-5 space-y-5 m-10 justify-center'> {tagOptions.map(tag => { return ( - { {tag.count} - + ) })} diff --git a/themes/hexo/components/ArticleAdjacent.js b/themes/hexo/components/ArticleAdjacent.js index dc6a5b99..f1b2f847 100644 --- a/themes/hexo/components/ArticleAdjacent.js +++ b/themes/hexo/components/ArticleAdjacent.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import CONFIG from '../config' import { siteConfig } from '@/lib/config' @@ -13,22 +13,22 @@ export default function ArticleAdjacent ({ prev, next }) { } return (
      - {prev.title} - - + {next.title} - +
      ) } diff --git a/themes/hexo/components/ArticleCopyright.js b/themes/hexo/components/ArticleCopyright.js index a7be768d..2115453e 100644 --- a/themes/hexo/components/ArticleCopyright.js +++ b/themes/hexo/components/ArticleCopyright.js @@ -1,5 +1,5 @@ import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { useEffect, useState } from 'react' import CONFIG from '../config' @@ -24,9 +24,9 @@ export default function ArticleCopyright() {
      • {locale.COMMON.AUTHOR}: - + {siteConfig('AUTHOR')} - +
      • {locale.COMMON.URL}: diff --git a/themes/hexo/components/ArticleRecommend.js b/themes/hexo/components/ArticleRecommend.js index b3f9e73a..30c9d56c 100644 --- a/themes/hexo/components/ArticleRecommend.js +++ b/themes/hexo/components/ArticleRecommend.js @@ -1,7 +1,7 @@ import LazyImage from '@/components/LazyImage' import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import CONFIG from '../config' /** @@ -35,7 +35,7 @@ export default function ArticleRecommend({ recommendPosts, siteInfo }) { : siteInfo?.pageCover return ( - - + ) })} diff --git a/themes/hexo/components/BlogPostArchive.js b/themes/hexo/components/BlogPostArchive.js index e296eaef..b18b6797 100644 --- a/themes/hexo/components/BlogPostArchive.js +++ b/themes/hexo/components/BlogPostArchive.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 博客归档列表 @@ -27,12 +27,12 @@ const BlogPostArchive = ({ posts = [], archiveTitle }) => {
        {post.date?.start_date}{' '}   - {post.title} - +
      • ) diff --git a/themes/hexo/components/BlogPostCard.js b/themes/hexo/components/BlogPostCard.js index 47b7f8b8..ba901793 100644 --- a/themes/hexo/components/BlogPostCard.js +++ b/themes/hexo/components/BlogPostCard.js @@ -1,6 +1,6 @@ import LazyImage from '@/components/LazyImage' import { siteConfig } from '@/lib/config' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import CONFIG from '../config' import { BlogPostCardInfo } from './BlogPostCardInfo' @@ -45,7 +45,7 @@ const BlogPostCard = ({ index, post, showSummary, siteInfo }) => { {/* 图片封面 */} {showPageCover && (
        - + <> { className='h-56 w-full object-cover object-center group-hover:scale-110 duration-500' /> - +
        )} diff --git a/themes/hexo/components/BlogPostCardInfo.js b/themes/hexo/components/BlogPostCardInfo.js index 80f8f0f5..71c1ce36 100644 --- a/themes/hexo/components/BlogPostCardInfo.js +++ b/themes/hexo/components/BlogPostCardInfo.js @@ -3,7 +3,7 @@ import NotionPage from '@/components/NotionPage' import TwikooCommentCount from '@/components/TwikooCommentCount' import { siteConfig } from '@/lib/config' import { formatDateFmt } from '@/lib/utils/formatDate' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import TagItemMini from './TagItemMini' /** @@ -24,7 +24,7 @@ export const BlogPostCardInfo = ({

        {/* 标题 */} - )} {post.title} - +

        {/* 分类 */} @@ -43,13 +43,13 @@ export const BlogPostCardInfo = ({ className={`flex mt-2 items-center ${ showPreview ? 'justify-center' : 'justify-start' } flex-wrap dark:text-gray-500 text-gray-400 `}> - {post.category} - + {/* 日期 */} - {post?.publishDay || post.lastEditedDay} - +
        diff --git a/themes/hexo/components/CategoryGroup.js b/themes/hexo/components/CategoryGroup.js index 69aa4c1c..4d0c43d0 100644 --- a/themes/hexo/components/CategoryGroup.js +++ b/themes/hexo/components/CategoryGroup.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' const CategoryGroup = ({ currentCategory, categories }) => { if (!categories) { @@ -9,7 +9,7 @@ const CategoryGroup = ({ currentCategory, categories }) => { {categories.map(category => { const selected = currentCategory === category.name return ( - {
        {category.name}({category.count})
        - + ); })}
        diff --git a/themes/hexo/components/Header.js b/themes/hexo/components/Header.js index 29a83d71..d318c264 100644 --- a/themes/hexo/components/Header.js +++ b/themes/hexo/components/Header.js @@ -1,7 +1,7 @@ import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' import throttle from 'lodash.throttle' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { useCallback, useEffect, useRef, useState } from 'react' import CONFIG from '../config' @@ -106,12 +106,12 @@ const Header = props => { {locale.COMMON.CATEGORY}
        - {locale.COMMON.MORE} - + { {locale.COMMON.TAGS} - {locale.COMMON.MORE} - +
        diff --git a/themes/hexo/components/HexoRecentComments.js b/themes/hexo/components/HexoRecentComments.js index db712bea..f1e59612 100644 --- a/themes/hexo/components/HexoRecentComments.js +++ b/themes/hexo/components/HexoRecentComments.js @@ -2,7 +2,7 @@ import { useEffect, useState } from 'react' import { siteConfig } from '@/lib/config' import Card from '@/themes/hexo/components/Card' import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { RecentComments } from '@waline/client' /** @@ -36,7 +36,7 @@ const HexoRecentComments = (props) => { {!onLoading && comments && comments.length > 0 && comments.map((comment) =>
        - --{comment.nick} + --{comment.nick}
        )} diff --git a/themes/hexo/components/LatestPostsGroup.js b/themes/hexo/components/LatestPostsGroup.js index 5a0a0161..673ea3db 100644 --- a/themes/hexo/components/LatestPostsGroup.js +++ b/themes/hexo/components/LatestPostsGroup.js @@ -1,7 +1,7 @@ import LazyImage from '@/components/LazyImage' import { useGlobal } from '@/lib/global' // import Image from 'next/image' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' /** @@ -34,7 +34,7 @@ const LatestPostsGroup = ({ latestPosts, siteInfo }) => { const selected = currentPath === post?.href return ( - {
        {post.lastEditedDay}
        - + ) })} diff --git a/themes/hexo/components/Logo.js b/themes/hexo/components/Logo.js index 2279834c..b150456c 100644 --- a/themes/hexo/components/Logo.js +++ b/themes/hexo/components/Logo.js @@ -1,5 +1,5 @@ import { siteConfig } from '@/lib/config' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * Logo * 实际值支持文字 @@ -9,14 +9,14 @@ import Link from 'next/link' const Logo = props => { const { siteInfo } = props return ( - +
        {' '} {siteInfo?.title || siteConfig('TITLE')}
        - +
        ) } export default Logo diff --git a/themes/hexo/components/MenuGroupCard.js b/themes/hexo/components/MenuGroupCard.js index de0368e2..28675cc1 100644 --- a/themes/hexo/components/MenuGroupCard.js +++ b/themes/hexo/components/MenuGroupCard.js @@ -1,6 +1,6 @@ import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import CONFIG from '../config' const MenuGroupCard = props => { @@ -46,7 +46,7 @@ const MenuGroupCard = props => { {links.map(link => { if (link.show) { return ( - {
        {link.name}
        {link.slot}
        - + ) } else { return null diff --git a/themes/hexo/components/MenuItemCollapse.js b/themes/hexo/components/MenuItemCollapse.js index 0281388f..d01d98b2 100644 --- a/themes/hexo/components/MenuItemCollapse.js +++ b/themes/hexo/components/MenuItemCollapse.js @@ -1,5 +1,5 @@ import Collapse from '@/components/Collapse' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useState } from 'react' /** @@ -32,7 +32,7 @@ export const MenuItemCollapse = props => { className='w-full px-8 py-3 dark:hover:bg-indigo-500 hover:bg-indigo-500 hover:text-white text-left dark:bg-hexo-black-gray' onClick={toggleShow}> {!hasSubMenu && ( - @@ -40,7 +40,7 @@ export const MenuItemCollapse = props => { {link?.icon && } {link?.name} - + )} {hasSubMenu && (
        {
        - + {link?.icon && }{' '} {sLink.title} - +
        ) })} diff --git a/themes/hexo/components/MenuItemDrop.js b/themes/hexo/components/MenuItemDrop.js index 09d4eb3b..594c1f70 100644 --- a/themes/hexo/components/MenuItemDrop.js +++ b/themes/hexo/components/MenuItemDrop.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useState } from 'react' /** * 支持二级展开的菜单 @@ -18,13 +18,13 @@ export const MenuItemDrop = ({ link }) => { onMouseOver={() => changeShow(true)} onMouseOut={() => changeShow(false)}> {!hasSubMenu && ( - {link?.icon && } {link?.name} {hasSubMenu && } - + )} {hasSubMenu && ( @@ -51,12 +51,12 @@ export const MenuItemDrop = ({ link }) => {
      • - + {link?.icon &&   } {sLink.title} - +
      • ) })} diff --git a/themes/hexo/components/NavButtonGroup.js b/themes/hexo/components/NavButtonGroup.js index 8539eb49..8d671a7a 100644 --- a/themes/hexo/components/NavButtonGroup.js +++ b/themes/hexo/components/NavButtonGroup.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 首页导航大按钮组件 @@ -15,14 +15,14 @@ const NavButtonGroup = (props) => { diff --git a/themes/hexo/components/PaginationNumber.js b/themes/hexo/components/PaginationNumber.js index 57d755dd..2179500d 100644 --- a/themes/hexo/components/PaginationNumber.js +++ b/themes/hexo/components/PaginationNumber.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' /** @@ -22,7 +22,7 @@ const PaginationNumber = ({ page, totalPage }) => { return (
        {/* 上一页 */} - { rel='prev' className={`${currentPage === 1 ? 'invisible' : 'block'} pb-0.5 hover:bg-indigo-400 hover:text-white w-6 text-center cursor-pointer duration-200 hover:font-bold`}> - + {pages} {/* 下一页 */} - { rel='next' className={`${+showNext ? 'block' : 'invisible'} pb-0.5 hover:bg-indigo-400 hover:text-white w-6 text-center cursor-pointer duration-200 hover:font-bold`}> - +
        ) } @@ -61,7 +61,7 @@ const PaginationNumber = ({ page, totalPage }) => { function getPageElement(page, currentPage, pagePrefix) { const selected = page + '' === currentPage + '' return ( - {page} - + ) } diff --git a/themes/hexo/components/PostHero.js b/themes/hexo/components/PostHero.js index 4cedf597..ec6b797c 100644 --- a/themes/hexo/components/PostHero.js +++ b/themes/hexo/components/PostHero.js @@ -3,7 +3,7 @@ import NotionIcon from '@/components/NotionIcon' import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' import { formatDateFmt } from '@/lib/utils/formatDate' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import TagItemMini from './TagItemMini' /** @@ -38,14 +38,14 @@ export default function PostHero({ post, siteInfo }) {
        {post.category && ( <> -
        {post.category}
        - + )}
        @@ -62,12 +62,12 @@ export default function PostHero({ post, siteInfo }) {
        {post?.type !== 'Page' && ( <> - {locale.COMMON.POST_TIME}: {post?.publishDay} - + )}
        diff --git a/themes/hexo/components/SearchNav.js b/themes/hexo/components/SearchNav.js index 359f5c8c..0cad9d57 100644 --- a/themes/hexo/components/SearchNav.js +++ b/themes/hexo/components/SearchNav.js @@ -1,5 +1,5 @@ import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useEffect, useRef } from 'react' import Card from './Card' import SearchInput from './SearchInput' @@ -31,7 +31,7 @@ export default function SearchNav(props) {
        {categoryOptions?.map(category => { return ( - {category.name}({category.count})
        - + ) })}
        diff --git a/themes/hexo/components/SlotBar.js b/themes/hexo/components/SlotBar.js index a41b0695..4e4879ec 100644 --- a/themes/hexo/components/SlotBar.js +++ b/themes/hexo/components/SlotBar.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 博客列表上方嵌入条 @@ -10,10 +10,10 @@ export default function SlotBar(props) { if (tag) { return
        -
        #{tag}
        - +
        } else if (category) { return
        diff --git a/themes/hexo/components/TagItemMini.js b/themes/hexo/components/TagItemMini.js index 32221ea4..98f6dad2 100644 --- a/themes/hexo/components/TagItemMini.js +++ b/themes/hexo/components/TagItemMini.js @@ -1,8 +1,8 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' const TagItemMini = ({ tag, selected = false }) => { return ( - {
        {selected && } {tag.name + (tag.count ? `(${tag.count})` : '')}
        - + ); } diff --git a/themes/hexo/index.js b/themes/hexo/index.js index 30d0fc46..8e8c33b3 100644 --- a/themes/hexo/index.js +++ b/themes/hexo/index.js @@ -7,7 +7,7 @@ import { useGlobal } from '@/lib/global' import { isBrowser } from '@/lib/utils' import { Transition } from '@headlessui/react' import dynamic from 'next/dynamic' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { createContext, useContext, useEffect, useRef } from 'react' import ArticleAdjacent from './components/ArticleAdjacent' @@ -377,7 +377,7 @@ const LayoutCategoryIndex = props => {
        {categoryOptions?.map(category => { return ( - { {category.name}( {category.count})
        - + ) })}
        diff --git a/themes/landing/components/Footer.js b/themes/landing/components/Footer.js index 3f27b76f..98c00fe1 100644 --- a/themes/landing/components/Footer.js +++ b/themes/landing/components/Footer.js @@ -1,5 +1,5 @@ import { subscribeToNewsletter } from '@/lib/plugins/mailchimp' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useEffect, useRef, useState } from 'react' import CONFIG from '../config' import Logo from './Logo' @@ -45,7 +45,7 @@ export default function Footer() {
        - 服务条款 · 隐私政策 + 服务条款 · 隐私政策
        diff --git a/themes/landing/components/Header.js b/themes/landing/components/Header.js index 2b71d944..a6b9c2e0 100644 --- a/themes/landing/components/Header.js +++ b/themes/landing/components/Header.js @@ -2,7 +2,7 @@ import { useState, useEffect } from 'react' import { siteConfig } from '@/lib/config' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import Logo from './Logo' import MobileMenu from './MobileMenu' import CONFIG from '../config' @@ -36,17 +36,17 @@ export default function Header() { {/* Desktop sign in links */}
        • - +
          {siteConfig('LANDING_HEADER_BUTTON_1_TITLE', null, CONFIG)}
          - +
        • - + {siteConfig('LANDING_HEADER_BUTTON_2_TITLE', null, CONFIG)} - +
        diff --git a/themes/landing/components/Logo.js b/themes/landing/components/Logo.js index 313d7656..aec60abf 100644 --- a/themes/landing/components/Logo.js +++ b/themes/landing/components/Logo.js @@ -1,8 +1,8 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' export default function Logo() { return ( - + - + ) } diff --git a/themes/landing/components/MobileMenu.js b/themes/landing/components/MobileMenu.js index c61e325b..9d1be106 100644 --- a/themes/landing/components/MobileMenu.js +++ b/themes/landing/components/MobileMenu.js @@ -2,7 +2,7 @@ import { useState, useRef, useEffect } from 'react' import { Transition } from '@headlessui/react' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import CONFIG from '../config' import { siteConfig } from '@/lib/config' @@ -67,17 +67,17 @@ export default function MobileMenu() { >
        • - setMobileNavOpen(false)}> + setMobileNavOpen(false)}>
          {siteConfig('LANDING_HEADER_BUTTON_1_TITLE', null, CONFIG)}
          - +
        • - setMobileNavOpen(false)}> + setMobileNavOpen(false)}> {siteConfig('LANDING_HEADER_BUTTON_2_TITLE', null, CONFIG)} - +
        diff --git a/themes/landing/components/Pricing.js b/themes/landing/components/Pricing.js index 973c6a1b..4a99242d 100644 --- a/themes/landing/components/Pricing.js +++ b/themes/landing/components/Pricing.js @@ -1,6 +1,6 @@ import { siteConfig } from '@/lib/config' import CONFIG from '../config' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 价格收费表 @@ -21,9 +21,9 @@ export const Pricing = (props) => { )}
      - + - +
      @@ -34,9 +34,9 @@ export const Pricing = (props) => { )}
    - + - +
    @@ -47,9 +47,9 @@ export const Pricing = (props) => { )}
    - + - +
    diff --git a/themes/magzine/components/BannerItem.js b/themes/magzine/components/BannerItem.js index b83f79f5..732a4b7d 100644 --- a/themes/magzine/components/BannerItem.js +++ b/themes/magzine/components/BannerItem.js @@ -1,5 +1,5 @@ import { siteConfig } from '@/lib/config' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import CONFIG from '../config' /** @@ -28,7 +28,7 @@ export default function BannerItem() {

    {description}

    {button && (
    - {text} + {text}
    )} {tips} diff --git a/themes/magzine/components/CategoryGroup.js b/themes/magzine/components/CategoryGroup.js index 5f2d8b68..c37f5e2c 100644 --- a/themes/magzine/components/CategoryGroup.js +++ b/themes/magzine/components/CategoryGroup.js @@ -1,5 +1,5 @@ import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 分类 @@ -18,7 +18,7 @@ const CategoryGroup = ({ currentCategory, categoryOptions }) => { {categoryOptions?.map((category, index) => { const selected = currentCategory === category.name return ( - { {category.name} {category?.count && `(${category?.count})`} - + ) })} diff --git a/themes/magzine/components/CategoryItem.js b/themes/magzine/components/CategoryItem.js index f4cff30b..f7978853 100644 --- a/themes/magzine/components/CategoryItem.js +++ b/themes/magzine/components/CategoryItem.js @@ -1,8 +1,8 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' export default function CategoryItem({ selected, category, categoryCount }) { return ( - {category} {categoryCount && `(${categoryCount})`} - + ) } diff --git a/themes/magzine/components/Footer.js b/themes/magzine/components/Footer.js index 47a11a20..27a48254 100644 --- a/themes/magzine/components/Footer.js +++ b/themes/magzine/components/Footer.js @@ -7,7 +7,7 @@ import LazyImage from '@/components/LazyImage' import PoweredBy from '@/components/PoweredBy' import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import CONFIG from '../config' import SocialButton from './SocialButton' @@ -56,9 +56,9 @@ const Footer = ({ title }) => { {group?.menus?.map((menu, index) => { return (
    - + {menu.title} - +
    ) })} diff --git a/themes/magzine/components/LeftMenuBar.js b/themes/magzine/components/LeftMenuBar.js index 6bde6c51..6f9da093 100644 --- a/themes/magzine/components/LeftMenuBar.js +++ b/themes/magzine/components/LeftMenuBar.js @@ -1,14 +1,14 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' export default function LeftMenuBar () { return (
    - +
    - +
    ); diff --git a/themes/magzine/components/LogoBar.js b/themes/magzine/components/LogoBar.js index 25490c47..80bb0632 100644 --- a/themes/magzine/components/LogoBar.js +++ b/themes/magzine/components/LogoBar.js @@ -1,13 +1,13 @@ import LazyImage from '@/components/LazyImage' import { siteConfig } from '@/lib/config' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' export default function LogoBar({ siteInfo, className }) { return (
    - {siteConfig('TITLE')} - +
    ) } diff --git a/themes/magzine/components/MenuItemCollapse.js b/themes/magzine/components/MenuItemCollapse.js index 56329755..523ff790 100644 --- a/themes/magzine/components/MenuItemCollapse.js +++ b/themes/magzine/components/MenuItemCollapse.js @@ -1,5 +1,5 @@ import Collapse from '@/components/Collapse' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { useEffect, useState } from 'react' @@ -47,7 +47,7 @@ export const MenuItemCollapse = props => { } onClick={toggleShow}> {!hasSubMenu && ( - @@ -55,7 +55,7 @@ export const MenuItemCollapse = props => {
    {link.name}
    - + )} {hasSubMenu && ( @@ -84,14 +84,14 @@ export const MenuItemCollapse = props => { className=' not:last-child:border-b-0 border-b dark:border-gray-800 py-2 pl-12 cursor-pointer hover:bg-gray-100 dark:text-gray-200 dark:bg-black text-left justify-start text-gray-600 bg-gray-50 dark:hover:bg-gray-900 tracking-widest transition-all duration-200'> - +
    {sLink.title}
    - +
    ) })} diff --git a/themes/magzine/components/MenuItemDrop.js b/themes/magzine/components/MenuItemDrop.js index f0dcde4c..09f2a6b5 100644 --- a/themes/magzine/components/MenuItemDrop.js +++ b/themes/magzine/components/MenuItemDrop.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { useState } from 'react' @@ -43,9 +43,9 @@ export const MenuItemDrop = ({ link }) => { ? 'bg-gray-600 text-white hover:text-white' : 'hover:text-gray-600') }> - + {link?.icon && } {link?.name} - + )} @@ -58,12 +58,12 @@ export const MenuItemDrop = ({ link }) => {
  • - + {link?.icon && } {sLink.title} - +
  • ) })} diff --git a/themes/magzine/components/MenuItemMobileNormal.js b/themes/magzine/components/MenuItemMobileNormal.js index 33569bfb..63e496af 100644 --- a/themes/magzine/components/MenuItemMobileNormal.js +++ b/themes/magzine/components/MenuItemMobileNormal.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' export const NormalMenu = props => { @@ -12,7 +12,7 @@ export const NormalMenu = props => { const selected = router.pathname === link.href || router.asPath === link.href return ( - {
    {link.name}
    {link.slot} - +
    ) } diff --git a/themes/magzine/components/MenuItemPCNormal.js b/themes/magzine/components/MenuItemPCNormal.js index e93ca07f..a88d2632 100644 --- a/themes/magzine/components/MenuItemPCNormal.js +++ b/themes/magzine/components/MenuItemPCNormal.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' export const MenuItemPCNormal = props => { @@ -10,7 +10,7 @@ export const MenuItemPCNormal = props => { } return ( - {
    {link.name}
    {link.slot} - + ) } diff --git a/themes/magzine/components/PaginationSimple.js b/themes/magzine/components/PaginationSimple.js index 0fcbebab..6ae9f2ab 100644 --- a/themes/magzine/components/PaginationSimple.js +++ b/themes/magzine/components/PaginationSimple.js @@ -1,5 +1,5 @@ import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' /** @@ -21,7 +21,7 @@ const PaginationSimple = ({ page, totalPage }) => { return (
    - { currentPage === 1 ? 'invisible' : 'block' } text-center w-full duration-200 px-4 py-2 hover:border-gray-500 border-b-2 hover:font-bold`}> ←{locale.PAGINATION.PREV} - - + { +showNext ? 'block' : 'invisible' } text-center w-full duration-200 px-4 py-2 hover:border-gray-500 border-b-2 hover:font-bold`}> {locale.PAGINATION.NEXT}→ - +
    ) } diff --git a/themes/magzine/components/PostGroupLatest.js b/themes/magzine/components/PostGroupLatest.js index c354af17..1dcdb5c9 100644 --- a/themes/magzine/components/PostGroupLatest.js +++ b/themes/magzine/components/PostGroupLatest.js @@ -2,7 +2,7 @@ import LazyImage from '@/components/LazyImage' import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' // import Image from 'next/image' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' /** @@ -38,7 +38,7 @@ const PostGroupLatest = props => { : siteInfo?.pageCover return ( - {
    {post.lastEditedDay}
    - + ) })} diff --git a/themes/magzine/components/PostItemCard.js b/themes/magzine/components/PostItemCard.js index 09a9352a..d0b2799b 100644 --- a/themes/magzine/components/PostItemCard.js +++ b/themes/magzine/components/PostItemCard.js @@ -3,7 +3,7 @@ import NotionIcon from '@/components/NotionIcon' import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' import { formatDateFmt } from '@/lib/utils/formatDate' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import CategoryItem from './CategoryItem' /** @@ -17,7 +17,7 @@ const PostItemCard = ({ post }) => {
    {siteConfig('MAGZINE_POST_LIST_COVER') && ( - { className='w-full h-40 aspect-video object-cover' />
    - + )} {siteConfig('MAGZINE_POST_LIST_CATEGORY') && ( )} - { )} {post.title} - +
    {formatDateFmt(post.publishDate, 'yyyy-MM')} diff --git a/themes/magzine/components/PostItemCardSimple.js b/themes/magzine/components/PostItemCardSimple.js index 924876e6..026ad0f7 100644 --- a/themes/magzine/components/PostItemCardSimple.js +++ b/themes/magzine/components/PostItemCardSimple.js @@ -1,6 +1,6 @@ import NotionIcon from '@/components/NotionIcon' import { siteConfig } from '@/lib/config' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import CategoryItem from './CategoryItem' /** @@ -20,7 +20,7 @@ const PostItemCardSimple = ({ post }) => {
    {/* 文章标题 */} - { {siteConfig('POST_TITLE_ICON') && } {post.title} - +
    {post.date?.start_date}
    diff --git a/themes/magzine/components/PostItemCardTop.js b/themes/magzine/components/PostItemCardTop.js index 9462507f..25dde622 100644 --- a/themes/magzine/components/PostItemCardTop.js +++ b/themes/magzine/components/PostItemCardTop.js @@ -3,7 +3,7 @@ import NotionIcon from '@/components/NotionIcon' import NotionPage from '@/components/NotionPage' import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import CONFIG from '../config' import CategoryItem from './CategoryItem' import TagItemMini from './TagItemMini' @@ -28,7 +28,7 @@ const PostItemCardTop = ({ post, showSummary }) => {
    {siteConfig('MAGZINE_POST_LIST_COVER', true, CONFIG) && post?.pageCoverThumbnail && ( - { className='w-full h-80 object-cover hover:scale-125 duration-150' />
    - + )}
    @@ -60,7 +60,7 @@ const PostItemCardTop = ({ post, showSummary }) => {
    - { )} {post?.title} - +
    @@ -87,13 +87,13 @@ const PostItemCardTop = ({ post, showSummary }) => {
    - {locale.COMMON.ARTICLE_DETAIL} - +
    diff --git a/themes/magzine/components/PostItemCardWide.js b/themes/magzine/components/PostItemCardWide.js index 2aec9a8e..47a63ce6 100644 --- a/themes/magzine/components/PostItemCardWide.js +++ b/themes/magzine/components/PostItemCardWide.js @@ -3,7 +3,7 @@ import NotionIcon from '@/components/NotionIcon' import NotionPage from '@/components/NotionPage' import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import CategoryItem from './CategoryItem' /** @@ -21,7 +21,7 @@ const PostItemCardWide = ({ post, showSummary }) => { {siteConfig('MAGZINE_POST_LIST_CATEGORY') && ( )} - { )} {post?.title} - + {(!showPreview || showSummary) && (
    @@ -46,13 +46,13 @@ const PostItemCardWide = ({ post, showSummary }) => {
    - {locale.COMMON.ARTICLE_DETAIL} - +
    diff --git a/themes/magzine/components/PostListHorizontal.js b/themes/magzine/components/PostListHorizontal.js index 5e5544df..3dc65bdf 100644 --- a/themes/magzine/components/PostListHorizontal.js +++ b/themes/magzine/components/PostListHorizontal.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import PostItemCard from './PostItemCard' import PostListEmpty from './PostListEmpty' import Swiper from './Swiper' @@ -23,12 +23,12 @@ const PostListHorizontal = ({ title, href, posts, hasBg }) => {

    {title}

    {href && ( - 查看全部 - + )}
    {/* 列表 */} @@ -40,10 +40,10 @@ const PostListHorizontal = ({ title, href, posts, hasBg }) => {
    {href && ( - + 查看全部 - + )}
    diff --git a/themes/magzine/components/PostListSimpleHorizontal.js b/themes/magzine/components/PostListSimpleHorizontal.js index 2268a428..30a7aac5 100644 --- a/themes/magzine/components/PostListSimpleHorizontal.js +++ b/themes/magzine/components/PostListSimpleHorizontal.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import PostItemCardSimple from './PostItemCardSimple' import PostListEmpty from './PostListEmpty' @@ -19,12 +19,12 @@ const PostSimpleListHorizontal = ({ title, href, posts }) => {

    {title}

    {href && ( - 查看全部 - + )}
    {/* 列表 */} @@ -34,10 +34,10 @@ const PostSimpleListHorizontal = ({ title, href, posts }) => { })} {href && ( - + 查看全部 - + )} diff --git a/themes/magzine/components/PostNavAround.js b/themes/magzine/components/PostNavAround.js index 754e1257..657bb9c4 100644 --- a/themes/magzine/components/PostNavAround.js +++ b/themes/magzine/components/PostNavAround.js @@ -1,6 +1,6 @@ import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { useEffect, useState } from 'react' @@ -63,7 +63,7 @@ export default function PostNavAround({ prev, next }) {
    {/* 移动端 */}
    - @@ -71,8 +71,8 @@ export default function PostNavAround({ prev, next }) {
    {prev.title}
    - - + @@ -80,7 +80,7 @@ export default function PostNavAround({ prev, next }) {
    {next.title}
    - +
    {/* 桌面端 */} @@ -88,13 +88,13 @@ export default function PostNavAround({ prev, next }) {
    ) diff --git a/themes/magzine/components/TagItemMini.js b/themes/magzine/components/TagItemMini.js index e8e2987c..93f94311 100644 --- a/themes/magzine/components/TagItemMini.js +++ b/themes/magzine/components/TagItemMini.js @@ -1,8 +1,8 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' const TagItemMini = ({ tag, selected = false }) => { return ( - { {/* {selected && } */}# {tag.name + (tag.count ? `(${tag.count})` : '')}{' '} - + ) } diff --git a/themes/magzine/components/TouchMeCard.js b/themes/magzine/components/TouchMeCard.js index a2a46c1c..16613949 100644 --- a/themes/magzine/components/TouchMeCard.js +++ b/themes/magzine/components/TouchMeCard.js @@ -1,6 +1,6 @@ import FlipCard from '@/components/FlipCard' import { siteConfig } from '@/lib/config' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import CONFIG from '../config' /** @@ -28,11 +28,11 @@ export default function TouchMeCard() { } backContent={ - +
    {siteConfig('MAGZINE_SOCIAL_CARD_TITLE_3')}
    - +
    } /> diff --git a/themes/magzine/index.js b/themes/magzine/index.js index 8a0496cd..d581b1ab 100644 --- a/themes/magzine/index.js +++ b/themes/magzine/index.js @@ -12,7 +12,7 @@ import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' import { isBrowser } from '@/lib/utils' import { SignIn, SignUp } from '@clerk/nextjs' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { createContext, useContext, useEffect, useRef, useState } from 'react' import ArticleInfo from './components/ArticleInfo' @@ -415,7 +415,7 @@ const LayoutCategoryIndex = props => {
    {categoryOptions?.map(category => { return ( - { {/* */} {category.name}({category.count})
    - + ) })} diff --git a/themes/matery/components/ArticleCopyright.js b/themes/matery/components/ArticleCopyright.js index 64fe19e5..b3c15b9f 100644 --- a/themes/matery/components/ArticleCopyright.js +++ b/themes/matery/components/ArticleCopyright.js @@ -1,5 +1,5 @@ import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { useEffect, useState } from 'react' import CONFIG from '../config' @@ -24,9 +24,9 @@ export default function ArticleCopyright() {
    • {locale.COMMON.AUTHOR}: - + {siteConfig('AUTHOR')} - +
    • {locale.COMMON.URL}: diff --git a/themes/matery/components/ArticleInfo.js b/themes/matery/components/ArticleInfo.js index 010d5e85..a098e4cf 100644 --- a/themes/matery/components/ArticleInfo.js +++ b/themes/matery/components/ArticleInfo.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useGlobal } from '@/lib/global' import TagItemMiddle from './TagItemMiddle' import { formatDateFmt } from '@/lib/utils/formatDate' @@ -24,13 +24,13 @@ export const ArticleInfo = props => {
      {post?.type !== 'Page' && ( <> - {' '} {locale.COMMON.POST_TIME}: {post?.publishDay} - + {locale.COMMON.LAST_EDITED_TIME}: {post.lastEditedDay} diff --git a/themes/matery/components/ArticleRecommend.js b/themes/matery/components/ArticleRecommend.js index 58fd7398..8348e5a8 100644 --- a/themes/matery/components/ArticleRecommend.js +++ b/themes/matery/components/ArticleRecommend.js @@ -1,7 +1,7 @@ import LazyImage from '@/components/LazyImage' import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import CONFIG from '../config' /** @@ -35,7 +35,7 @@ export default function ArticleRecommend({ recommendPosts, siteInfo }) { : siteInfo?.pageCover return ( -
      - + ) })} diff --git a/themes/matery/components/BlogListBar.js b/themes/matery/components/BlogListBar.js index 8453e7ea..82449d36 100644 --- a/themes/matery/components/BlogListBar.js +++ b/themes/matery/components/BlogListBar.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useGlobal } from '@/lib/global' import TagItemMiddle from './TagItemMiddle' @@ -13,12 +13,12 @@ export default function BlogListBar(props) { {categoryOptions?.map(e => { const selected = e.name === category return ( - +
      {e.name}({e.count})
      - +
      ) })} diff --git a/themes/matery/components/BlogPostArchive.js b/themes/matery/components/BlogPostArchive.js index e296eaef..b18b6797 100644 --- a/themes/matery/components/BlogPostArchive.js +++ b/themes/matery/components/BlogPostArchive.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 博客归档列表 @@ -27,12 +27,12 @@ const BlogPostArchive = ({ posts = [], archiveTitle }) => {
      {post.date?.start_date}{' '}   - {post.title} - +
    • ) diff --git a/themes/matery/components/BlogPostCard.js b/themes/matery/components/BlogPostCard.js index 8d10fdf4..45b35929 100644 --- a/themes/matery/components/BlogPostCard.js +++ b/themes/matery/components/BlogPostCard.js @@ -3,7 +3,7 @@ import NotionIcon from '@/components/NotionIcon' import TwikooCommentCount from '@/components/TwikooCommentCount' import { siteConfig } from '@/lib/config' import { formatDateFmt } from '@/lib/utils/formatDate' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import CONFIG from '../config' import TagItemMini from './TagItemMini' @@ -36,7 +36,7 @@ const BlogPostCard = ({ index, post, showSummary, siteInfo }) => {
      {/* 头部图片 填充卡片 */} {showPageCover && ( - +
      {
      - +
      )} {/* 文字描述 */} @@ -69,25 +69,25 @@ const BlogPostCard = ({ index, post, showSummary, siteInfo }) => {
      - {post.date?.start_date || post.lastEditedDay} - +
      - {post.category} - +
      diff --git a/themes/matery/components/CategoryGroup.js b/themes/matery/components/CategoryGroup.js index 62046784..65bc7c67 100644 --- a/themes/matery/components/CategoryGroup.js +++ b/themes/matery/components/CategoryGroup.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' const CategoryGroup = ({ currentCategory, categories }) => { if (!categories) { @@ -9,7 +9,7 @@ const CategoryGroup = ({ currentCategory, categories }) => { {categories.map(category => { const selected = currentCategory === category.name return ( - {
      {category.name}({category.count})
      - + ) })} diff --git a/themes/matery/components/Header.js b/themes/matery/components/Header.js index d6c195f8..127de271 100644 --- a/themes/matery/components/Header.js +++ b/themes/matery/components/Header.js @@ -2,7 +2,7 @@ import SideBarDrawer from '@/components/SideBarDrawer' import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' import throttle from 'lodash.throttle' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { useCallback, useEffect, useRef, useState } from 'react' import CONFIG from '../config' @@ -108,12 +108,12 @@ const Header = props => { {locale.COMMON.CATEGORY} - {locale.COMMON.MORE} - + { {locale.COMMON.TAGS} - {locale.COMMON.MORE} - +
      diff --git a/themes/matery/components/HexoRecentComments.js b/themes/matery/components/HexoRecentComments.js index 29dedb38..7d0c8291 100644 --- a/themes/matery/components/HexoRecentComments.js +++ b/themes/matery/components/HexoRecentComments.js @@ -2,7 +2,7 @@ import { useEffect, useState } from 'react' import { siteConfig } from '@/lib/config' import Card from '@/themes/hexo/components/Card' import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { RecentComments } from '@waline/client' /** @@ -35,7 +35,7 @@ const HexoRecentComments = (props) => { {!onLoading && comments && comments.length === 0 &&
      No Comments
      } {!onLoading && comments && comments.length > 0 && comments.map((comment) =>
      -
      --{comment.nick}
      +
      --{comment.nick}
      )} diff --git a/themes/matery/components/Logo.js b/themes/matery/components/Logo.js index a1082ae3..2d55fa03 100644 --- a/themes/matery/components/Logo.js +++ b/themes/matery/components/Logo.js @@ -1,5 +1,5 @@ import { siteConfig } from '@/lib/config' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 站点logo * 这里默认只支持纯文字 @@ -9,14 +9,14 @@ import Link from 'next/link' const Logo = props => { const { siteInfo } = props return ( - +
      {' '} {siteInfo?.title || siteConfig('TITLE')}
      - +
      ) } export default Logo diff --git a/themes/matery/components/MenuGroupCard.js b/themes/matery/components/MenuGroupCard.js index 4aafb5d9..88079ae4 100644 --- a/themes/matery/components/MenuGroupCard.js +++ b/themes/matery/components/MenuGroupCard.js @@ -1,6 +1,6 @@ import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import CONFIG from '../config' const MenuGroupCard = props => { @@ -36,7 +36,7 @@ const MenuGroupCard = props => { {links.map(link => { if (link.show) { return ( - {
      {link.name}
      {link.slot}
      - + ) } else { return null diff --git a/themes/matery/components/MenuItemCollapse.js b/themes/matery/components/MenuItemCollapse.js index d1f5017b..a81c373e 100644 --- a/themes/matery/components/MenuItemCollapse.js +++ b/themes/matery/components/MenuItemCollapse.js @@ -1,5 +1,5 @@ import Collapse from '@/components/Collapse' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { useState } from 'react' @@ -40,7 +40,7 @@ export const MenuItemCollapse = ({ link }) => { : ' text-black dark:text-white ') }> {!hasSubMenu && ( - +
      {link.icon && ( @@ -48,7 +48,7 @@ export const MenuItemCollapse = ({ link }) => {
      {link.name}
      {link.slot} - +
      )} {hasSubMenu && ( @@ -73,12 +73,12 @@ export const MenuItemCollapse = ({ link }) => {
      - + {sLink.title} - +
      ) })} diff --git a/themes/matery/components/MenuItemDrop.js b/themes/matery/components/MenuItemDrop.js index 15e02a02..cd642acf 100644 --- a/themes/matery/components/MenuItemDrop.js +++ b/themes/matery/components/MenuItemDrop.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useState } from 'react' /** * 菜单 @@ -17,13 +17,13 @@ export const MenuItemDrop = ({ link }) => { onMouseOver={() => changeShow(true)} onMouseOut={() => changeShow(false)}> {!hasSubMenu && ( - {link?.icon && } {link?.name} {hasSubMenu && } - + )} {hasSubMenu && ( @@ -50,12 +50,12 @@ export const MenuItemDrop = ({ link }) => {
    • - + {link?.icon &&   } {sLink.title} - +
    • ) })} diff --git a/themes/matery/components/MenuItemNormal.js b/themes/matery/components/MenuItemNormal.js index 0254089b..4af05062 100644 --- a/themes/matery/components/MenuItemNormal.js +++ b/themes/matery/components/MenuItemNormal.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' export const MenuItemNormal = props => { @@ -8,7 +8,7 @@ export const MenuItemNormal = props => { const selected = router.pathname === link.href || router.asPath === link.href return ( - {
      {link.name}
      {link.slot} - + ) } diff --git a/themes/matery/components/MenuList.js b/themes/matery/components/MenuList.js index ecd306c1..44f22767 100644 --- a/themes/matery/components/MenuList.js +++ b/themes/matery/components/MenuList.js @@ -1,6 +1,6 @@ import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import CONFIG from '../config' @@ -58,7 +58,7 @@ const MenuList = props => { const selected = router.pathname === link.href || router.asPath === link.href return ( - {
      {link.name}
      {link.slot} - + ) } else { return null diff --git a/themes/matery/components/NavButtonGroup.js b/themes/matery/components/NavButtonGroup.js index 1b0d471e..06891e99 100644 --- a/themes/matery/components/NavButtonGroup.js +++ b/themes/matery/components/NavButtonGroup.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 首页导航大按钮组件 @@ -15,14 +15,14 @@ const NavButtonGroup = (props) => { diff --git a/themes/matery/components/PaginationNumber.js b/themes/matery/components/PaginationNumber.js index 42281b93..7c551cec 100644 --- a/themes/matery/components/PaginationNumber.js +++ b/themes/matery/components/PaginationNumber.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' /** @@ -18,7 +18,7 @@ const PaginationNumber = ({ page, totalPage }) => { return (
      {/* 上一页 */} - { - + {pages} {/* 下一页 */} - { - +
      ) } function getPageElement(page, currentPage, pagePrefix) { return ( - () + ) ) } diff --git a/themes/matery/components/PaginationSimple.js b/themes/matery/components/PaginationSimple.js index df2a3f1a..0f343346 100644 --- a/themes/matery/components/PaginationSimple.js +++ b/themes/matery/components/PaginationSimple.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' /** @@ -15,7 +15,7 @@ const PaginationSimple = ({ page, totalPage }) => { const pagePrefix = router.asPath.split('?')[0].replace(/\/page\/[1-9]\d*/, '').replace(/\/$/, '') return (
      - { } duration-200 px-3.5 py-2 hover:border-black rounded-full`} > - - + { > - +
      ) } diff --git a/themes/matery/components/SearchNav.js b/themes/matery/components/SearchNav.js index fb13f6ae..f829d0df 100644 --- a/themes/matery/components/SearchNav.js +++ b/themes/matery/components/SearchNav.js @@ -2,7 +2,7 @@ import SearchInput from './SearchInput' import TagItemMini from './TagItemMini' import Card from './Card' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useEffect, useRef } from 'react' import { useGlobal } from '@/lib/global' @@ -34,11 +34,11 @@ export default function SearchNave(props) {
      {categoryOptions?.map(category => { return ( - +
      {category.name}({category.count})
      - +
      ) })}
      diff --git a/themes/matery/components/TagItemMiddle.js b/themes/matery/components/TagItemMiddle.js index 8da44092..7cddd701 100644 --- a/themes/matery/components/TagItemMiddle.js +++ b/themes/matery/components/TagItemMiddle.js @@ -1,8 +1,8 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' const TagItemMiddle = ({ tag, selected = false }) => { return ( - { {selected && } {tag.name + (tag.count ? `(${tag.count})` : '')} - + ) } diff --git a/themes/matery/components/TagItemMini.js b/themes/matery/components/TagItemMini.js index 28a1d970..fd7b2fb1 100644 --- a/themes/matery/components/TagItemMini.js +++ b/themes/matery/components/TagItemMini.js @@ -1,8 +1,8 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' const TagItemMini = ({ tag, selected = false }) => { return ( - {
      {selected && } {tag.name + (tag.count ? `(${tag.count})` : '')}
      - + ) } diff --git a/themes/matery/index.js b/themes/matery/index.js index 25234e7c..6ae66215 100644 --- a/themes/matery/index.js +++ b/themes/matery/index.js @@ -10,7 +10,7 @@ import { useGlobal } from '@/lib/global' import { loadWowJS } from '@/lib/plugins/wow' import { isBrowser } from '@/lib/utils' import dynamic from 'next/dynamic' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { createContext, useContext, useEffect, useRef } from 'react' import Announcement from './components/Announcement' @@ -359,7 +359,7 @@ const LayoutCategoryIndex = props => {
      {categoryOptions?.map(e => { return ( - {
      {e.name}({e.count})
      - + ) })}
      diff --git a/themes/medium/components/ArticleAround.js b/themes/medium/components/ArticleAround.js index 95b6f83f..27b54681 100644 --- a/themes/medium/components/ArticleAround.js +++ b/themes/medium/components/ArticleAround.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 上一篇,下一篇文章 @@ -11,22 +11,22 @@ export default function ArticleAround ({ prev, next }) { } return (
      - {prev.title} - - + {next.title} - +
      ) } diff --git a/themes/medium/components/ArticleInfo.js b/themes/medium/components/ArticleInfo.js index c1961fb6..45b7f3f9 100644 --- a/themes/medium/components/ArticleInfo.js +++ b/themes/medium/components/ArticleInfo.js @@ -1,5 +1,5 @@ import LazyImage from '@/components/LazyImage' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { siteConfig } from '@/lib/config' import NotionIcon from '@/components/NotionIcon' @@ -25,7 +25,7 @@ export default function ArticleInfo(props) { - +
      @@ -33,7 +33,7 @@ export default function ArticleInfo(props) { {siteConfig('AUTHOR')}
      - +
      ) } diff --git a/themes/medium/components/BlogArchiveItem.js b/themes/medium/components/BlogArchiveItem.js index 7d7b5a1c..a6d77c51 100644 --- a/themes/medium/components/BlogArchiveItem.js +++ b/themes/medium/components/BlogArchiveItem.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 归档分组 @@ -20,12 +20,12 @@ export default function BlogArchiveItem({ archiveTitle, archivePosts }) {
      {post.date?.start_date}{' '}   - {post.title} - +
      ) diff --git a/themes/medium/components/BlogPostCard.js b/themes/medium/components/BlogPostCard.js index a688f601..974f6547 100644 --- a/themes/medium/components/BlogPostCard.js +++ b/themes/medium/components/BlogPostCard.js @@ -4,7 +4,7 @@ import NotionPage from '@/components/NotionPage' import TwikooCommentCount from '@/components/TwikooCommentCount' import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import CONFIG from '../config' import CategoryItem from './CategoryItem' import TagItemMini from './TagItemMini' @@ -22,7 +22,7 @@ const BlogPostCard = ({ post, showSummary }) => { data-aos-anchor-placement='top-bottom' className='mb-6 max-w-7xl border-b dark:border-gray-800 '>
      - { )} {post.title} - +
      {
      - {locale.COMMON.ARTICLE_DETAIL} - +
      diff --git a/themes/medium/components/BottomMenuBar.js b/themes/medium/components/BottomMenuBar.js index c04269c2..9b0aa4df 100644 --- a/themes/medium/components/BottomMenuBar.js +++ b/themes/medium/components/BottomMenuBar.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useMediumGlobal } from '..' import JumpToTopButton from './JumpToTopButton' @@ -17,11 +17,11 @@ export default function BottomMenuBar({ post, className }) { className }>
      - +
      - +
      @@ -33,11 +33,11 @@ export default function BottomMenuBar({ post, className }) {
      )} {!showTocButton && ( - +
      - +
      )} diff --git a/themes/medium/components/CategoryItem.js b/themes/medium/components/CategoryItem.js index 779488de..8b7cbcfc 100644 --- a/themes/medium/components/CategoryItem.js +++ b/themes/medium/components/CategoryItem.js @@ -1,8 +1,8 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' export default function CategoryItem ({ selected, category, categoryCount }) { return ( - {category} {categoryCount && `(${categoryCount})`} - + ); } diff --git a/themes/medium/components/LeftMenuBar.js b/themes/medium/components/LeftMenuBar.js index 6bde6c51..6f9da093 100644 --- a/themes/medium/components/LeftMenuBar.js +++ b/themes/medium/components/LeftMenuBar.js @@ -1,14 +1,14 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' export default function LeftMenuBar () { return (
      - +
      - +
      ); diff --git a/themes/medium/components/LogoBar.js b/themes/medium/components/LogoBar.js index d739425c..2bb1b891 100644 --- a/themes/medium/components/LogoBar.js +++ b/themes/medium/components/LogoBar.js @@ -1,12 +1,12 @@ import { siteConfig } from '@/lib/config' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' export default function LogoBar(props) { return (
      - + {siteConfig('TITLE')} - +
      ) } diff --git a/themes/medium/components/MenuItemCollapse.js b/themes/medium/components/MenuItemCollapse.js index 01d40f5d..074e9510 100644 --- a/themes/medium/components/MenuItemCollapse.js +++ b/themes/medium/components/MenuItemCollapse.js @@ -1,5 +1,5 @@ import Collapse from '@/components/Collapse' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { useState } from 'react' @@ -42,7 +42,7 @@ export const MenuItemCollapse = props => { } onClick={toggleShow}> {!hasSubMenu && ( - @@ -50,7 +50,7 @@ export const MenuItemCollapse = props => {
      {link.name}
      - + )} {hasSubMenu && ( @@ -79,14 +79,14 @@ export const MenuItemCollapse = props => { className=' not:last-child:border-b-0 border-b dark:border-gray-800 py-2 px-14 cursor-pointer hover:bg-gray-100 dark:text-gray-200 font-extralight dark:bg-black text-left justify-start text-gray-600 bg-gray-50 dark:hover:bg-gray-900 tracking-widest transition-all duration-200'> - +
      {sLink.title}
      - +
      ) })} diff --git a/themes/medium/components/MenuItemDrop.js b/themes/medium/components/MenuItemDrop.js index b6c7a62c..8fa3171b 100644 --- a/themes/medium/components/MenuItemDrop.js +++ b/themes/medium/components/MenuItemDrop.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { useState } from 'react' @@ -45,9 +45,9 @@ export const MenuItemDrop = ({ link }) => { ? 'bg-green-600 text-white hover:text-white' : 'hover:text-green-600') }> - + {link?.icon && } {link?.name} - + )} @@ -60,12 +60,12 @@ export const MenuItemDrop = ({ link }) => {
    • - + {link?.icon &&   } {sLink.title} - +
    • ) })} diff --git a/themes/medium/components/MenuItemMobileNormal.js b/themes/medium/components/MenuItemMobileNormal.js index 33569bfb..63e496af 100644 --- a/themes/medium/components/MenuItemMobileNormal.js +++ b/themes/medium/components/MenuItemMobileNormal.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' export const NormalMenu = props => { @@ -12,7 +12,7 @@ export const NormalMenu = props => { const selected = router.pathname === link.href || router.asPath === link.href return ( - {
      {link.name}
      {link.slot} - +
      ) } diff --git a/themes/medium/components/MenuItemPCNormal.js b/themes/medium/components/MenuItemPCNormal.js index fad3307e..de8154c9 100644 --- a/themes/medium/components/MenuItemPCNormal.js +++ b/themes/medium/components/MenuItemPCNormal.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' export const MenuItemPCNormal = props => { @@ -10,7 +10,7 @@ export const MenuItemPCNormal = props => { } return ( - {
      {link.name}
      {link.slot} - + ) } diff --git a/themes/medium/components/PaginationSimple.js b/themes/medium/components/PaginationSimple.js index fb3493a7..0eec5853 100644 --- a/themes/medium/components/PaginationSimple.js +++ b/themes/medium/components/PaginationSimple.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { useGlobal } from '@/lib/global' @@ -18,7 +18,7 @@ const PaginationSimple = ({ page, totalPage }) => { return (
      - { } text-center w-full duration-200 px-4 py-2 hover:border-green-500 border-b-2 hover:font-bold`}> ←{locale.PAGINATION.PREV} - - + { } text-center w-full duration-200 px-4 py-2 hover:border-green-500 border-b-2 hover:font-bold`}> {locale.PAGINATION.NEXT}→ - +
      ) } diff --git a/themes/medium/components/TagItemMini.js b/themes/medium/components/TagItemMini.js index 9922a069..e8fde285 100644 --- a/themes/medium/components/TagItemMini.js +++ b/themes/medium/components/TagItemMini.js @@ -1,8 +1,8 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' const TagItemMini = ({ tag, selected = false }) => { return ( - {
      {selected && } {tag.name + (tag.count ? `(${tag.count})` : '')}
      - + ) } diff --git a/themes/medium/index.js b/themes/medium/index.js index 799a29b6..23283401 100644 --- a/themes/medium/index.js +++ b/themes/medium/index.js @@ -8,7 +8,7 @@ import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' import { isBrowser } from '@/lib/utils' import { Transition } from '@headlessui/react' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { createContext, useContext, useEffect, useState } from 'react' import Announcement from './components/Announcement' @@ -379,7 +379,7 @@ const LayoutCategoryIndex = props => {
      {categoryOptions?.map(category => { return ( - { {category.name}({category.count})
      - + ) })} diff --git a/themes/movie/components/ArchiveDateList.js b/themes/movie/components/ArchiveDateList.js index cd389028..c6ece352 100644 --- a/themes/movie/components/ArchiveDateList.js +++ b/themes/movie/components/ArchiveDateList.js @@ -1,6 +1,6 @@ import { useGlobal } from '@/lib/global' import { formatDateFmt } from '@/lib/utils/formatDate' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' export default function ArchiveDateList(props) { const postsSortByDate = Object.create(props.allNavPages) @@ -24,12 +24,12 @@ export default function ArchiveDateList(props) { {dates?.map((date, index) => { return (
      - {date} - +
      ) })} diff --git a/themes/movie/components/ArticleInfo.js b/themes/movie/components/ArticleInfo.js index 9997579a..8e579e44 100644 --- a/themes/movie/components/ArticleInfo.js +++ b/themes/movie/components/ArticleInfo.js @@ -1,6 +1,6 @@ import { useGlobal } from '@/lib/global' import { formatDateFmt } from '@/lib/utils/formatDate' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' export const ArticleInfo = props => { const { post } = props @@ -11,18 +11,18 @@ export const ArticleInfo = props => {

      {post?.title}

      - {post?.publishDay} - + {post?.type !== 'Page' && ( <> - + {post?.category} - + )} @@ -34,9 +34,9 @@ export const ArticleInfo = props => { )} {post?.tags?.map(tag => { return ( - + {tag} - + ) })}
      diff --git a/themes/movie/components/BlogListGroupByDate.js b/themes/movie/components/BlogListGroupByDate.js index ebc30aa5..da8e18ad 100644 --- a/themes/movie/components/BlogListGroupByDate.js +++ b/themes/movie/components/BlogListGroupByDate.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 按照日期将文章分组 @@ -21,11 +21,11 @@ export default function BlogListGroupByDate({ archiveTitle, archivePosts }) { className='border-l-2 p-1 text-xs md:text-base items-center hover:scale-x-105 hover:border-gray-500 dark:hover:border-gray-300 dark:border-gray-400 transform duration-500'>
      {post?.publishDay}   - {post.title} - +
      ) diff --git a/themes/movie/components/BlogPostCard.js b/themes/movie/components/BlogPostCard.js index fe44b8cd..e039edf7 100644 --- a/themes/movie/components/BlogPostCard.js +++ b/themes/movie/components/BlogPostCard.js @@ -1,7 +1,7 @@ import LazyImage from '@/components/LazyImage' import NotionIcon from '@/components/NotionIcon' import { siteConfig } from '@/lib/config' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import TagItemMini from './TagItemMini' const BlogPostCard = ({ index, post, showSummary, siteInfo }) => { @@ -15,7 +15,7 @@ const BlogPostCard = ({ index, post, showSummary, siteInfo }) => {
      - + {/* 固定高度 ,空白用图片拉升填充 */}
      {/* 图片 填充卡片 */} @@ -54,7 +54,7 @@ const BlogPostCard = ({ index, post, showSummary, siteInfo }) => {
      - +
      ) } diff --git a/themes/movie/components/BlogRecommend.js b/themes/movie/components/BlogRecommend.js index ef87030e..a6bfbc22 100644 --- a/themes/movie/components/BlogRecommend.js +++ b/themes/movie/components/BlogRecommend.js @@ -1,7 +1,7 @@ import LazyImage from '@/components/LazyImage' import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import CONFIG from '../config' /** @@ -35,7 +35,7 @@ export default function BlogRecommend(props) { : siteInfo?.pageCover return ( - - + ) })} diff --git a/themes/movie/components/CategoryGroup.js b/themes/movie/components/CategoryGroup.js index 89c5f5ca..7fcb76ee 100644 --- a/themes/movie/components/CategoryGroup.js +++ b/themes/movie/components/CategoryGroup.js @@ -1,6 +1,6 @@ import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' const CategoryGroup = props => { const { currentCategory, categoryOptions } = props @@ -16,7 +16,7 @@ const CategoryGroup = props => { {categories.map(category => { const selected = currentCategory === category.name return ( - { className={`${selected ? 'text-white fa-folder-open ' : 'text-gray-500 fa-folder '} mr-2 fas`} /> {category.name}({category.count}) - + ) })} diff --git a/themes/movie/components/CategoryItem.js b/themes/movie/components/CategoryItem.js index 1190965b..635bd69e 100644 --- a/themes/movie/components/CategoryItem.js +++ b/themes/movie/components/CategoryItem.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 文章分类 @@ -7,7 +7,7 @@ import Link from 'next/link' */ export default function CategoryItem({ category }) { return ( - {category.name}({category.count}) - + ) } diff --git a/themes/movie/components/ExampleRecentComments.js b/themes/movie/components/ExampleRecentComments.js index 9dbdfa7f..cf1f5bed 100644 --- a/themes/movie/components/ExampleRecentComments.js +++ b/themes/movie/components/ExampleRecentComments.js @@ -1,6 +1,6 @@ import { useEffect, useState } from 'react' import { siteConfig } from '@/lib/config' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { RecentComments } from '@waline/client' /** @@ -26,7 +26,7 @@ const ExampleRecentComments = (props) => { {!onLoading && comments && comments.length === 0 &&
      No Comments
      } {!onLoading && comments && comments.length > 0 && comments.map((comment) =>
      -
      --{comment.nick}
      +
      --{comment.nick}
      )} diff --git a/themes/movie/components/Header.js b/themes/movie/components/Header.js index e3ecba63..8e5a8480 100644 --- a/themes/movie/components/Header.js +++ b/themes/movie/components/Header.js @@ -1,7 +1,7 @@ import Collapse from '@/components/Collapse' import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { useEffect, useState } from 'react' import { useMovieGlobal } from '..' @@ -101,11 +101,11 @@ export const Header = props => { <>
      {/* 左侧Logo */} - {siteConfig('TITLE')} - +
      {/* 右侧菜单 */} diff --git a/themes/movie/components/LatestPostsGroup.js b/themes/movie/components/LatestPostsGroup.js index 40366e37..49746e56 100644 --- a/themes/movie/components/LatestPostsGroup.js +++ b/themes/movie/components/LatestPostsGroup.js @@ -1,6 +1,6 @@ import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' /** @@ -32,7 +32,7 @@ const LatestPostsGroup = ({ latestPosts }) => { currentPath === `${siteConfig('SUB_PATH', '')}/${post.slug}` return ( - { }>
    • {post.title}
    • - + ) })}
      diff --git a/themes/movie/components/MenuItemCollapse.js b/themes/movie/components/MenuItemCollapse.js index b11dbd57..45ec1bcc 100644 --- a/themes/movie/components/MenuItemCollapse.js +++ b/themes/movie/components/MenuItemCollapse.js @@ -1,5 +1,5 @@ import Collapse from '@/components/Collapse' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useState } from 'react' /** @@ -32,7 +32,7 @@ export const MenuItemCollapse = props => { className='select-none w-full px-6 py-2 text-left ' onClick={toggleShow}> {!hasSubMenu && ( - @@ -40,7 +40,7 @@ export const MenuItemCollapse = props => { {link?.icon && } {link?.name} - + )} {hasSubMenu && (
      {
      - + {link?.icon && }{' '} {sLink.title} - +
      ) })} diff --git a/themes/movie/components/MenuItemDrop.js b/themes/movie/components/MenuItemDrop.js index 084c4424..45364e5f 100644 --- a/themes/movie/components/MenuItemDrop.js +++ b/themes/movie/components/MenuItemDrop.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useState } from 'react' export const MenuItemDrop = ({ link }) => { @@ -14,13 +14,13 @@ export const MenuItemDrop = ({ link }) => { onMouseOver={() => changeShow(true)} onMouseOut={() => changeShow(false)}> {!hasSubMenu && ( - {link?.icon && } {link?.name} {hasSubMenu && } - + )} {hasSubMenu && ( @@ -43,12 +43,12 @@ export const MenuItemDrop = ({ link }) => {
    • - + {link?.icon &&   } {sLink.title} - +
    • ) })} diff --git a/themes/movie/components/NormalMenuItem.js b/themes/movie/components/NormalMenuItem.js index 2ed6f2e9..74af0f08 100644 --- a/themes/movie/components/NormalMenuItem.js +++ b/themes/movie/components/NormalMenuItem.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 旧的普通菜单 @@ -9,12 +9,12 @@ export const NormalMenuItem = props => { const { link } = props return ( link?.show && ( - {link.name} - + ) ) } diff --git a/themes/movie/components/PaginationNumber.js b/themes/movie/components/PaginationNumber.js index 64323b9c..d82ca8f3 100644 --- a/themes/movie/components/PaginationNumber.js +++ b/themes/movie/components/PaginationNumber.js @@ -1,6 +1,6 @@ import { ChevronDoubleRight } from '@/components/HeroIcons' import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { useState } from 'react' @@ -49,7 +49,7 @@ const PaginationNumber = ({ page, totalPage }) => { {/* pc端分页按钮 */}
      {/* 上一页 */} - { {locale.PAGINATION.PREV}
      - + {/* 分页 */}
      @@ -86,7 +86,7 @@ const PaginationNumber = ({ page, totalPage }) => {
      {/* 下一页 */} - { {locale.PAGINATION.NEXT} - + {/* 移动端分页 */}
      {/* 上一页 */} - { rel='prev' className={`${showPrev ? 'block' : 'hidden'} dark:text-white relative w-full flex-1 h-14 flex items-center transition-all duration-200 justify-center py-2 px-2 bg-white dark:bg-[#1e1e1e] border rounded-xl cursor-pointer`}> {locale.PAGINATION.PREV} - + {showPrev && showNext &&
      } {/* 下一页 */} - { rel='next' className={`${+showNext ? 'block' : 'hidden'} dark:text-white relative w-full flex-1 h-14 flex items-center transition-all duration-200 justify-center py-2 px-2 bg-white dark:bg-[#1e1e1e] border rounded-xl cursor-pointer`}> {locale.PAGINATION.NEXT} - +
      ) @@ -149,7 +149,7 @@ function getPageElement(page, currentPage, pagePrefix) { return <> } return ( - {page} - + ) } diff --git a/themes/movie/components/SideBar.js b/themes/movie/components/SideBar.js index ea0531b7..70970f3a 100644 --- a/themes/movie/components/SideBar.js +++ b/themes/movie/components/SideBar.js @@ -1,7 +1,7 @@ import { siteConfig } from '@/lib/config' import Live2D from '@/components/Live2D' import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import dynamic from 'next/dynamic' import Announcement from './Announcement' const ExampleRecentComments = dynamic(() => import('./ExampleRecentComments')) @@ -19,13 +19,13 @@ export const SideBar = (props) => { @@ -40,9 +40,9 @@ export const SideBar = (props) => {
        {latestPosts?.map(p => { return ( - +
      • {p.title}
      • - +
        ) })}
      diff --git a/themes/movie/components/TagGroups.js b/themes/movie/components/TagGroups.js index 597cddc1..68464cf3 100644 --- a/themes/movie/components/TagGroups.js +++ b/themes/movie/components/TagGroups.js @@ -1,5 +1,5 @@ import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' /** @@ -22,7 +22,7 @@ const TagGroups = ({ tagOptions, className }) => { {tagOptions.map((tag, index) => { const selected = currentTag === tag.name return ( - { <> )} - + ) })} diff --git a/themes/movie/components/TagItem.js b/themes/movie/components/TagItem.js index c608c8cb..2de99f65 100644 --- a/themes/movie/components/TagItem.js +++ b/themes/movie/components/TagItem.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 标签 @@ -8,7 +8,7 @@ import Link from 'next/link' export default function TagItem({ tag }) { return (
      - {tag.name + (tag.count ? `(${tag.count})` : '')}{' '}
      - + ) } diff --git a/themes/movie/components/TagItemMini.js b/themes/movie/components/TagItemMini.js index a4b7da1c..a60a3c65 100644 --- a/themes/movie/components/TagItemMini.js +++ b/themes/movie/components/TagItemMini.js @@ -1,8 +1,8 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' const TagItemMini = ({ tag, selected = false }) => { return ( - { {selected && }{' '} {tag.name + (tag.count ? `(${tag.count})` : '')}{' '} - + ) } diff --git a/themes/nav/components/ArticleAround.js b/themes/nav/components/ArticleAround.js index 58069682..98901ae8 100755 --- a/themes/nav/components/ArticleAround.js +++ b/themes/nav/components/ArticleAround.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 上一篇,下一篇文章 @@ -11,20 +11,20 @@ export default function ArticleAround({ prev, next }) { } return (
      - {prev.title} - - + {next.title} - +
      ) } diff --git a/themes/nav/components/BlogArchiveItem.js b/themes/nav/components/BlogArchiveItem.js index 7d7b5a1c..a6d77c51 100755 --- a/themes/nav/components/BlogArchiveItem.js +++ b/themes/nav/components/BlogArchiveItem.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 归档分组 @@ -20,12 +20,12 @@ export default function BlogArchiveItem({ archiveTitle, archivePosts }) {
      {post.date?.start_date}{' '}   - {post.title} - +
      ) diff --git a/themes/nav/components/BlogPostCard.js b/themes/nav/components/BlogPostCard.js index 0f92a30a..0a3dbffe 100755 --- a/themes/nav/components/BlogPostCard.js +++ b/themes/nav/components/BlogPostCard.js @@ -1,6 +1,6 @@ import { siteConfig } from '@/lib/config' import { checkStartWithHttp } from '@/lib/utils' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import NotionIcon from './NotionIcon' @@ -21,7 +21,7 @@ const BlogPostCard = ({ post, className }) => { ? post.pageIcon + '&width=88' : post.pageIcon return ( - @@ -44,7 +44,7 @@ const BlogPostCard = ({ post, className }) => { - + ) } diff --git a/themes/nav/components/CategoryItem.js b/themes/nav/components/CategoryItem.js index 779488de..8b7cbcfc 100755 --- a/themes/nav/components/CategoryItem.js +++ b/themes/nav/components/CategoryItem.js @@ -1,8 +1,8 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' export default function CategoryItem ({ selected, category, categoryCount }) { return ( - {category} {categoryCount && `(${categoryCount})`} - + ); } diff --git a/themes/nav/components/LeftMenuBar.js b/themes/nav/components/LeftMenuBar.js index 6bde6c51..6f9da093 100755 --- a/themes/nav/components/LeftMenuBar.js +++ b/themes/nav/components/LeftMenuBar.js @@ -1,14 +1,14 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' export default function LeftMenuBar () { return (
      - +
      - +
      ); diff --git a/themes/nav/components/LogoBar.js b/themes/nav/components/LogoBar.js index c590a8a2..1d891f82 100755 --- a/themes/nav/components/LogoBar.js +++ b/themes/nav/components/LogoBar.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import CONFIG from '../config' import { siteConfig } from '@/lib/config' @@ -12,12 +12,12 @@ export default function LogoBar(props) { return (
      - + {/* eslint-disable-next-line @next/next/no-img-element */} {siteConfig('AUTHOR') {siteConfig('NAV_SHOW_TITLE_TEXT', null, CONFIG) && siteConfig('TITLE')} - +
      ) } diff --git a/themes/nav/components/MenuItem.js b/themes/nav/components/MenuItem.js index eb51c879..86febfb5 100644 --- a/themes/nav/components/MenuItem.js +++ b/themes/nav/components/MenuItem.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useState } from 'react' import Collapse from './Collapse' @@ -43,14 +43,14 @@ export const MenuItem = ({ link }) => { ) : ( - {link?.title} - + )} @@ -63,14 +63,14 @@ export const MenuItem = ({ link }) => { const sUrl = sIsAnchor ? `#${sLink.name}` : sLink.href return (
      - + {sLink.title} - +
      ) })} diff --git a/themes/nav/components/MenuItemCollapse.js b/themes/nav/components/MenuItemCollapse.js index 065e9228..049d432c 100755 --- a/themes/nav/components/MenuItemCollapse.js +++ b/themes/nav/components/MenuItemCollapse.js @@ -1,5 +1,5 @@ import Collapse from '@/components/Collapse' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { useState } from 'react' @@ -43,7 +43,7 @@ export const MenuItemCollapse = props => { } onClick={toggleShow}> {!hasSubMenu && ( - @@ -51,7 +51,7 @@ export const MenuItemCollapse = props => {
      {link.name}
      - + )} {hasSubMenu && ( @@ -84,14 +84,14 @@ export const MenuItemCollapse = props => { className=' py-2 px-14 cursor-pointer hover:bg-gray-100 dark:text-gray-400 dark:hover:text-white font-bold dark:bg-black text-left justify-start text-gray-600 bg-gray-50 bg-opacity-20 dark:hover:bg-gray-600 tracking-widest transition-all duration-200'> - +
      {sLink.title}
      - +
      ) })} diff --git a/themes/nav/components/MenuItemDrop.js b/themes/nav/components/MenuItemDrop.js index ec5b37f0..36ff8072 100755 --- a/themes/nav/components/MenuItemDrop.js +++ b/themes/nav/components/MenuItemDrop.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { useState } from 'react' @@ -45,9 +45,9 @@ export const MenuItemDrop = ({ link }) => { ? 'bg-green-600 text-white hover:text-white' : 'hover:text-green-600') }> - + {link?.icon && } {link?.name} - + )} @@ -60,12 +60,12 @@ export const MenuItemDrop = ({ link }) => {
    • - + {link?.icon &&   } {sLink.title} - +
    • ) })} diff --git a/themes/nav/components/MenuItemMobileNormal.js b/themes/nav/components/MenuItemMobileNormal.js index 33569bfb..63e496af 100755 --- a/themes/nav/components/MenuItemMobileNormal.js +++ b/themes/nav/components/MenuItemMobileNormal.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' export const NormalMenu = props => { @@ -12,7 +12,7 @@ export const NormalMenu = props => { const selected = router.pathname === link.href || router.asPath === link.href return ( - {
      {link.name}
      {link.slot} - +
      ) } diff --git a/themes/nav/components/MenuItemPCNormal.js b/themes/nav/components/MenuItemPCNormal.js index fad3307e..de8154c9 100755 --- a/themes/nav/components/MenuItemPCNormal.js +++ b/themes/nav/components/MenuItemPCNormal.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' export const MenuItemPCNormal = props => { @@ -10,7 +10,7 @@ export const MenuItemPCNormal = props => { } return ( - {
      {link.name}
      {link.slot} - + ) } diff --git a/themes/nav/components/NavPostList.js b/themes/nav/components/NavPostList.js index 7c382335..9683d497 100755 --- a/themes/nav/components/NavPostList.js +++ b/themes/nav/components/NavPostList.js @@ -1,5 +1,5 @@ import NavPostListEmpty from './NavPostListEmpty' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 博客列表滚动分页 @@ -18,7 +18,7 @@ const NavPostList = (props) => { // const selected = currentCategory === category.name const selected = false return ( - {
      {category.name}({category.count})
      - + ) })} diff --git a/themes/nav/components/PaginationSimple.js b/themes/nav/components/PaginationSimple.js index b48259ea..90d6101b 100755 --- a/themes/nav/components/PaginationSimple.js +++ b/themes/nav/components/PaginationSimple.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { useGlobal } from '@/lib/global' @@ -18,7 +18,7 @@ const PaginationSimple = ({ page, totalPage }) => { return (
      - { } text-center w-full duration-200 px-4 py-2 hover:border-green-500 border-b-2 hover:font-bold`}> ←{locale.PAGINATION.PREV} - - + { } text-center w-full duration-200 px-4 py-2 hover:border-green-500 border-b-2 hover:font-bold`}> {locale.PAGINATION.NEXT}→ - +
      ) } diff --git a/themes/nav/components/TagItemMini.js b/themes/nav/components/TagItemMini.js index 9922a069..e8fde285 100755 --- a/themes/nav/components/TagItemMini.js +++ b/themes/nav/components/TagItemMini.js @@ -1,8 +1,8 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' const TagItemMini = ({ tag, selected = false }) => { return ( - {
      {selected && } {tag.name + (tag.count ? `(${tag.count})` : '')}
      - + ) } diff --git a/themes/nav/index.js b/themes/nav/index.js index f2316aed..7b7cdc07 100755 --- a/themes/nav/index.js +++ b/themes/nav/index.js @@ -16,7 +16,7 @@ import { useGlobal } from '@/lib/global' import { isBrowser } from '@/lib/utils' import { Transition } from '@headlessui/react' import dynamic from 'next/dynamic' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { createContext, useContext, useEffect, useState } from 'react' import Announcement from './components/Announcement' @@ -408,7 +408,7 @@ const LayoutCategoryIndex = props => {
      {categoryOptions?.map(category => { return ( - { {category.name}({category.count})
      - + ) })} diff --git a/themes/next/components/ArticleCopyright.js b/themes/next/components/ArticleCopyright.js index 6626713c..e151a505 100644 --- a/themes/next/components/ArticleCopyright.js +++ b/themes/next/components/ArticleCopyright.js @@ -1,5 +1,5 @@ import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import CONFIG from '../config' import { siteConfig } from '@/lib/config' import NotByAI from '@/components/NotByAI' @@ -14,9 +14,9 @@ export default function ArticleCopyright({ author, url }) {
      • {locale.COMMON.AUTHOR}: - + {author} - +
      • {locale.COMMON.URL}: diff --git a/themes/next/components/ArticleDetail.js b/themes/next/components/ArticleDetail.js index 902cf6a6..da7fba24 100644 --- a/themes/next/components/ArticleDetail.js +++ b/themes/next/components/ArticleDetail.js @@ -7,7 +7,7 @@ import WWAds from '@/components/WWAds' import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' import { formatDateFmt } from '@/lib/utils/formatDate' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import CONFIG from '../config' import ArticleCopyright from './ArticleCopyright' @@ -69,7 +69,7 @@ export default function ArticleDetail(props) {
        {post?.type !== 'Page' && ( <> - @@ -77,7 +77,7 @@ export default function ArticleDetail(props) { {' '} {post?.publishDay}
        - + {' '} | @@ -127,12 +127,12 @@ export default function ArticleDetail(props) { {post.category && ( <> )} diff --git a/themes/next/components/BlogAround.js b/themes/next/components/BlogAround.js index 8dd93942..5fac6400 100644 --- a/themes/next/components/BlogAround.js +++ b/themes/next/components/BlogAround.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 上一篇,下一篇文章 @@ -11,22 +11,22 @@ export default function BlogAround ({ prev, next }) { } return (
        - {prev && {prev.title} - } - {next && } + {next && {next.title} - } + }
        ); } diff --git a/themes/next/components/BlogPostArchive.js b/themes/next/components/BlogPostArchive.js index 589e67b1..03ee090a 100644 --- a/themes/next/components/BlogPostArchive.js +++ b/themes/next/components/BlogPostArchive.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 博客归档列表 @@ -27,12 +27,12 @@ const BlogPostArchive = ({ posts = [], archiveTitle }) => {
        {post.date?.start_date}{' '}   - {post.title} - +
      • ) diff --git a/themes/next/components/BlogPostCard.js b/themes/next/components/BlogPostCard.js index 6189fff7..248c8099 100644 --- a/themes/next/components/BlogPostCard.js +++ b/themes/next/components/BlogPostCard.js @@ -5,7 +5,7 @@ import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' import { formatDateFmt } from '@/lib/utils/formatDate' import Image from 'next/image' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import CONFIG from '../config' import Card from './Card' import TagItemMini from './TagItemMini' @@ -32,7 +32,7 @@ const BlogPostCard = ({ post, index, showSummary }) => { className='flex flex-col-reverse justify-between duration-300'>
        {/* 文章标题 */} - { )}{' '} {post.title} - +
        {
        {post.category && ( <> - {post.category} - + | )} - {post.date?.start_date} - +
        { )}
        - {locale.COMMON.ARTICLE_DETAIL} - +
        {siteConfig('NEXT_POST_LIST_COVER', null, CONFIG) && post?.pageCoverThumbnail && ( - +
        { loading='lazy' />
        - +
        )}
        diff --git a/themes/next/components/CategoryGroup.js b/themes/next/components/CategoryGroup.js index c3d483be..48338c5a 100644 --- a/themes/next/components/CategoryGroup.js +++ b/themes/next/components/CategoryGroup.js @@ -1,5 +1,5 @@ import { siteConfig } from '@/lib/config' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' const CategoryGroup = ({ currentCategory, categories }) => { if (!categories || categories.length === 0) return <> @@ -11,7 +11,7 @@ const CategoryGroup = ({ currentCategory, categories }) => { {categoryOptions.map(category => { const selected = currentCategory === category.name return ( - { className={`${selected ? 'text-white fa-folder-open ' : 'text-gray-500 fa-folder '} mr-2 fas`} /> {category.name}({category.count}) - + ) })} diff --git a/themes/next/components/CategoryList.js b/themes/next/components/CategoryList.js index af8e3b52..460c1705 100644 --- a/themes/next/components/CategoryList.js +++ b/themes/next/components/CategoryList.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useGlobal } from '@/lib/global' const CategoryList = ({ currentCategory, categoryOptions }) => { @@ -13,7 +13,7 @@ const CategoryList = ({ currentCategory, categoryOptions }) => { {categoryOptions?.map(category => { const selected = category.name === currentCategory return ( - { {`${category.name} (${category.count})`} - + ) })}
      diff --git a/themes/next/components/ContactButton.js b/themes/next/components/ContactButton.js index bc95ab25..3068403f 100644 --- a/themes/next/components/ContactButton.js +++ b/themes/next/components/ContactButton.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 悬浮在屏幕右下角,联系我的按钮 @@ -7,7 +7,7 @@ import Link from 'next/link' */ const ContactButton = () => { return ( - ( @@ -16,7 +16,7 @@ const ContactButton = () => { - ) + ) ); } diff --git a/themes/next/components/LatestPostsGroup.js b/themes/next/components/LatestPostsGroup.js index 9e612997..e235b0aa 100644 --- a/themes/next/components/LatestPostsGroup.js +++ b/themes/next/components/LatestPostsGroup.js @@ -1,6 +1,6 @@ import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' /** @@ -30,7 +30,7 @@ const LatestPostsGroup = ({ latestPosts }) => { const selected = currentPath === `${siteConfig('SUB_PATH', '')}/${post.slug}` return ( - { }>
    • {post.title}
    • - + ) })} diff --git a/themes/next/components/Live2DWaifu.js b/themes/next/components/Live2DWaifu.js index c21fc79a..edd2e120 100644 --- a/themes/next/components/Live2DWaifu.js +++ b/themes/next/components/Live2DWaifu.js @@ -7,7 +7,7 @@ export default function Live2DWife() { initLive2DWife() }, []) return <> - + } diff --git a/themes/next/components/Logo.js b/themes/next/components/Logo.js index e7c5f0e2..2a768d63 100644 --- a/themes/next/components/Logo.js +++ b/themes/next/components/Logo.js @@ -1,10 +1,10 @@ import { siteConfig } from '@/lib/config' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' const Logo = props => { const { className } = props return ( - +
      { {siteConfig('DESCRIPTION')}
      - +
      ) } export default Logo diff --git a/themes/next/components/MenuItemCollapse.js b/themes/next/components/MenuItemCollapse.js index f0d079a5..91d1c799 100644 --- a/themes/next/components/MenuItemCollapse.js +++ b/themes/next/components/MenuItemCollapse.js @@ -1,5 +1,5 @@ import Collapse from '@/components/Collapse' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useState } from 'react' /** @@ -28,7 +28,7 @@ export const MenuItemCollapse = props => { className='px-5 py-2 w-full text-left duration-200 hover:bg-gray-700 hover:text-white not:last-child:border-b-0 border-b dark:bg-hexo-black-gray dark:border-black' onClick={toggleShow}> {!hasSubMenu && ( - @@ -36,7 +36,7 @@ export const MenuItemCollapse = props => {
      {link.name}
      - +
      )} {hasSubMenu && ( @@ -65,7 +65,7 @@ export const MenuItemCollapse = props => { className='whitespace-nowrap dark:text-gray-200 not:last-child:border-b-0 border-b dark:border-gray-800 py-2 px-14 cursor-pointer hover:bg-gray-100 font-extralight dark:bg-black text-left justify-start text-gray-600 bg-gray-50 dark:hover:bg-gray-900 tracking-widest transition-all duration-200'> - +
      {sLink.icon && (
      { )} {sLink.title}
      - +
      ) })} diff --git a/themes/next/components/MenuItemDrop.js b/themes/next/components/MenuItemDrop.js index 97f382d7..f1745a70 100644 --- a/themes/next/components/MenuItemDrop.js +++ b/themes/next/components/MenuItemDrop.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useState } from 'react' export const MenuItemDrop = ({ link }) => { @@ -11,7 +11,7 @@ export const MenuItemDrop = ({ link }) => { onMouseOut={() => changeShow(false)} className='relative py-1.5 px-5 duration-300 text-base justify-between hover:bg-gray-700 hover:text-white hover:shadow-lg cursor-pointer font-light flex flex-nowrap items-center '> {!hasSubMenu && ( - @@ -20,7 +20,7 @@ export const MenuItemDrop = ({ link }) => { {link.name} {link.slot} - +
      )} {hasSubMenu && ( @@ -46,7 +46,7 @@ export const MenuItemDrop = ({ link }) => { {link?.subMenus?.map(sLink => { return (
    • - @@ -55,7 +55,7 @@ export const MenuItemDrop = ({ link }) => { )} {sLink.name} {sLink.slot} - +
    • ) })} diff --git a/themes/next/components/NextRecentComments.js b/themes/next/components/NextRecentComments.js index 74123935..d459d5e3 100644 --- a/themes/next/components/NextRecentComments.js +++ b/themes/next/components/NextRecentComments.js @@ -1,5 +1,5 @@ import { useEffect, useState } from 'react' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { RecentComments } from '@waline/client' import { siteConfig } from '@/lib/config' @@ -26,7 +26,7 @@ const NextRecentComments = (props) => { {!onLoading && comments && comments.length === 0 &&
      No Comments
      } {!onLoading && comments && comments.length > 0 && comments.map((comment) =>
      -
      --{comment.nick}
      +
      --{comment.nick}
      )} diff --git a/themes/next/components/PaginationNumber.js b/themes/next/components/PaginationNumber.js index 02c61693..e2d054f0 100644 --- a/themes/next/components/PaginationNumber.js +++ b/themes/next/components/PaginationNumber.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' /** @@ -28,7 +28,7 @@ const PaginationNumber = ({ page, totalPage }) => { data-aos-anchor-placement='top-bottom' className='mt-5 py-3 flex justify-center items-end font-medium text-black hover:shadow-xl duration-200 transition-all bg-white dark:bg-hexo-black-gray dark:text-gray-300 shadow space-x-2'> {/* 上一页 */} - { } hover:border-t-2 border-white hover:border-gray-400 dark:hover:border-gray-400 w-8 h-8 justify-center flex items-center cursor-pointer duration-200 transition-all hover:font-bold`}>
      - + {pages} {/* 下一页 */} - { } hover:border-t-2 border-white hover:border-gray-400 dark:hover:border-gray-400 w-8 h-8 justify-center flex items-center cursor-pointer duration-200 transition-all hover:font-bold`}> - + ) } @@ -129,7 +129,7 @@ function generatePages(pagePrefix, page, currentPage, totalPage) { */ function getPageElement(pagePrefix, page, currentPage) { return ( - {page} - + ) } diff --git a/themes/next/components/PaginationSimple.js b/themes/next/components/PaginationSimple.js index 65e21882..56b03fec 100644 --- a/themes/next/components/PaginationSimple.js +++ b/themes/next/components/PaginationSimple.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { useGlobal } from '@/lib/global' @@ -22,7 +22,7 @@ const PaginationSimple = ({ page, showNext }) => { data-aos-once="false" data-aos-anchor-placement="top-bottom" className="my-10 flex justify-between font-medium text-black dark:text-gray-100 space-x-2"> - { > ← {locale.PAGINATION.PREV} - - + { > {locale.PAGINATION.NEXT} → - + ) } diff --git a/themes/next/components/RecommendPosts.js b/themes/next/components/RecommendPosts.js index 9be418da..a20ad4cf 100644 --- a/themes/next/components/RecommendPosts.js +++ b/themes/next/components/RecommendPosts.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useGlobal } from '@/lib/global' import CONFIG from '../config' import { siteConfig } from '@/lib/config' @@ -18,11 +18,11 @@ const RecommendPosts = ({ recommendPosts }) => {
        {recommendPosts.map(post => (
      • - + {post.title} - +
      • ))}
      diff --git a/themes/next/components/SideAreaRight.js b/themes/next/components/SideAreaRight.js index 9b72e72d..40fa2825 100644 --- a/themes/next/components/SideAreaRight.js +++ b/themes/next/components/SideAreaRight.js @@ -1,5 +1,5 @@ import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import Card from './Card' import CategoryGroup from './CategoryGroup' import TagGroups from './TagGroups' @@ -56,14 +56,14 @@ const SideAreaRight = (props) => {
      {locale.COMMON.CATEGORY}
      - {locale.COMMON.MORE} - +
      @@ -76,7 +76,7 @@ const SideAreaRight = (props) => { {locale.COMMON.TAGS} - @@ -84,7 +84,7 @@ const SideAreaRight = (props) => { {locale.COMMON.MORE}{' '} - +
      diff --git a/themes/next/components/SideBar.js b/themes/next/components/SideBar.js index d863c74a..9e23fbed 100644 --- a/themes/next/components/SideBar.js +++ b/themes/next/components/SideBar.js @@ -2,7 +2,7 @@ import CategoryGroup from './CategoryGroup' import InfoCard from './InfoCard' import TagGroups from './TagGroups' import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 侧边栏 @@ -32,14 +32,14 @@ const SideBar = (props) => {
      {locale.COMMON.CATEGORY}
      - {locale.COMMON.MORE} - +
      @@ -50,14 +50,14 @@ const SideBar = (props) => {
      {locale.COMMON.TAGS}
      - {locale.COMMON.MORE} - +
      diff --git a/themes/next/components/TagItem.js b/themes/next/components/TagItem.js index bb40a2f1..2aa6a933 100644 --- a/themes/next/components/TagItem.js +++ b/themes/next/components/TagItem.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useGlobal } from '@/lib/global' const TagItem = ({ tag, selected }) => { @@ -7,7 +7,7 @@ const TagItem = ({ tag, selected }) => {
      { locale.COMMON.NOTAG }
      } return ( - @@ -19,7 +19,7 @@ const TagItem = ({ tag, selected }) => { {selected && } {`${tag.name} `} {tag.count ? `(${tag.count})` : ''}
      - + ); } diff --git a/themes/next/components/TagItemMini.js b/themes/next/components/TagItemMini.js index 72f12959..88498a28 100644 --- a/themes/next/components/TagItemMini.js +++ b/themes/next/components/TagItemMini.js @@ -1,8 +1,8 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' const TagItemMini = ({ tag, selected = false }) => { return ( - {
      {selected && } {tag.name + (tag.count ? `(${tag.count})` : '')}
      - + ); } diff --git a/themes/next/components/TopNav.js b/themes/next/components/TopNav.js index 1689fdfb..cf7662db 100644 --- a/themes/next/components/TopNav.js +++ b/themes/next/components/TopNav.js @@ -1,6 +1,6 @@ import { useGlobal } from '@/lib/global' import throttle from 'lodash.throttle' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useCallback, useEffect, useRef, useState } from 'react' import CategoryGroup from './CategoryGroup' import Collapse from '@/components/Collapse' @@ -87,14 +87,14 @@ const TopNav = (props) => {
      {locale.COMMON.CATEGORY}
      - {locale.COMMON.MORE} - +
      @@ -104,14 +104,14 @@ const TopNav = (props) => {
      {locale.COMMON.TAGS}
      - {locale.COMMON.MORE} - +
      diff --git a/themes/next/index.js b/themes/next/index.js index bb68834c..e3d199e9 100644 --- a/themes/next/index.js +++ b/themes/next/index.js @@ -3,7 +3,7 @@ import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' import { isBrowser } from '@/lib/utils' import dynamic from 'next/dynamic' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { createContext, useContext, useEffect, useRef, useState } from 'react' import Announcement from './components/Announcement' @@ -368,7 +368,7 @@ const LayoutCategoryIndex = props => {
      {categoryOptions?.map(category => { return ( - { {category.name}({category.count})
      - + ) })}
      diff --git a/themes/nobelium/components/BlogArchiveItem.js b/themes/nobelium/components/BlogArchiveItem.js index 4a92959e..7a010961 100644 --- a/themes/nobelium/components/BlogArchiveItem.js +++ b/themes/nobelium/components/BlogArchiveItem.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 归档分组文章 @@ -21,12 +21,12 @@ export default function BlogArchiveItem({ archiveTitle, archivePosts }) {
      {post.date?.start_date}{' '}   - {post.title} - +
      ) diff --git a/themes/nobelium/components/BlogListPage.js b/themes/nobelium/components/BlogListPage.js index ba1c2b4a..585aa665 100644 --- a/themes/nobelium/components/BlogListPage.js +++ b/themes/nobelium/components/BlogListPage.js @@ -1,6 +1,6 @@ import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import BlogPost from './BlogPost' @@ -30,7 +30,7 @@ export const BlogListPage = props => {
      - { - - + { - +
      ) diff --git a/themes/nobelium/components/BlogListScroll.js b/themes/nobelium/components/BlogListScroll.js index 73bdaba6..c6f10297 100644 --- a/themes/nobelium/components/BlogListScroll.js +++ b/themes/nobelium/components/BlogListScroll.js @@ -2,7 +2,7 @@ import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' import { deepClone } from '@/lib/utils' import throttle from 'lodash.throttle' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useCallback, useEffect, useRef, useState } from 'react' export const BlogListScroll = props => { @@ -62,11 +62,11 @@ export const BlogListScroll = props => { {postsToShow.map(p => (

      - {p.title} - +

      diff --git a/themes/nobelium/components/BlogPost.js b/themes/nobelium/components/BlogPost.js index 51354bd8..e33c3da2 100644 --- a/themes/nobelium/components/BlogPost.js +++ b/themes/nobelium/components/BlogPost.js @@ -2,7 +2,7 @@ import NotionIcon from '@/components/NotionIcon' import NotionPage from '@/components/NotionPage' import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' const BlogPost = ({ post }) => { const { NOTION_CONFIG } = useGlobal() @@ -10,7 +10,7 @@ const BlogPost = ({ post }) => { siteConfig('POST_LIST_PREVIEW', false, NOTION_CONFIG) && post?.blockMap return ( - +

      @@ -37,7 +37,7 @@ const BlogPost = ({ post }) => { )}

    - + ) } diff --git a/themes/nobelium/components/ExampleRecentComments.js b/themes/nobelium/components/ExampleRecentComments.js index 9dbdfa7f..cf1f5bed 100644 --- a/themes/nobelium/components/ExampleRecentComments.js +++ b/themes/nobelium/components/ExampleRecentComments.js @@ -1,6 +1,6 @@ import { useEffect, useState } from 'react' import { siteConfig } from '@/lib/config' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { RecentComments } from '@waline/client' /** @@ -26,7 +26,7 @@ const ExampleRecentComments = (props) => { {!onLoading && comments && comments.length === 0 &&
    No Comments
    } {!onLoading && comments && comments.length > 0 && comments.map((comment) =>
    -
    --{comment.nick}
    +
    --{comment.nick}
    )} diff --git a/themes/nobelium/components/MenuItemCollapse.js b/themes/nobelium/components/MenuItemCollapse.js index f70ed8d1..d7fd1993 100644 --- a/themes/nobelium/components/MenuItemCollapse.js +++ b/themes/nobelium/components/MenuItemCollapse.js @@ -1,5 +1,5 @@ import Collapse from '@/components/Collapse' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useState } from 'react' /** @@ -32,7 +32,7 @@ export const MenuItemCollapse = props => { className='w-full px-4 py-2 text-left dark:bg-hexo-black-gray dark:border-black' onClick={toggleShow}> {!hasSubMenu && ( - @@ -44,7 +44,7 @@ export const MenuItemCollapse = props => { )} {link?.name} - + )} {hasSubMenu && (
    {
    - + {sLink.title} - +
    ) })} diff --git a/themes/nobelium/components/MenuItemDrop.js b/themes/nobelium/components/MenuItemDrop.js index 9099d8fd..110f5c15 100644 --- a/themes/nobelium/components/MenuItemDrop.js +++ b/themes/nobelium/components/MenuItemDrop.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useState } from 'react' export const MenuItemDrop = ({ link }) => { @@ -19,9 +19,9 @@ export const MenuItemDrop = ({ link }) => { onMouseOut={() => changeShow(false)}> {!hasSubMenu && (
    - + {link?.icon && } {link?.name} - +
    )} @@ -42,12 +42,12 @@ export const MenuItemDrop = ({ link }) => {
    - + {link?.icon &&   } {sLink.title} - +
    ) })} diff --git a/themes/nobelium/components/Nav.js b/themes/nobelium/components/Nav.js index 899b7ea0..7f4de1f4 100644 --- a/themes/nobelium/components/Nav.js +++ b/themes/nobelium/components/Nav.js @@ -3,7 +3,7 @@ import DarkModeButton from '@/components/DarkModeButton' import LazyImage from '@/components/LazyImage' import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useEffect, useRef, useState } from 'react' import CONFIG from '../config' import { MenuItemCollapse } from './MenuItemCollapse' @@ -52,7 +52,7 @@ const Nav = props => { id='sticky-nav' ref={navRef}>
    - +
    {/* */} {siteConfig('NOBELIUM_NAV_NOTION_ICON') ? ( @@ -66,7 +66,7 @@ const Nav = props => { )}
    - +
    {post ? (

    {post?.title} diff --git a/themes/nobelium/components/SideBar.js b/themes/nobelium/components/SideBar.js index a4d1e060..5cc321ba 100644 --- a/themes/nobelium/components/SideBar.js +++ b/themes/nobelium/components/SideBar.js @@ -1,7 +1,7 @@ import { siteConfig } from '@/lib/config' import Live2D from '@/components/Live2D' import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import dynamic from 'next/dynamic' const ExampleRecentComments = dynamic(() => import('./ExampleRecentComments')) @@ -18,13 +18,13 @@ export const SideBar = (props) => {

    @@ -39,9 +39,9 @@ export const SideBar = (props) => {
      {latestPosts?.map(p => { return ( - +
    • {p.title}
    • - +
      ); })}
    diff --git a/themes/nobelium/components/TagItem.js b/themes/nobelium/components/TagItem.js index 0364e3fc..2430e2bb 100644 --- a/themes/nobelium/components/TagItem.js +++ b/themes/nobelium/components/TagItem.js @@ -1,11 +1,11 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' const TagItem = ({ tag }) => ( - ( + (

    {tag}

    - ) +
    ) ) export default TagItem diff --git a/themes/nobelium/components/Tags.js b/themes/nobelium/components/Tags.js index bdab3ee5..db94dd93 100644 --- a/themes/nobelium/components/Tags.js +++ b/themes/nobelium/components/Tags.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' const Tags = props => { const { tagOptions, tag } = props @@ -19,14 +19,14 @@ const Tags = props => { : 'bg-gray-100 border-gray-100 text-gray-400 dark:bg-night dark:border-gray-800' }`} > - {`${tag.name} (${tag.count})`} - + ) })} diff --git a/themes/nobelium/index.js b/themes/nobelium/index.js index 4455dd96..39180c35 100644 --- a/themes/nobelium/index.js +++ b/themes/nobelium/index.js @@ -8,7 +8,7 @@ import { useGlobal } from '@/lib/global' import { deepClone, isBrowser } from '@/lib/utils' import { Transition } from '@headlessui/react' import dynamic from 'next/dynamic' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { createContext, useContext, useEffect, useRef, useState } from 'react' import Announcement from './components/Announcement' @@ -305,7 +305,7 @@ const LayoutCategoryIndex = props => {
    {categoryOptions?.map(category => { return ( - { {category.name}({category.count})
    - + ) })}
    @@ -339,7 +339,7 @@ const LayoutTagIndex = props => { {tagOptions.map(tag => { return (
    - { {' '} {tag.name + (tag.count ? `(${tag.count})` : '')}{' '}
    - +
    ) })} diff --git a/themes/photo/components/ArchiveDateList.js b/themes/photo/components/ArchiveDateList.js index cd389028..c6ece352 100644 --- a/themes/photo/components/ArchiveDateList.js +++ b/themes/photo/components/ArchiveDateList.js @@ -1,6 +1,6 @@ import { useGlobal } from '@/lib/global' import { formatDateFmt } from '@/lib/utils/formatDate' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' export default function ArchiveDateList(props) { const postsSortByDate = Object.create(props.allNavPages) @@ -24,12 +24,12 @@ export default function ArchiveDateList(props) { {dates?.map((date, index) => { return (
    - {date} - +
    ) })} diff --git a/themes/photo/components/ArticleFooter.js b/themes/photo/components/ArticleFooter.js index 9a928cce..9b3a9f64 100644 --- a/themes/photo/components/ArticleFooter.js +++ b/themes/photo/components/ArticleFooter.js @@ -1,6 +1,6 @@ import { useGlobal } from '@/lib/global' import { formatDateFmt } from '@/lib/utils/formatDate' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 文章页脚 @@ -18,12 +18,12 @@ export default function ArticleFooter(props) { {/* 分类标签(如果文章不是“页面”类型) */} {post?.type !== 'Page' && ( <> - {post?.category} - + )} @@ -37,12 +37,12 @@ export default function ArticleFooter(props) { {/* 显示所有标签 */} {post?.tags?.map(tag => { return ( - {tag} - + ) })}
    @@ -57,12 +57,12 @@ export default function ArticleFooter(props) { fontWeight: '300', // 设置字体粗细为细体 color: 'gray' // 设置文字颜色为灰色 }}> - {post?.publishDay} - + ) diff --git a/themes/photo/components/BlogListGroupByDate.js b/themes/photo/components/BlogListGroupByDate.js index ebc30aa5..da8e18ad 100644 --- a/themes/photo/components/BlogListGroupByDate.js +++ b/themes/photo/components/BlogListGroupByDate.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 按照日期将文章分组 @@ -21,11 +21,11 @@ export default function BlogListGroupByDate({ archiveTitle, archivePosts }) { className='border-l-2 p-1 text-xs md:text-base items-center hover:scale-x-105 hover:border-gray-500 dark:hover:border-gray-300 dark:border-gray-400 transform duration-500'>
    {post?.publishDay}   - {post.title} - +
    ) diff --git a/themes/photo/components/BlogPostCard.js b/themes/photo/components/BlogPostCard.js index fe44b8cd..e039edf7 100644 --- a/themes/photo/components/BlogPostCard.js +++ b/themes/photo/components/BlogPostCard.js @@ -1,7 +1,7 @@ import LazyImage from '@/components/LazyImage' import NotionIcon from '@/components/NotionIcon' import { siteConfig } from '@/lib/config' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import TagItemMini from './TagItemMini' const BlogPostCard = ({ index, post, showSummary, siteInfo }) => { @@ -15,7 +15,7 @@ const BlogPostCard = ({ index, post, showSummary, siteInfo }) => {
    - + {/* 固定高度 ,空白用图片拉升填充 */}
    {/* 图片 填充卡片 */} @@ -54,7 +54,7 @@ const BlogPostCard = ({ index, post, showSummary, siteInfo }) => {
    - +
    ) } diff --git a/themes/photo/components/BlogRecommend.js b/themes/photo/components/BlogRecommend.js index a8337ffa..0788ac09 100644 --- a/themes/photo/components/BlogRecommend.js +++ b/themes/photo/components/BlogRecommend.js @@ -1,7 +1,7 @@ import LazyImage from '@/components/LazyImage' import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import CONFIG from '../config' /** @@ -35,7 +35,7 @@ export default function BlogRecommend(props) { : siteInfo?.pageCover return ( - - + ) })} diff --git a/themes/photo/components/CategoryGroup.js b/themes/photo/components/CategoryGroup.js index a144bce5..a1bb4ad6 100644 --- a/themes/photo/components/CategoryGroup.js +++ b/themes/photo/components/CategoryGroup.js @@ -1,6 +1,6 @@ import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' const CategoryGroup = props => { const { currentCategory, categoryOptions } = props @@ -16,7 +16,7 @@ const CategoryGroup = props => { {categories.map(category => { const selected = currentCategory === category.name return ( - { className={`${selected ? 'text-white fa-folder-open ' : 'text-gray-500 fa-folder '} mr-2 fas`} /> {category.name}({category.count}) - + ) })} diff --git a/themes/photo/components/CategoryItem.js b/themes/photo/components/CategoryItem.js index 1190965b..635bd69e 100644 --- a/themes/photo/components/CategoryItem.js +++ b/themes/photo/components/CategoryItem.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 文章分类 @@ -7,7 +7,7 @@ import Link from 'next/link' */ export default function CategoryItem({ category }) { return ( - {category.name}({category.count}) - + ) } diff --git a/themes/photo/components/ExampleRecentComments.js b/themes/photo/components/ExampleRecentComments.js index 9dbdfa7f..cf1f5bed 100644 --- a/themes/photo/components/ExampleRecentComments.js +++ b/themes/photo/components/ExampleRecentComments.js @@ -1,6 +1,6 @@ import { useEffect, useState } from 'react' import { siteConfig } from '@/lib/config' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { RecentComments } from '@waline/client' /** @@ -26,7 +26,7 @@ const ExampleRecentComments = (props) => { {!onLoading && comments && comments.length === 0 &&
    No Comments
    } {!onLoading && comments && comments.length > 0 && comments.map((comment) =>
    -
    --{comment.nick}
    +
    --{comment.nick}
    )} diff --git a/themes/photo/components/Header.js b/themes/photo/components/Header.js index 29b7bee0..0f591f9b 100644 --- a/themes/photo/components/Header.js +++ b/themes/photo/components/Header.js @@ -1,5 +1,5 @@ import { siteConfig } from '@/lib/config' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import MenuHierarchical from './MenuHierarchical' /** @@ -11,11 +11,11 @@ export const Header = props => { <>
    {/* 左侧Logo */} - {siteConfig('TITLE')} - + {/* 右侧使用一个三级菜单 */}
    diff --git a/themes/photo/components/LatestPostsGroup.js b/themes/photo/components/LatestPostsGroup.js index 40366e37..49746e56 100644 --- a/themes/photo/components/LatestPostsGroup.js +++ b/themes/photo/components/LatestPostsGroup.js @@ -1,6 +1,6 @@ import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' /** @@ -32,7 +32,7 @@ const LatestPostsGroup = ({ latestPosts }) => { currentPath === `${siteConfig('SUB_PATH', '')}/${post.slug}` return ( - { }>
  • {post.title}
  • - + ) })}
    diff --git a/themes/photo/components/MenuItemCollapse.js b/themes/photo/components/MenuItemCollapse.js index 73458f13..dbe4c4a9 100644 --- a/themes/photo/components/MenuItemCollapse.js +++ b/themes/photo/components/MenuItemCollapse.js @@ -1,5 +1,5 @@ import Collapse from '@/components/Collapse' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useState } from 'react' /** @@ -30,7 +30,7 @@ export const MenuItemCollapse = props => { <>
    {!hasSubMenu && ( - @@ -38,7 +38,7 @@ export const MenuItemCollapse = props => { {link?.icon && } {link?.name} - + )} {hasSubMenu && (
    {
    - + {link?.icon && }{' '} {sLink.title} - +
    ) })} diff --git a/themes/photo/components/MenuItemDrop.js b/themes/photo/components/MenuItemDrop.js index 3b5cf813..89c7a86f 100644 --- a/themes/photo/components/MenuItemDrop.js +++ b/themes/photo/components/MenuItemDrop.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useState } from 'react' export const MenuItemDrop = ({ link }) => { @@ -14,13 +14,13 @@ export const MenuItemDrop = ({ link }) => { onMouseOver={() => changeShow(true)} onMouseOut={() => changeShow(false)}> {!hasSubMenu && ( - {link?.icon && } {link?.name} {hasSubMenu && } - + )} {hasSubMenu && ( @@ -43,12 +43,12 @@ export const MenuItemDrop = ({ link }) => {
  • - + {link?.icon &&   } {sLink.title} - +
  • ) })} diff --git a/themes/photo/components/NormalMenuItem.js b/themes/photo/components/NormalMenuItem.js index 2ed6f2e9..74af0f08 100644 --- a/themes/photo/components/NormalMenuItem.js +++ b/themes/photo/components/NormalMenuItem.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 旧的普通菜单 @@ -9,12 +9,12 @@ export const NormalMenuItem = props => { const { link } = props return ( link?.show && ( - {link.name} - + ) ) } diff --git a/themes/photo/components/PaginationNumber.js b/themes/photo/components/PaginationNumber.js index 64323b9c..d82ca8f3 100644 --- a/themes/photo/components/PaginationNumber.js +++ b/themes/photo/components/PaginationNumber.js @@ -1,6 +1,6 @@ import { ChevronDoubleRight } from '@/components/HeroIcons' import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { useState } from 'react' @@ -49,7 +49,7 @@ const PaginationNumber = ({ page, totalPage }) => { {/* pc端分页按钮 */}
    {/* 上一页 */} - { {locale.PAGINATION.PREV}
    - + {/* 分页 */}
    @@ -86,7 +86,7 @@ const PaginationNumber = ({ page, totalPage }) => {
    {/* 下一页 */} - { {locale.PAGINATION.NEXT}
    - + {/* 移动端分页 */}
    {/* 上一页 */} - { rel='prev' className={`${showPrev ? 'block' : 'hidden'} dark:text-white relative w-full flex-1 h-14 flex items-center transition-all duration-200 justify-center py-2 px-2 bg-white dark:bg-[#1e1e1e] border rounded-xl cursor-pointer`}> {locale.PAGINATION.PREV} - + {showPrev && showNext &&
    } {/* 下一页 */} - { rel='next' className={`${+showNext ? 'block' : 'hidden'} dark:text-white relative w-full flex-1 h-14 flex items-center transition-all duration-200 justify-center py-2 px-2 bg-white dark:bg-[#1e1e1e] border rounded-xl cursor-pointer`}> {locale.PAGINATION.NEXT} - +
    ) @@ -149,7 +149,7 @@ function getPageElement(page, currentPage, pagePrefix) { return <> } return ( - {page} - + ) } diff --git a/themes/photo/components/PostItemCard.js b/themes/photo/components/PostItemCard.js index 41b57f5b..ec384a35 100644 --- a/themes/photo/components/PostItemCard.js +++ b/themes/photo/components/PostItemCard.js @@ -3,7 +3,7 @@ import NotionIcon from '@/components/NotionIcon' import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' import { formatDateFmt } from '@/lib/utils/formatDate' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 普通的博客卡牌 @@ -25,7 +25,7 @@ const PostItemCard = ({ post, className }) => {
    - { )} {post?.title} - + {/* 发布日期 */} - {formatDateFmt(post?.publishDate, 'yyyy-MM')} - +
    diff --git a/themes/photo/components/SideBar.js b/themes/photo/components/SideBar.js index ea0531b7..70970f3a 100644 --- a/themes/photo/components/SideBar.js +++ b/themes/photo/components/SideBar.js @@ -1,7 +1,7 @@ import { siteConfig } from '@/lib/config' import Live2D from '@/components/Live2D' import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import dynamic from 'next/dynamic' import Announcement from './Announcement' const ExampleRecentComments = dynamic(() => import('./ExampleRecentComments')) @@ -19,13 +19,13 @@ export const SideBar = (props) => { @@ -40,9 +40,9 @@ export const SideBar = (props) => {
      {latestPosts?.map(p => { return ( - +
    • {p.title}
    • - +
      ) })}
    diff --git a/themes/photo/components/TagGroups.js b/themes/photo/components/TagGroups.js index 597cddc1..68464cf3 100644 --- a/themes/photo/components/TagGroups.js +++ b/themes/photo/components/TagGroups.js @@ -1,5 +1,5 @@ import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' /** @@ -22,7 +22,7 @@ const TagGroups = ({ tagOptions, className }) => { {tagOptions.map((tag, index) => { const selected = currentTag === tag.name return ( - { <> )} - + ) })} diff --git a/themes/photo/components/TagItem.js b/themes/photo/components/TagItem.js index c608c8cb..2de99f65 100644 --- a/themes/photo/components/TagItem.js +++ b/themes/photo/components/TagItem.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 标签 @@ -8,7 +8,7 @@ import Link from 'next/link' export default function TagItem({ tag }) { return (
    - {tag.name + (tag.count ? `(${tag.count})` : '')}{' '}
    - + ) } diff --git a/themes/photo/components/TagItemMini.js b/themes/photo/components/TagItemMini.js index a4b7da1c..a60a3c65 100644 --- a/themes/photo/components/TagItemMini.js +++ b/themes/photo/components/TagItemMini.js @@ -1,8 +1,8 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' const TagItemMini = ({ tag, selected = false }) => { return ( - { {selected && }{' '} {tag.name + (tag.count ? `(${tag.count})` : '')}{' '} - + ) } diff --git a/themes/plog/components/BlogArchiveItem.js b/themes/plog/components/BlogArchiveItem.js index 4a92959e..7a010961 100644 --- a/themes/plog/components/BlogArchiveItem.js +++ b/themes/plog/components/BlogArchiveItem.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 归档分组文章 @@ -21,12 +21,12 @@ export default function BlogArchiveItem({ archiveTitle, archivePosts }) {
    {post.date?.start_date}{' '}   - {post.title} - +
    ) diff --git a/themes/plog/components/BlogListPage.js b/themes/plog/components/BlogListPage.js index 658c2377..3df17a45 100644 --- a/themes/plog/components/BlogListPage.js +++ b/themes/plog/components/BlogListPage.js @@ -1,6 +1,6 @@ import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { useEffect, useRef } from 'react' import BlogPost from './BlogPost' @@ -64,7 +64,7 @@ export const BlogListPage = props => {
    - { - - + { - +
    ) diff --git a/themes/plog/components/BlogListScroll.js b/themes/plog/components/BlogListScroll.js index 6410338d..457601e2 100644 --- a/themes/plog/components/BlogListScroll.js +++ b/themes/plog/components/BlogListScroll.js @@ -1,7 +1,7 @@ import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' import throttle from 'lodash.throttle' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useCallback, useEffect, useRef, useState } from 'react' export const BlogListScroll = props => { @@ -59,11 +59,11 @@ export const BlogListScroll = props => { {postsToShow.map(p => (

    - {p.title} - +

    diff --git a/themes/plog/components/BlogPost.js b/themes/plog/components/BlogPost.js index d2058008..ce8dd56b 100644 --- a/themes/plog/components/BlogPost.js +++ b/themes/plog/components/BlogPost.js @@ -1,5 +1,5 @@ import { compressImage } from '@/lib/notion/mapImage' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { usePlogGlobal } from '..' import { isMobile } from '@/lib/utils' import LazyImage from '@/components/LazyImage' @@ -42,9 +42,9 @@ const BlogPost = (props) => { {siteConfig('POST_TITLE_ICON') && } {post?.title} {post?.category &&
    - + {post?.category} - +
    }
    diff --git a/themes/plog/components/ExampleRecentComments.js b/themes/plog/components/ExampleRecentComments.js index 055a2e38..02bd85a7 100644 --- a/themes/plog/components/ExampleRecentComments.js +++ b/themes/plog/components/ExampleRecentComments.js @@ -1,5 +1,5 @@ import { useEffect, useState } from 'react' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { RecentComments } from '@waline/client' import { siteConfig } from '@/lib/config' @@ -26,7 +26,7 @@ const ExampleRecentComments = (props) => { {!onLoading && comments && comments.length === 0 &&
    No Comments
    } {!onLoading && comments && comments.length > 0 && comments.map((comment) =>
    -
    --{comment.nick}
    +
    --{comment.nick}
    )} diff --git a/themes/plog/components/LogoBar.js b/themes/plog/components/LogoBar.js index 46dd8555..1507b79d 100644 --- a/themes/plog/components/LogoBar.js +++ b/themes/plog/components/LogoBar.js @@ -1,5 +1,5 @@ import LazyImage from '@/components/LazyImage' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import CONFIG from '../config' import { SvgIcon } from './SvgIcon' import { siteConfig } from '@/lib/config' @@ -13,24 +13,24 @@ export default function LogoBar(props) { const { navBarTitle, siteInfo } = props return
    - +
    {siteConfig('NOBELIUM_NAV_NOTION_ICON', null, CONFIG) ? : }
    - +
    {navBarTitle ? ( - +

    {navBarTitle}

    - +
    ) : (

    - {siteConfig('TITLE')} + {siteConfig('TITLE')} {' '}{siteConfig('DESCRIPTION')}

    )} diff --git a/themes/plog/components/MenuItemCollapse.js b/themes/plog/components/MenuItemCollapse.js index f70ed8d1..d7fd1993 100644 --- a/themes/plog/components/MenuItemCollapse.js +++ b/themes/plog/components/MenuItemCollapse.js @@ -1,5 +1,5 @@ import Collapse from '@/components/Collapse' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useState } from 'react' /** @@ -32,7 +32,7 @@ export const MenuItemCollapse = props => { className='w-full px-4 py-2 text-left dark:bg-hexo-black-gray dark:border-black' onClick={toggleShow}> {!hasSubMenu && ( - @@ -44,7 +44,7 @@ export const MenuItemCollapse = props => { )} {link?.name} - + )} {hasSubMenu && (
    {
    - + {sLink.title} - +
    ) })} diff --git a/themes/plog/components/MenuItemDrop.js b/themes/plog/components/MenuItemDrop.js index 8b2af918..7f72d91a 100644 --- a/themes/plog/components/MenuItemDrop.js +++ b/themes/plog/components/MenuItemDrop.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useState } from 'react' export const MenuItemDrop = ({ link }) => { @@ -16,9 +16,9 @@ export const MenuItemDrop = ({ link }) => { onMouseLeave={() => changeShow(false)}> {!hasSubMenu && (
    - + {link?.icon && } {link?.name} - +
    )} @@ -39,12 +39,12 @@ export const MenuItemDrop = ({ link }) => {
  • - + {link?.icon &&   } {sLink.title} - +
  • ) })} diff --git a/themes/plog/components/Modal.js b/themes/plog/components/Modal.js index ba70b50c..6b492df1 100644 --- a/themes/plog/components/Modal.js +++ b/themes/plog/components/Modal.js @@ -2,7 +2,7 @@ import { ArrowPath, ChevronLeft, ChevronRight } from '@/components/HeroIcons' import LazyImage from '@/components/LazyImage' import { compressImage } from '@/lib/notion/mapImage' import { Dialog, Transition } from '@headlessui/react' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { Fragment, useRef, useState } from 'react' import { usePlogGlobal } from '..' @@ -105,7 +105,7 @@ export default function Modal(props) { {/*
    */} - + - + <>
    @@ -134,11 +134,11 @@ export default function Modal(props) { {modalContent?.category && (
    - {modalContent?.category} - +
    )}
    diff --git a/themes/plog/components/Nav.js b/themes/plog/components/Nav.js index 854667d6..b41ef79d 100644 --- a/themes/plog/components/Nav.js +++ b/themes/plog/components/Nav.js @@ -2,7 +2,7 @@ import Collapse from '@/components/Collapse' import LazyImage from '@/components/LazyImage' import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRef, useState } from 'react' import CONFIG from '../config' import { MenuItemCollapse } from './MenuItemCollapse' @@ -21,7 +21,7 @@ const Header = props => { className={`sticky-nav m-auto w-full h-6 flex flex-row justify-between items-center mb-2 md:mb-12 py-8 glassmorphism ${ !fullWidth ? 'max-w-3xl px-4' : 'px-4 md:px-24' }`}> - @@ -44,7 +44,7 @@ const Header = props => { {/* ,{' '}{siteConfig('HOME_BANNER_IMAGE')} */}

    - +
    diff --git a/themes/plog/components/SideBar.js b/themes/plog/components/SideBar.js index 2779a64d..ce399bac 100644 --- a/themes/plog/components/SideBar.js +++ b/themes/plog/components/SideBar.js @@ -1,6 +1,6 @@ import Live2D from '@/components/Live2D' import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import dynamic from 'next/dynamic' import { siteConfig } from '@/lib/config' @@ -19,13 +19,13 @@ export const SideBar = (props) => { @@ -40,9 +40,9 @@ export const SideBar = (props) => {
      {latestPosts?.map(p => { return ( - +
    • {p.title}
    • - +
      ); })}
    diff --git a/themes/plog/components/TagItem.js b/themes/plog/components/TagItem.js index 6c385b9b..711d4fee 100644 --- a/themes/plog/components/TagItem.js +++ b/themes/plog/components/TagItem.js @@ -1,13 +1,13 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' const TagItem = ({ tag }) => ( - ( + (

    {tag}

    - ) +
    ) ) export default TagItem diff --git a/themes/plog/components/Tags.js b/themes/plog/components/Tags.js index bdab3ee5..db94dd93 100644 --- a/themes/plog/components/Tags.js +++ b/themes/plog/components/Tags.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' const Tags = props => { const { tagOptions, tag } = props @@ -19,14 +19,14 @@ const Tags = props => { : 'bg-gray-100 border-gray-100 text-gray-400 dark:bg-night dark:border-gray-800' }`} > - {`${tag.name} (${tag.count})`} - + ) })} diff --git a/themes/plog/index.js b/themes/plog/index.js index 3c9c7d62..721ae4ea 100644 --- a/themes/plog/index.js +++ b/themes/plog/index.js @@ -6,7 +6,7 @@ import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' import { isBrowser } from '@/lib/utils' import { Transition } from '@headlessui/react' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { createContext, useContext, useEffect, useState } from 'react' import { ArticleFooter } from './components/ArticleFooter' @@ -260,7 +260,7 @@ const LayoutCategoryIndex = props => {
    {categoryOptions?.map(category => { return ( - { {category.name}({category.count})
    - + ) })}
    @@ -294,7 +294,7 @@ const LayoutTagIndex = props => { {tagOptions.map(tag => { return (
    - { {' '} {tag.name + (tag.count ? `(${tag.count})` : '')}{' '}
    - + ) })} diff --git a/themes/proxio/components/Blog.js b/themes/proxio/components/Blog.js index 6476e14a..5fd92edb 100644 --- a/themes/proxio/components/Blog.js +++ b/themes/proxio/components/Blog.js @@ -1,7 +1,7 @@ /* eslint-disable @next/next/no-img-element */ import LazyImage from '@/components/LazyImage' import { siteConfig } from '@/lib/config' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 博文列表 @@ -69,7 +69,7 @@ export const Blog = ({ posts }) => { className='wow fadeInUp group mb-10 relative overflow-hidden blog' data-wow-delay='.1s'>
    - + {item.pageCoverThumbnail && ( // 图片半透明 { className='absolute max-h-full object-cover' />
    - + {/* 内容部分 */}
    @@ -100,11 +100,11 @@ export const Blog = ({ posts }) => { {item.publishDay}

    - {item.title} - +

    diff --git a/themes/proxio/components/CTA.js b/themes/proxio/components/CTA.js index ce980329..88b8062d 100644 --- a/themes/proxio/components/CTA.js +++ b/themes/proxio/components/CTA.js @@ -1,5 +1,5 @@ import { siteConfig } from '@/lib/config' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * CTA,用于创建一个呼吁用户行动的部分(Call To Action,简称 CTA)。 @@ -36,11 +36,11 @@ export const CTA = () => {

    {siteConfig('PROXIO_CTA_BUTTON') && ( <> - {siteConfig('PROXIO_CTA_BUTTON_TEXT')} - + )} diff --git a/themes/proxio/components/Career.js b/themes/proxio/components/Career.js index 162abb40..88c1c129 100644 --- a/themes/proxio/components/Career.js +++ b/themes/proxio/components/Career.js @@ -1,7 +1,7 @@ /* eslint-disable @next/next/no-img-element */ /* eslint-disable react/no-unescaped-entities */ import { siteConfig } from '@/lib/config' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 首页的生涯模块 diff --git a/themes/proxio/components/Features.js b/themes/proxio/components/Features.js index 6f932fd6..e17ccda2 100644 --- a/themes/proxio/components/Features.js +++ b/themes/proxio/components/Features.js @@ -3,7 +3,7 @@ import { SVGDesign } from './svg/SVGDesign' import { SVGEssential } from './svg/SVGEssential' import { SVGGifts } from './svg/SVGGifts' import { SVGTemplate } from './svg/SVGTemplate' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import LazyImage from '@/components/LazyImage' /** * 产品特性相关,将显示在首页中 @@ -88,12 +88,12 @@ export const Features = () => {
    - {siteConfig('PROXIO_FEATURE_BUTTON_TEXT')} - +
    diff --git a/themes/proxio/components/Footer.js b/themes/proxio/components/Footer.js index 383d7894..0e7e6b5c 100644 --- a/themes/proxio/components/Footer.js +++ b/themes/proxio/components/Footer.js @@ -7,7 +7,7 @@ import LazyImage from '@/components/LazyImage' import PoweredBy from '@/components/PoweredBy' import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import CONFIG from '../config' import SocialButton from './SocialButton' @@ -55,9 +55,9 @@ export const Footer = ({ title }) => { {group?.menus?.map((menu, index) => { return (
    - + {menu.title} - +
    ) })} diff --git a/themes/proxio/components/Header.js b/themes/proxio/components/Header.js index ed8ca5b4..09f6e5f4 100644 --- a/themes/proxio/components/Header.js +++ b/themes/proxio/components/Header.js @@ -4,7 +4,7 @@ import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' import { SignedIn, SignedOut, UserButton } from '@clerk/nextjs' import throttle from 'lodash.throttle' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { useCallback, useEffect, useState } from 'react' import { DarkModeButton } from './DarkModeButton' diff --git a/themes/proxio/components/Hero.js b/themes/proxio/components/Hero.js index 580ca70a..741db77d 100644 --- a/themes/proxio/components/Hero.js +++ b/themes/proxio/components/Hero.js @@ -2,7 +2,7 @@ import LazyImage from '@/components/LazyImage' import { siteConfig } from '@/lib/config' import CONFIG from '../config' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 英雄大图区块 @@ -52,11 +52,11 @@ export const Hero = props => {
      {siteConfig('PROXIO_HERO_BUTTON_1_TEXT', null, config) && (
    • - {siteConfig('PROXIO_HERO_BUTTON_1_TEXT', null, config)} - +
    • )} diff --git a/themes/proxio/components/MenuItem.js b/themes/proxio/components/MenuItem.js index ea2919ef..484bbb15 100644 --- a/themes/proxio/components/MenuItem.js +++ b/themes/proxio/components/MenuItem.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { useState } from 'react' @@ -23,7 +23,7 @@ export const MenuItem = ({ link }) => { {/* 普通 MenuItem */} {!hasSubMenu && (
    • - { } lg:group-hover:opacity-70`}> {link?.icon && } {link?.name} - +
    • )} @@ -71,7 +71,7 @@ export const MenuItem = ({ link }) => { : 'hidden opacity-0 invisible' }`}> {link.subMenus.map((sLink, index) => ( - { {link?.icon && }{' '} {sLink.title} - + ))} diff --git a/themes/proxio/components/Pricing.js b/themes/proxio/components/Pricing.js index c5800931..85be1d7b 100644 --- a/themes/proxio/components/Pricing.js +++ b/themes/proxio/components/Pricing.js @@ -1,5 +1,5 @@ import { siteConfig } from '@/lib/config' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 价格板块 @@ -66,11 +66,11 @@ export const Pricing = () => { })} - {siteConfig('PROXIO_PRICING_1_BUTTON_TEXT')} - + @@ -118,11 +118,11 @@ export const Pricing = () => { })} - {siteConfig('PROXIO_PRICING_2_BUTTON_TEXT')} - + @@ -162,11 +162,11 @@ export const Pricing = () => { })} - {siteConfig('PROXIO_PRICING_3_BUTTON_TEXT')} - + diff --git a/themes/proxio/components/Team.js b/themes/proxio/components/Team.js index 0f013b7a..49222cdf 100644 --- a/themes/proxio/components/Team.js +++ b/themes/proxio/components/Team.js @@ -1,7 +1,7 @@ /* eslint-disable @next/next/no-img-element */ import { siteConfig } from '@/lib/config' import LazyImage from '@/components/LazyImage' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 作者团队 * @returns @@ -46,12 +46,12 @@ export const Team = () => {
      - {siteConfig('PROXIO_ABOUT_BUTTON_TEXT')} - +
      diff --git a/themes/proxio/components/Testimonials.js b/themes/proxio/components/Testimonials.js index 4a22c3fd..736eaba6 100644 --- a/themes/proxio/components/Testimonials.js +++ b/themes/proxio/components/Testimonials.js @@ -1,7 +1,7 @@ /* eslint-disable react/no-unescaped-entities */ /* eslint-disable @next/next/no-img-element */ import { siteConfig } from '@/lib/config' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useEffect, useRef } from 'react' /** @@ -60,12 +60,12 @@ export const Testimonials = () => {

      - {siteConfig('PROXIO_TESTIMONIALS_BUTTON_TEXT')} - +
      diff --git a/themes/proxio/index.js b/themes/proxio/index.js index db25f622..9766ff4f 100644 --- a/themes/proxio/index.js +++ b/themes/proxio/index.js @@ -31,7 +31,7 @@ import DashboardHeader from '@/components/ui/dashboard/DashboardHeader' import { useGlobal } from '@/lib/global' import { loadWowJS } from '@/lib/plugins/wow' import { SignIn, SignUp } from '@clerk/nextjs' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { ArticleLock } from './components/ArticleLock' import { Banner } from './components/Banner' import { CTA } from './components/CTA' @@ -106,10 +106,10 @@ const LayoutIndex = props => { {/* 更多文章按钮 */}
      - + {locale.COMMON.MORE} - +
      )} @@ -304,11 +304,11 @@ const Layout404 = props => {

      {siteConfig('PROXIO_404_TEXT')}

      - {siteConfig('PROXIO_404_BACK')} - + @@ -364,24 +364,24 @@ const LayoutPostList = props => { className='wow fadeInUp group mb-10' data-wow-delay='.1s'>
      - + {item.title} - +
      {item.publishDay}

      - {item.title} - +

      {item.summary} @@ -417,7 +417,7 @@ const LayoutCategoryIndex = props => { className='duration-200 flex flex-wrap justify-center items-center '> {categoryOptions?.map(category => { return ( - { {category.name}({category.count}) - + ) })}

      @@ -458,7 +458,7 @@ const LayoutTagIndex = props => { {tagOptions.map(tag => { return (
      - { {' '} {tag.name + (tag.count ? `(${tag.count})` : '')}{' '}
      - + ) })} diff --git a/themes/simple/components/ArticleAround.js b/themes/simple/components/ArticleAround.js index b4cee232..a2f9c7d3 100644 --- a/themes/simple/components/ArticleAround.js +++ b/themes/simple/components/ArticleAround.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 上一篇,下一篇文章 @@ -11,22 +11,22 @@ export default function ArticleAround({ prev, next }) { } return (
      - {prev && {prev.title} - } - {next && } + {next && {next.title} - } + }
      ) } diff --git a/themes/simple/components/ArticleInfo.js b/themes/simple/components/ArticleInfo.js index e6408566..742aaf00 100644 --- a/themes/simple/components/ArticleInfo.js +++ b/themes/simple/components/ArticleInfo.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useGlobal } from '@/lib/global' import CONFIG from '../config' import { siteConfig } from '@/lib/config' @@ -28,17 +28,17 @@ export default function ArticleInfo (props) { {siteConfig('AUTHOR')} {post?.publishDay} {post?.category && {post?.category}} - {post?.tags && post?.tags?.length > 0 && post?.tags.map(t => / {t})} + {post?.tags && post?.tags?.length > 0 && post?.tags.map(t => / {t})} )} {post?.type !== 'Page' && (
      {locale.COMMON.POST_TIME}: - {post?.publishDay} - + | diff --git a/themes/simple/components/BlogArchiveItem.js b/themes/simple/components/BlogArchiveItem.js index 4a92959e..7a010961 100644 --- a/themes/simple/components/BlogArchiveItem.js +++ b/themes/simple/components/BlogArchiveItem.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 归档分组文章 @@ -21,12 +21,12 @@ export default function BlogArchiveItem({ archiveTitle, archivePosts }) {
      {post.date?.start_date}{' '}   - {post.title} - +
      ) diff --git a/themes/simple/components/BlogItem.js b/themes/simple/components/BlogItem.js index b5b897d8..b7354fac 100644 --- a/themes/simple/components/BlogItem.js +++ b/themes/simple/components/BlogItem.js @@ -5,7 +5,7 @@ import TwikooCommentCount from '@/components/TwikooCommentCount' import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' import { formatDateFmt } from '@/lib/utils/formatDate' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import CONFIG from '../config' export const BlogItem = props => { @@ -26,26 +26,26 @@ export const BlogItem = props => { {/* 图片封面 */} {showPageCover && (
      - + - +
      )}

      - {siteConfig('POST_TITLE_ICON') && ( )} {post.title} - +

      {/* 文章信息 */} @@ -60,12 +60,12 @@ export const BlogItem = props => { - {' '} {post.date?.start_date || post.createdTime} - + @@ -74,23 +74,23 @@ export const BlogItem = props => {
      {post.category && ( - + {' '} {post.category} - + )} {post?.tags && post?.tags?.length > 0 && post?.tags.map(t => ( - /{t} - + ))}
      @@ -113,12 +113,12 @@ export const BlogItem = props => {
      - Continue Reading{' '} - +
      ) diff --git a/themes/simple/components/BlogListPage.js b/themes/simple/components/BlogListPage.js index f11d2cc2..f4625f57 100644 --- a/themes/simple/components/BlogListPage.js +++ b/themes/simple/components/BlogListPage.js @@ -1,7 +1,7 @@ import { AdSlot } from '@/components/GoogleAdsense' import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import CONFIG from '../config' import { BlogItem } from './BlogItem' @@ -49,7 +49,7 @@ export default function BlogListPage(props) {
      - NEWER POSTS - - + OLDER POSTS - +
      ) diff --git a/themes/simple/components/ExampleRecentComments.js b/themes/simple/components/ExampleRecentComments.js index 93cde585..663151a1 100644 --- a/themes/simple/components/ExampleRecentComments.js +++ b/themes/simple/components/ExampleRecentComments.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { RecentComments } from '@waline/client' import { useEffect, useState } from 'react' import { siteConfig } from '@/lib/config' @@ -26,7 +26,7 @@ const ExampleRecentComments = (props) => { {!onLoading && comments && comments.length === 0 &&
      No Comments
      } {!onLoading && comments && comments.length > 0 && comments.map((comment) =>
      -
      --{comment.nick}
      +
      --{comment.nick}
      )} diff --git a/themes/simple/components/Header.js b/themes/simple/components/Header.js index e5d71756..ca799f19 100644 --- a/themes/simple/components/Header.js +++ b/themes/simple/components/Header.js @@ -1,6 +1,6 @@ import LazyImage from '@/components/LazyImage' import { siteConfig } from '@/lib/config' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import CONFIG from '../config' import SocialButton from './SocialButton' @@ -14,7 +14,7 @@ export default function Header(props) { return (
      - + {/* 可使用一张单图作为logo */}
      @@ -40,7 +40,7 @@ export default function Header(props) { />
      - +
      diff --git a/themes/simple/components/MenuItemCollapse.js b/themes/simple/components/MenuItemCollapse.js index 50174dc3..9de40a79 100644 --- a/themes/simple/components/MenuItemCollapse.js +++ b/themes/simple/components/MenuItemCollapse.js @@ -1,5 +1,5 @@ import Collapse from '@/components/Collapse' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useState } from 'react' /** @@ -32,7 +32,7 @@ export const MenuItemCollapse = props => { className='w-full px-8 py-3 text-left border-b dark:bg-hexo-black-gray dark:border-black' onClick={toggleShow}> {!hasSubMenu && ( - @@ -44,7 +44,7 @@ export const MenuItemCollapse = props => { )} {link?.name} - + )} {hasSubMenu && (
      {
      - + {sLink?.icon && ( @@ -81,7 +81,7 @@ export const MenuItemCollapse = props => { )} {sLink.title} - +
      ) })} diff --git a/themes/simple/components/MenuItemDrop.js b/themes/simple/components/MenuItemDrop.js index 7a5bbff8..79f9567c 100644 --- a/themes/simple/components/MenuItemDrop.js +++ b/themes/simple/components/MenuItemDrop.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useState } from 'react' export const MenuItemDrop = ({ link }) => { @@ -14,7 +14,7 @@ export const MenuItemDrop = ({ link }) => { onMouseOver={() => changeShow(true)} onMouseOut={() => changeShow(false)}> {!hasSubMenu && ( - @@ -25,7 +25,7 @@ export const MenuItemDrop = ({ link }) => { )} {link?.name} {hasSubMenu && } - + )} {hasSubMenu && ( @@ -52,12 +52,12 @@ export const MenuItemDrop = ({ link }) => {
    • - + {sLink?.icon &&   } {sLink.title} - +
    • ) })} diff --git a/themes/simple/components/RecommendPosts.js b/themes/simple/components/RecommendPosts.js index fd214fa0..a6db15f6 100644 --- a/themes/simple/components/RecommendPosts.js +++ b/themes/simple/components/RecommendPosts.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useGlobal } from '@/lib/global' import CONFIG from '../config' import { siteConfig } from '@/lib/config' @@ -18,11 +18,11 @@ const RecommendPosts = ({ recommendPosts }) => {
        {recommendPosts.map(post => (
      • - + {post.title} - +
      • ))}
      diff --git a/themes/simple/index.js b/themes/simple/index.js index a2b98e64..40bc987b 100644 --- a/themes/simple/index.js +++ b/themes/simple/index.js @@ -6,7 +6,7 @@ import { useGlobal } from '@/lib/global' import { isBrowser } from '@/lib/utils' import { Transition } from '@headlessui/react' import dynamic from 'next/dynamic' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { createContext, useContext, useEffect, useRef } from 'react' import BlogPostBar from './components/BlogPostBar' @@ -301,7 +301,7 @@ const LayoutCategoryIndex = props => {
      {categoryOptions?.map(category => { return ( - { {category.name}({category.count})
      - + ) })}
      @@ -334,7 +334,7 @@ const LayoutTagIndex = props => { {tagOptions.map(tag => { return (
      - { {' '} {tag.name + (tag.count ? `(${tag.count})` : '')}{' '}
      - +
      ) })} diff --git a/themes/starter/components/About.js b/themes/starter/components/About.js index 794349d3..bcadb4b7 100644 --- a/themes/starter/components/About.js +++ b/themes/starter/components/About.js @@ -1,7 +1,7 @@ /* eslint-disable @next/next/no-img-element */ /* eslint-disable react/no-unescaped-entities */ import { siteConfig } from '@/lib/config' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 首页的关于模块 @@ -28,11 +28,11 @@ export const About = () => { __html: siteConfig('STARTER_ABOUT_TEXT') }}>

      - {siteConfig('STARTER_ABOUT_BUTTON_TEXT')} - +
      diff --git a/themes/starter/components/Blog.js b/themes/starter/components/Blog.js index b8f51267..0ee4acac 100644 --- a/themes/starter/components/Blog.js +++ b/themes/starter/components/Blog.js @@ -1,6 +1,6 @@ /* eslint-disable @next/next/no-img-element */ import { siteConfig } from '@/lib/config' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 博文列表 @@ -41,13 +41,13 @@ export const Blog = ({ posts }) => { data-wow-delay='.1s'>
      {item.pageCoverThumbnail && ( - + {item.title} - + )}
      @@ -55,11 +55,11 @@ export const Blog = ({ posts }) => { {item.publishDay}

      - {item.title} - +

      {item.summary} diff --git a/themes/starter/components/CTA.js b/themes/starter/components/CTA.js index 2bf97e76..2319d0e3 100644 --- a/themes/starter/components/CTA.js +++ b/themes/starter/components/CTA.js @@ -1,5 +1,5 @@ import { siteConfig } from '@/lib/config' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * CTA,用于创建一个呼吁用户行动的部分(Call To Action,简称 CTA)。 @@ -30,11 +30,11 @@ export const CTA = () => {

      {siteConfig('STARTER_CTA_BUTTON') && ( <> - {siteConfig('STARTER_CTA_BUTTON_TEXT')} - + )}
      diff --git a/themes/starter/components/Features.js b/themes/starter/components/Features.js index bc869049..e72bd7fe 100644 --- a/themes/starter/components/Features.js +++ b/themes/starter/components/Features.js @@ -3,7 +3,7 @@ import { SVGDesign } from './svg/SVGDesign' import { SVGEssential } from './svg/SVGEssential' import { SVGGifts } from './svg/SVGGifts' import { SVGTemplate } from './svg/SVGTemplate' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 产品特性相关,将显示在首页中 * @returns @@ -42,11 +42,11 @@ export const Features = () => {

      {siteConfig('STARTER_FEATURE_1_TEXT_1')}

      - {siteConfig('STARTER_FEATURE_1_BUTTON_TEXT')} - +
      @@ -61,11 +61,11 @@ export const Features = () => {

      {siteConfig('STARTER_FEATURE_2_TEXT_1')}

      - {siteConfig('STARTER_FEATURE_2_BUTTON_TEXT')} - +
      @@ -80,11 +80,11 @@ export const Features = () => {

      {siteConfig('STARTER_FEATURE_3_TEXT_1')}

      - {siteConfig('STARTER_FEATURE_3_BUTTON_TEXT')} - +
      @@ -99,11 +99,11 @@ export const Features = () => {

      {siteConfig('STARTER_FEATURE_4_TEXT_1')}

      - {siteConfig('STARTER_FEATURE_3_BUTTON_TEXT')} - +
      diff --git a/themes/starter/components/Footer.js b/themes/starter/components/Footer.js index efcc24cb..27bce8b4 100644 --- a/themes/starter/components/Footer.js +++ b/themes/starter/components/Footer.js @@ -2,7 +2,7 @@ import { siteConfig } from '@/lib/config' import SocialButton from '@/themes/fukasawa/components/SocialButton' import { Logo } from './Logo' import { SVGFooterCircleBG } from './svg/SVGFooterCircleBG' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /* eslint-disable @next/next/no-img-element */ export const Footer = props => { @@ -49,11 +49,11 @@ export const Footer = props => { {item?.LINK_GROUP?.map((l, i) => { return (
    • - {l.TITLE} - +
    • ) })} @@ -73,7 +73,7 @@ export const Footer = props => {
      {latestPosts?.map((item, index) => { return ( - @@ -88,7 +88,7 @@ export const Footer = props => { {item.title} - + ) })}
      @@ -105,19 +105,19 @@ export const Footer = props => {
      - {siteConfig('STARTER_FOOTER_PRIVACY_POLICY_TEXT')} - - + {siteConfig('STARTER_FOOTER_PRIVACY_LEGAL_NOTICE_TEXT')} - - + { {siteConfig( 'STARTER_FOOTER_PRIVACY_TERMS_OF_SERVICE_TEXT', '' )} - +
      diff --git a/themes/starter/components/Header.js b/themes/starter/components/Header.js index 0875062e..96ff166a 100644 --- a/themes/starter/components/Header.js +++ b/themes/starter/components/Header.js @@ -4,7 +4,7 @@ import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' import { SignedIn, SignedOut, UserButton } from '@clerk/nextjs' import throttle from 'lodash.throttle' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { useCallback, useEffect, useState } from 'react' import { DarkModeButton } from './DarkModeButton' @@ -74,16 +74,16 @@ export const Header = props => { <>
      - {siteConfig('STARTER_NAV_BUTTON_1_TEXT')} - - + {siteConfig('STARTER_NAV_BUTTON_2_TEXT')} - +
      @@ -94,16 +94,16 @@ export const Header = props => { )} {!enableClerk && (
      - {siteConfig('STARTER_NAV_BUTTON_1_TEXT')} - - + {siteConfig('STARTER_NAV_BUTTON_2_TEXT')} - +
      )} diff --git a/themes/starter/components/Hero.js b/themes/starter/components/Hero.js index 42f124ac..46f07c58 100644 --- a/themes/starter/components/Hero.js +++ b/themes/starter/components/Hero.js @@ -2,7 +2,7 @@ import LazyImage from '@/components/LazyImage' import { siteConfig } from '@/lib/config' import CONFIG from '../config' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 英雄大图区块 @@ -33,16 +33,16 @@ export const Hero = props => {
        {siteConfig('STARTER_HERO_BUTTON_1_TEXT', null, config) && (
      • - {siteConfig('STARTER_HERO_BUTTON_1_TEXT', null, config)} - +
      • )} {siteConfig('STARTER_HERO_BUTTON_2_TEXT', null, config) && (
      • - { /> )} {siteConfig('STARTER_HERO_BUTTON_2_TEXT', null, config)} - +
      • )}
      diff --git a/themes/starter/components/MenuItem.js b/themes/starter/components/MenuItem.js index 95de15b2..f5a95a78 100644 --- a/themes/starter/components/MenuItem.js +++ b/themes/starter/components/MenuItem.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { useState } from 'react' @@ -23,7 +23,7 @@ export const MenuItem = ({ link }) => { {/* 普通 MenuItem */} {!hasSubMenu && (
    • - { } lg:group-hover:opacity-70`}> {link?.icon && } {link?.name} - +
    • )} @@ -71,7 +71,7 @@ export const MenuItem = ({ link }) => { : 'hidden opacity-0 invisible' }`}> {link.subMenus.map((sLink, index) => ( - { {link?.icon && }{' '} {sLink.title}
      - + ))} diff --git a/themes/starter/components/Pricing.js b/themes/starter/components/Pricing.js index 2519612d..443623c3 100644 --- a/themes/starter/components/Pricing.js +++ b/themes/starter/components/Pricing.js @@ -1,5 +1,5 @@ import { siteConfig } from '@/lib/config' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 价格板块 @@ -66,11 +66,11 @@ export const Pricing = () => { })} - {siteConfig('STARTER_PRICING_1_BUTTON_TEXT')} - + @@ -118,11 +118,11 @@ export const Pricing = () => { })} - {siteConfig('STARTER_PRICING_2_BUTTON_TEXT')} - + @@ -162,11 +162,11 @@ export const Pricing = () => { })} - {siteConfig('STARTER_PRICING_3_BUTTON_TEXT')} - + diff --git a/themes/starter/index.js b/themes/starter/index.js index 0f731451..ed08ea31 100644 --- a/themes/starter/index.js +++ b/themes/starter/index.js @@ -32,7 +32,7 @@ import DashboardHeader from '@/components/ui/dashboard/DashboardHeader' import { useGlobal } from '@/lib/global' import { loadWowJS } from '@/lib/plugins/wow' import { SignIn, SignUp } from '@clerk/nextjs' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { ArticleLock } from './components/ArticleLock' import { Banner } from './components/Banner' import { CTA } from './components/CTA' @@ -129,10 +129,10 @@ const LayoutIndex = props => { <>
      - + {locale.COMMON.MORE} - +
      )} @@ -298,11 +298,11 @@ const Layout404 = props => {

      {siteConfig('STARTER_404_TEXT')}

      - {siteConfig('STARTER_404_BACK')} - + @@ -362,24 +362,24 @@ const LayoutPostList = props => { className='wow fadeInUp group mb-10' data-wow-delay='.1s'>
      - + {item.title} - +
      {item.publishDay}

      - {item.title} - +

      {item.summary} @@ -415,7 +415,7 @@ const LayoutCategoryIndex = props => { className='duration-200 flex flex-wrap justify-center items-center '> {categoryOptions?.map(category => { return ( - { {category.name}({category.count}) - + ) })}

      @@ -456,7 +456,7 @@ const LayoutTagIndex = props => { {tagOptions.map(tag => { return (
      - { {' '} {tag.name + (tag.count ? `(${tag.count})` : '')}{' '}
      - + ) })} diff --git a/themes/typography/components/ArticleAround.js b/themes/typography/components/ArticleAround.js index b4cee232..a2f9c7d3 100644 --- a/themes/typography/components/ArticleAround.js +++ b/themes/typography/components/ArticleAround.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 上一篇,下一篇文章 @@ -11,22 +11,22 @@ export default function ArticleAround({ prev, next }) { } return (
      - {prev && {prev.title} - } - {next && } + {next && {next.title} - } + }
      ) } diff --git a/themes/typography/components/ArticleInfo.js b/themes/typography/components/ArticleInfo.js index ed1d39a9..00655004 100644 --- a/themes/typography/components/ArticleInfo.js +++ b/themes/typography/components/ArticleInfo.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useGlobal } from '@/lib/global' import CONFIG from '../config' import { siteConfig } from '@/lib/config' @@ -28,33 +28,33 @@ export default function ArticleInfo(props) {
      发布于 - {post.date?.start_date || post.createdTime} - +
      {/* {post.category && ( - + {' '} {post.category} - + )} */} {post?.tags && post?.tags?.length > 0 && post?.tags.map(t => ( - #{t} - + ))}
      diff --git a/themes/typography/components/BlogArchiveItem.js b/themes/typography/components/BlogArchiveItem.js index 4f849906..28bab810 100644 --- a/themes/typography/components/BlogArchiveItem.js +++ b/themes/typography/components/BlogArchiveItem.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 归档分组文章 @@ -19,12 +19,12 @@ export default function BlogArchiveItem({ archiveTitle, archivePosts }) { key={post.id} className='p-1 pl-0 text-base items-center mb-3'>
      - {post.title} - + {post.date?.start_date}
      diff --git a/themes/typography/components/BlogItem.js b/themes/typography/components/BlogItem.js index aed75761..be2ac0ef 100644 --- a/themes/typography/components/BlogItem.js +++ b/themes/typography/components/BlogItem.js @@ -5,7 +5,7 @@ import TwikooCommentCount from '@/components/TwikooCommentCount' import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' import { formatDateFmt } from '@/lib/utils/formatDate' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import CONFIG from '../config' export const BlogItem = props => { @@ -23,26 +23,26 @@ export const BlogItem = props => { {/* 图片封面 */} {showPageCover && (
      - + - +
      )}

      - {siteConfig('POST_TITLE_ICON') && ( )} {post.title} - +

      {/* 文章信息 */} @@ -50,33 +50,33 @@ export const BlogItem = props => {
      发布于 - {post.date?.start_date || post.createdTime} - +
      {/* {post.category && ( - + {' '} {post.category} - + )} */} {post?.tags && post?.tags?.length > 0 && post?.tags.map(t => ( - #{t} - + ))}
      diff --git a/themes/typography/components/BlogListPage.js b/themes/typography/components/BlogListPage.js index d7def141..333bbb8c 100644 --- a/themes/typography/components/BlogListPage.js +++ b/themes/typography/components/BlogListPage.js @@ -1,7 +1,7 @@ import { AdSlot } from '@/components/GoogleAdsense' import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import CONFIG from '../config' import { BlogItem } from './BlogItem' @@ -49,7 +49,7 @@ export default function BlogListPage(props) {
      - NEWER POSTS - - + OLDER POSTS - +
      ) diff --git a/themes/typography/components/ExampleRecentComments.js b/themes/typography/components/ExampleRecentComments.js index 93cde585..663151a1 100644 --- a/themes/typography/components/ExampleRecentComments.js +++ b/themes/typography/components/ExampleRecentComments.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { RecentComments } from '@waline/client' import { useEffect, useState } from 'react' import { siteConfig } from '@/lib/config' @@ -26,7 +26,7 @@ const ExampleRecentComments = (props) => { {!onLoading && comments && comments.length === 0 &&
      No Comments
      } {!onLoading && comments && comments.length > 0 && comments.map((comment) =>
      -
      --{comment.nick}
      +
      --{comment.nick}
      )} diff --git a/themes/typography/components/MenuItemCollapse.js b/themes/typography/components/MenuItemCollapse.js index 50174dc3..9de40a79 100644 --- a/themes/typography/components/MenuItemCollapse.js +++ b/themes/typography/components/MenuItemCollapse.js @@ -1,5 +1,5 @@ import Collapse from '@/components/Collapse' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useState } from 'react' /** @@ -32,7 +32,7 @@ export const MenuItemCollapse = props => { className='w-full px-8 py-3 text-left border-b dark:bg-hexo-black-gray dark:border-black' onClick={toggleShow}> {!hasSubMenu && ( - @@ -44,7 +44,7 @@ export const MenuItemCollapse = props => { )} {link?.name} - + )} {hasSubMenu && (
      {
      - + {sLink?.icon && ( @@ -81,7 +81,7 @@ export const MenuItemCollapse = props => { )} {sLink.title} - +
      ) })} diff --git a/themes/typography/components/MenuItemDrop.js b/themes/typography/components/MenuItemDrop.js index a5effb13..fa718f13 100644 --- a/themes/typography/components/MenuItemDrop.js +++ b/themes/typography/components/MenuItemDrop.js @@ -1,4 +1,4 @@ -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' import { useState } from 'react' @@ -18,12 +18,12 @@ export const MenuItemDrop = ({ link }) => { return (
      {!hasSubMenu && ( - {link?.name} - + ) } @@ -57,12 +57,12 @@ export const MenuItemDrop = ({ link }) => {
    • - + {link?.icon &&   } {sLink.title} - +
    • ) })} diff --git a/themes/typography/components/NavBar.js b/themes/typography/components/NavBar.js index 53ab0b8c..e13a7209 100644 --- a/themes/typography/components/NavBar.js +++ b/themes/typography/components/NavBar.js @@ -4,7 +4,7 @@ import { useState } from 'react' import { useSimpleGlobal } from '..' import { MenuList } from './MenuList' import SocialButton from './SocialButton' -import Link from 'next/link' +import SmartLink from '@/components/SmartLink' /** * 菜单导航 @@ -15,7 +15,7 @@ export default function NavBar(props) { return (
      - +
      {siteConfig('TYPOGRAPHY_BLOG_NAME')} @@ -24,7 +24,7 @@ export default function NavBar(props) { {siteConfig('TYPOGRAPHY_BLOG_NAME_EN')}
      - +
      ) })}