mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-17 23:16:50 +00:00
部分组件统一;magzine页脚微调
This commit is contained in:
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>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user