Hexo: 背景图

This commit is contained in:
tangly1024
2022-03-31 11:30:19 +08:00
parent 6bfe030ead
commit 418dc38de6
4 changed files with 7 additions and 8 deletions

View File

@@ -2,10 +2,9 @@ import Link from 'next/link'
import { useGlobal } from '@/lib/global'
import formatDate from '@/lib/formatDate'
import { useEffect } from 'react'
import BLOG from '@/blog.config'
export default function HeaderArticle ({ post }) {
const headerImage = post?.page_cover ? `url("${post.page_cover}")` : `url("/${BLOG.HOME_BANNER_IMAGE}")`
export default function HeaderArticle ({ post, siteInfo }) {
const headerImage = post?.page_cover ? `url("${post.page_cover}")` : `url("${siteInfo?.pageCover}")`
const { isDarkMode } = useGlobal()
const { locale } = useGlobal()