{title}
{href && ( - 查看全部 - + )}{title}
{href && ( - 查看全部 - + )}-
{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 ( - +
) })} 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 }) => {{e.name}({e.count})- +{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 }) => {
-
-
+
{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?.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 (
- {
- {post.title}
-
-
+
{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端分页按钮 */}
- {category.name}({category.count}) - + ) })}
- {p.title} - +
-
-
+
{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 (
- {
-
{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 (
{' '} {post.category} - + - {prev && {prev.title} - } - {next && } + {next && ); } 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 }) => {{next.title} - } + }{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} - + ) })} > 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 <> - +
- - {sLink.icon && ( - + )} {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 &&
-
-
+
{post.title} - +
))}
- {category.name}({category.count}) - + ); })}
- {p.title} - +
- {post.title}
-
-
+
{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端分页按钮 */}
- {category.name}({category.count}) - + ) })}
- {p.title} - +
-
-
+
{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) {
{/* - {category.name}({category.count}) - + ); })}
- {p.title} - +
- - {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 = () => {
-
-
+
{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 }) => {
-
-
+
{post.title} - +
))}
- - {l.TITLE} - + ) })} @@ -73,7 +73,7 @@ export const Footer = props => {
- - {siteConfig('STARTER_HERO_BUTTON_1_TEXT', null, config)} - + )} {siteConfig('STARTER_HERO_BUTTON_2_TEXT', null, config) && (
- - { /> )} {siteConfig('STARTER_HERO_BUTTON_2_TEXT', null, config)} - + )}
- - { } 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 c0311b77..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' @@ -50,34 +50,49 @@ import { SVG404 } from './components/svg/SVG404' * @returns */ const LayoutBase = props => { - const { children } = props + const { children } = props + // 极简模式,会隐藏掉页头页脚等组件,便于嵌入网页等功能 + const { isLiteMode } = useGlobal() + const router = useRouter() - // 加载wow动画 - useEffect(() => { - loadWowJS() - }, []) + // 加载wow动画 + useEffect(() => { + loadWowJS() + }, []) - return ( -
-
-
+
{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 (
{post?.title}
-
{categoryOptions?.map(category => {
return (
-
-
{latestPosts?.map(p => {
return (
-
+
-
{recommendPosts.map(post => (
- {p.title} - +
@@ -37,7 +37,7 @@ const BlogPost = ({ 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) => {
-
{categories?.map(category => {
return (
-
-
{latestPosts?.map(p => {
return (
-
+
{tag}
- ) +-
{categoryOptions?.map(category => {
return (
-
-
{latestPosts?.map(p => {
return (
-
+
- {p.title} - +
{navBarTitle}
- +
- {siteConfig('TITLE')}
+
-
{categories?.map(category => {
return (
-
-
{latestPosts?.map(p => {
return (
-
+
{tag}
- ) +- {item.title} - +
-
{siteConfig('PROXIO_HERO_BUTTON_1_TEXT', null, config) && (
{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.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}) - + ) })}
-
{siteConfig('POST_TITLE_ICON') && (
)}
{post.title}
-
+
{/* 文章信息 */}
@@ -60,12 +60,12 @@ export const BlogItem = props => {
-
{' '}
{post.date?.start_date || post.createdTime}
-
+
-
{recommendPosts.map(post => (
- {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')} - + > )}{siteConfig('STARTER_FEATURE_1_TEXT_1')}
- {siteConfig('STARTER_FEATURE_1_BUTTON_TEXT')} - +{siteConfig('STARTER_FEATURE_2_TEXT_1')}
- {siteConfig('STARTER_FEATURE_2_BUTTON_TEXT')} - +{siteConfig('STARTER_FEATURE_3_TEXT_1')}
- {siteConfig('STARTER_FEATURE_3_BUTTON_TEXT')} - +{siteConfig('STARTER_FEATURE_4_TEXT_1')}
- {siteConfig('STARTER_FEATURE_3_BUTTON_TEXT')} - +-
{siteConfig('STARTER_HERO_BUTTON_1_TEXT', null, config) && (
{siteConfig('STARTER_404_TEXT')}
- {siteConfig('STARTER_404_BACK')} - + @@ -347,24 +362,24 @@ const LayoutPostList = props => { className='wow fadeInUp group mb-10' data-wow-delay='.1s'>- {item.title} - +
{item.summary} @@ -400,7 +415,7 @@ const LayoutCategoryIndex = props => { className='duration-200 flex flex-wrap justify-center items-center '> {categoryOptions?.map(category => { return ( - { {category.name}({category.count}) - + ) })}