mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-16 15:09:28 +00:00
35 lines
1.0 KiB
JavaScript
35 lines
1.0 KiB
JavaScript
import BLOG from '@/blog.config'
|
|
import DarkModeButton from '@/components/DarkModeButton'
|
|
import Vercel from '@/components/Vercel'
|
|
|
|
export const Footer = (props) => {
|
|
const d = new Date()
|
|
const currentYear = d.getFullYear()
|
|
const { post } = props
|
|
const fullWidth = post?.fullWidth ?? false
|
|
|
|
const copyrightDate = (function() {
|
|
if (Number.isInteger(BLOG.SINCE) && BLOG.SINCE < currentYear) {
|
|
return BLOG.SINCE + '-' + currentYear
|
|
}
|
|
return currentYear
|
|
})()
|
|
|
|
return <footer
|
|
className={`z-10 relative mt-6 flex-shrink-0 m-auto w-full text-gray-500 dark:text-gray-400 transition-all ${
|
|
!fullWidth ? 'max-w-2xl px-4' : 'px-4 md:px-24'
|
|
}`}
|
|
>
|
|
<DarkModeButton className='text-center pt-4'/>
|
|
<hr className="border-gray-200 dark:border-gray-600" />
|
|
<div className="my-4 text-sm leading-6">
|
|
<div className="flex align-baseline justify-between flex-wrap">
|
|
<p>
|
|
© {BLOG.AUTHOR} {copyrightDate}
|
|
</p>
|
|
<Vercel />
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
}
|