mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-15 07:26:48 +00:00
HEO主题页脚微调
This commit is contained in:
@@ -1,14 +1,13 @@
|
||||
import { BeiAnGongAn } from '@/components/BeiAnGongAn'
|
||||
import CopyRightDate from '@/components/CopyRightDate'
|
||||
import PoweredBy from '@/components/PoweredBy'
|
||||
import { siteConfig } from '@/lib/config'
|
||||
import SocialButton from './SocialButton'
|
||||
|
||||
const Footer = ({ title }) => {
|
||||
const d = new Date()
|
||||
const currentYear = d.getFullYear()
|
||||
const since = siteConfig('SINCE')
|
||||
const copyrightDate =
|
||||
parseInt(since) < currentYear ? since + '-' + currentYear : currentYear
|
||||
|
||||
/**
|
||||
* 页脚
|
||||
* @returns
|
||||
*/
|
||||
const Footer = () => {
|
||||
return (
|
||||
<footer className='relative flex-shrink-0 bg-white dark:bg-[#1a191d] justify-center text-center m-auto w-full leading-6 text-gray-600 dark:text-gray-100 text-sm'>
|
||||
{/* 颜色过度区 */}
|
||||
@@ -29,14 +28,8 @@ const Footer = ({ title }) => {
|
||||
id='footer-bottom'
|
||||
className='w-full h-20 flex flex-col p-3 lg:flex-row justify-between px-6 items-center bg-[#f1f3f7] dark:bg-[#21232A] border-t dark:border-t-[#3D3D3F]'>
|
||||
<div id='footer-bottom-left'>
|
||||
NotionNext {siteConfig('VERSION')} <i className='fas fa-copyright' />{' '}
|
||||
{`${copyrightDate}`} <i className='mx-1 animate-pulse fas fa-heart' />{' '}
|
||||
<a
|
||||
href={siteConfig('LINK')}
|
||||
className='underline font-bold dark:text-gray-300 '>
|
||||
{siteConfig('AUTHOR')}
|
||||
</a>
|
||||
.
|
||||
<PoweredBy />
|
||||
<CopyRightDate />
|
||||
</div>
|
||||
|
||||
<div id='footer-bottom-right'>
|
||||
|
||||
@@ -122,7 +122,7 @@ const LayoutBase = props => {
|
||||
</main>
|
||||
|
||||
{/* 页脚 */}
|
||||
<Footer title={siteConfig('TITLE')} />
|
||||
<Footer />
|
||||
|
||||
{HEO_LOADING_COVER && <LoadingCover />}
|
||||
</div>
|
||||
@@ -273,7 +273,9 @@ const LayoutSlug = props => {
|
||||
setTimeout(
|
||||
() => {
|
||||
if (isBrowser) {
|
||||
const article = document.querySelector('#article-wrapper #notion-article')
|
||||
const article = document.querySelector(
|
||||
'#article-wrapper #notion-article'
|
||||
)
|
||||
if (!article) {
|
||||
router.push('/404').then(() => {
|
||||
console.warn('找不到页面', router.asPath)
|
||||
|
||||
Reference in New Issue
Block a user