mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 23:16:49 +00:00
部分组件统一;magzine页脚微调
This commit is contained in:
18
components/AnalyticsBusuanzi.js
Normal file
18
components/AnalyticsBusuanzi.js
Normal file
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* 不蒜子统计 访客和阅读量
|
||||
* @returns
|
||||
*/
|
||||
export default function AnalyticsBusuanzi() {
|
||||
return (
|
||||
<div className='flex gap-x-1'>
|
||||
<span className='hidden busuanzi_container_site_pv whitespace-nowrap'>
|
||||
<i className='fas fa-eye' />
|
||||
<span className='px-1 busuanzi_value_site_pv'> </span>
|
||||
</span>
|
||||
<span className='hidden busuanzi_container_site_uv whitespace-nowrap'>
|
||||
<i className='fas fa-users' />
|
||||
<span className='px-1 busuanzi_value_site_uv'> </span>
|
||||
</span>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -5,7 +5,7 @@ import LazyImage from './LazyImage'
|
||||
* 公安备案号组件
|
||||
* @returns
|
||||
*/
|
||||
export const GongAnBeiAn = () => {
|
||||
export const BeiAnGongAn = props => {
|
||||
const BEI_AN_GONGAN = siteConfig('BEI_AN_GONGAN')
|
||||
// 从BEI_AN_GONGAN 字段中利用正则匹配提取出纯数字部分
|
||||
const codeMatch = BEI_AN_GONGAN?.match(/\d+/) // 匹配纯数字
|
||||
@@ -17,9 +17,9 @@ export const GongAnBeiAn = () => {
|
||||
return null
|
||||
}
|
||||
return (
|
||||
<div className='flex flex-nowrap items-center gap-1 justify-center'>
|
||||
<div className={`${props.className}`}>
|
||||
<LazyImage src='/images/gongan.png' width={15} height={15} />
|
||||
<a href={href} target='_blank' rel='noopener noreferrer'>
|
||||
<a href={href} target='_blank' rel='noopener noreferrer' className='ml-1'>
|
||||
{BEI_AN_GONGAN}
|
||||
</a>
|
||||
</div>
|
||||
21
components/BeiAnSite.js
Normal file
21
components/BeiAnSite.js
Normal file
@@ -0,0 +1,21 @@
|
||||
import { siteConfig } from '@/lib/config'
|
||||
|
||||
/**
|
||||
* 站点域名备案
|
||||
* @returns
|
||||
*/
|
||||
export default function BeiAnSite() {
|
||||
const beian = siteConfig('BEI_AN')
|
||||
if (!beian) {
|
||||
return null
|
||||
}
|
||||
return (
|
||||
<span>
|
||||
<i className='fas fa-shield-alt' />
|
||||
<a href='https://beian.miit.gov.cn/' className='mx-1'>
|
||||
{siteConfig('BEI_AN')}
|
||||
</a>
|
||||
<br />
|
||||
</span>
|
||||
)
|
||||
}
|
||||
26
components/CopyRightDate.js
Normal file
26
components/CopyRightDate.js
Normal file
@@ -0,0 +1,26 @@
|
||||
import { siteConfig } from '@/lib/config'
|
||||
|
||||
/**
|
||||
* 网站版权日期
|
||||
* 示例: 2021-2024
|
||||
* @returns
|
||||
*/
|
||||
export default function CopyRightDate() {
|
||||
const d = new Date()
|
||||
const currentYear = d.getFullYear()
|
||||
const since = siteConfig('SINCE')
|
||||
const copyrightDate =
|
||||
parseInt(since) < currentYear ? since + '-' + currentYear : currentYear
|
||||
|
||||
return (
|
||||
<span className='whitespace-nowrap flex items-center gap-x-1'>
|
||||
<i className='fas fa-copyright' />
|
||||
<span>{copyrightDate}</span>
|
||||
<a
|
||||
href={siteConfig('LINK')}
|
||||
className='underline font-semibold dark:text-gray-300 '>
|
||||
{siteConfig('AUTHOR')}
|
||||
</a>
|
||||
</span>
|
||||
)
|
||||
}
|
||||
20
components/PoweredBy.js
Normal file
20
components/PoweredBy.js
Normal file
@@ -0,0 +1,20 @@
|
||||
import { siteConfig } from '@/lib/config'
|
||||
|
||||
/**
|
||||
* 驱动版权
|
||||
* @returns
|
||||
*/
|
||||
export default function PoweredBy(props) {
|
||||
return (
|
||||
<div
|
||||
className={`gap-x-1 flex flex-wrap text-sm font-serif ${props.className}`}>
|
||||
<span>Powered by</span>
|
||||
<a
|
||||
href='https://github.com/tangly1024/NotionNext'
|
||||
className='underline justify-start'>
|
||||
NotionNext {siteConfig('VERSION')}
|
||||
</a>
|
||||
.
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user