@@ -4,6 +4,7 @@ import NotionPage from '@/components/NotionPage'
4
4
import { siteConfig } from '@/lib/config'
5
5
import { useGlobal } from '@/lib/global'
6
6
import Link from 'next/link'
7
+ import CONFIG from '../config'
7
8
import CategoryItem from './CategoryItem'
8
9
import TagItemMini from './TagItemMini'
9
10
@@ -13,7 +14,8 @@ import TagItemMini from './TagItemMini'
13
14
* @returns
14
15
*/
15
16
const PostItemCardTop = ( { post, showSummary } ) => {
16
- const showPreview = siteConfig ( 'MAGZINE_POST_LIST_PREVIEW' ) && post ?. blockMap
17
+ const showPreview =
18
+ siteConfig ( 'MAGZINE_POST_LIST_PREVIEW' , true , CONFIG ) && post ?. blockMap
17
19
const { locale } = useGlobal ( )
18
20
return (
19
21
< div
@@ -24,24 +26,24 @@ const PostItemCardTop = ({ post, showSummary }) => {
24
26
// data-aos-anchor-placement='top-bottom'
25
27
className = 'mb-6 max-w-screen-3xl ' >
26
28
< div className = 'flex flex-col w-full' >
27
- { siteConfig ( 'MAGZINE_POST_LIST_COVER' ) && post ?. pageCoverThumbnail && (
28
- < Link
29
- href = { post ?. href || '' }
30
- passHref
31
- className = {
32
- 'cursor-pointer hover:underline text-4xl leading-tight dark:text-gray-300 dark:hover:text-gray-400'
33
- } >
34
- < div className = 'w-full max-h-80 object-cover overflow-hidden mb-2' >
35
- < LazyImage
36
- priority
37
- alt = { post ?. title }
38
- src = { post ?. pageCoverThumbnail }
39
- style = { post ?. pageCoverThumbnail ? { } : { height : '0px' } }
40
- className = 'w-full max- h-80 object-cover hover:scale-125 duration-150'
41
- />
42
- </ div >
43
- </ Link >
44
- ) }
29
+ { siteConfig ( 'MAGZINE_POST_LIST_COVER' , true , CONFIG ) &&
30
+ post ?. pageCoverThumbnail && (
31
+ < Link
32
+ href = { post ?. href || '' }
33
+ passHref
34
+ className = {
35
+ 'cursor-pointer hover:underline text-4xl leading-tight dark:text-gray-300 dark:hover:text-gray-400'
36
+ } >
37
+ < div className = 'w-full h-80 object-cover overflow-hidden mb-2' >
38
+ < LazyImage
39
+ priority
40
+ alt = { post ?. title }
41
+ src = { post ?. pageCoverThumbnail }
42
+ className = 'w-full h-80 object-cover hover:scale-125 duration-150'
43
+ />
44
+ </ div >
45
+ </ Link >
46
+ ) }
45
47
46
48
< div className = 'flex py-2 mr-2 items-center' >
47
49
{ siteConfig ( 'MAGZINE_POST_LIST_CATEGORY' ) && (
0 commit comments