File tree 2 files changed +17
-15
lines changed
src/app/(journal)/_components
2 files changed +17
-15
lines changed Original file line number Diff line number Diff line change @@ -150,15 +150,15 @@ export function EntryOperations({
150
150
< Button
151
151
size = "icon"
152
152
onClick = { ( ) => setShowDeleteAlert ( true ) }
153
- className = "rounded-full opacity-0 transition-all duration-300 hover:-translate-y-0.5 group-hover:opacity-100"
153
+ className = "rounded-full opacity-100 transition-all duration-300 hover:-translate-y-0.5 group-hover:opacity-100 md:opacity-0 "
154
154
>
155
155
< Trash className = "size-4" />
156
156
</ Button >
157
157
< Button
158
158
size = "icon"
159
159
onClick = { handleBookmarkToggle }
160
160
disabled = { isTransitionPending }
161
- className = "rounded-full opacity-0 transition-all duration-300 hover:-translate-y-0.5 group-hover:opacity-100"
161
+ className = "rounded-full opacity-100 transition-all duration-300 hover:-translate-y-0.5 group-hover:opacity-100 md:opacity-0 "
162
162
>
163
163
< BookmarkIcon
164
164
className = { cn (
Original file line number Diff line number Diff line change @@ -61,25 +61,27 @@ export function JournalEntryCard({
61
61
className
62
62
) }
63
63
>
64
- < Link
65
- href = { `/editor/${ entry . id } ` }
66
- className = "text-lg font-semibold hover:underline lg:text-xl"
67
- >
68
- { " " }
69
- { entry . title }
70
- </ Link >
64
+ < div className = "grow" >
65
+ < Link
66
+ href = { `/editor/${ entry . id } ` }
67
+ className = "text-lg font-semibold hover:underline lg:text-xl"
68
+ >
69
+ { " " }
70
+ { entry . title }
71
+ </ Link >
72
+ < p className = "text-sm text-muted-foreground lg:text-base" >
73
+ { /* @ts -ignore */ }
74
+ { entry . content ?. blocks [ 0 ] ?. data . text }
75
+ </ p >
76
+ </ div >
71
77
{ isBookmarked && (
72
78
< div className = "absolute right-4 top-0 rounded-full bg-muted p-2" >
73
79
< BookmarkIcon className = "size-4 fill-foreground text-foreground" />
74
80
</ div >
75
81
) }
76
- < p className = "text-sm text-muted-foreground lg:text-base" >
77
- { /* @ts -ignore */ }
78
- { entry . content ?. blocks [ 0 ] ?. data . text }
79
- </ p >
80
82
81
- < div className = "absolute bottom-5 right-4 flex items-center justify-between transition-all duration-300 group-hover:block" >
82
- < p className = "block text-sm text-muted-foreground transition-all duration-300 group-hover:hidden" >
83
+ < div className = "mt-auto flex w-full items-center justify-between self-end transition-all duration-300 group-hover:block" >
84
+ < p className = "text-sm text-muted-foreground transition-all duration-300 group-hover:hidden" >
83
85
{ formatDate ( entry . createdAt ?. toDateString ( ) ) }
84
86
</ p >
85
87
< EntryOperations
You can’t perform that action at this time.
0 commit comments