@@ -5,7 +5,6 @@ import Link from 'next/link'
5
5
import RemoveMarkdown from 'remove-markdown'
6
6
import type { PostModel } from '@mx-space/api-client'
7
7
8
- import { IcRoundKeyboardDoubleArrowRight } from '~/components/icons/arrow'
9
8
import { PostPinIcon } from '~/components/widgets/post/PostPinIcon'
10
9
11
10
import { PostItemHoverOverlay } from './PostItemHoverOverlay'
@@ -23,39 +22,41 @@ export const PostItem = memo<{ data: PostModel }>(({ data }) => {
23
22
return (
24
23
< Link
25
24
href = { postLink }
26
- className = "relative flex flex-col space-y-2 py-6 focus-visible:!shadow-none"
25
+ className = "relative flex flex-col py-6 focus-visible:!shadow-none"
27
26
>
28
27
< PostItemHoverOverlay />
29
- < h2 className = "relative text-2xl font-medium" >
28
+ < h2 className = "relative text-center text- 2xl font-medium lg:text-left " >
30
29
< Balancer > { data . title } </ Balancer >
31
30
32
31
< PostPinIcon pin = { ! ! data . pin } id = { data . id } />
33
32
</ h2 >
34
- { ! ! data . summary && (
35
- < p className = "break-all leading-relaxed text-gray-900 dark:text-slate-50" >
36
- 摘要: { data . summary }
37
- </ p >
38
- ) }
39
- < div className = "relative overflow-hidden" >
40
- { hasImage && (
41
- < div
42
- className = { clsx (
43
- 'float-right h-24 w-24 overflow-hidden rounded-md' ,
44
- 'bg-contain bg-center bg-no-repeat' ,
45
- ) }
46
- style = { { backgroundImage : `url(${ hasImage } )` } }
47
- />
33
+ < main className = "relative mt-8 space-y-2" >
34
+ { ! ! data . summary && (
35
+ < p className = "break-all leading-relaxed text-gray-900 dark:text-slate-50" >
36
+ 摘要: { data . summary }
37
+ </ p >
48
38
) }
49
- < p className = "break-all leading-loose text-gray-800/90 dark:text-gray-200/90" >
50
- { displayText }
51
- </ p >
52
- </ div >
39
+ < div className = "relative overflow-hidden" >
40
+ { hasImage && (
41
+ < div
42
+ className = { clsx (
43
+ 'float-right h-24 w-24 overflow-hidden rounded-md' ,
44
+ 'bg-contain bg-center bg-no-repeat' ,
45
+ ) }
46
+ style = { { backgroundImage : `url(${ hasImage } )` } }
47
+ />
48
+ ) }
49
+ < p className = "break-all leading-loose text-gray-800/90 dark:text-gray-200/90" >
50
+ { displayText }
51
+ </ p >
52
+ </ div >
53
+ </ main >
53
54
54
- < div className = "post-meta-bar flex select-none items-center gap-4 text-base-content/60" >
55
+ < div className = "post-meta-bar mt-2 flex select-none flex-wrap items-center justify-end gap-4 text-base-content/60" >
55
56
< PostMetaBar data = { data } />
56
- < span className = "flex flex-shrink-0 select-none items-center space-x-1 text-accent hover:text-accent [&>svg]:hover:ml-2" >
57
+ < span className = "flex flex-shrink-0 select-none items-center space-x-1 text-right text- accent hover:text-accent [&>svg]:hover:ml-2" >
57
58
< span > 阅读全文</ span >
58
- < IcRoundKeyboardDoubleArrowRight className = "text-lg transition-[margin]" />
59
+ < i className = "icon-[mingcute--arrow-right-line] text-lg transition-[margin]" />
59
60
</ span >
60
61
</ div >
61
62
</ Link >
0 commit comments