mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-28 21:18:57 +00:00
Fix card layout for cards without cover (#2831)
This commit is contained in:
@@ -54,13 +54,15 @@ export async function RecordCard(
|
||||
// On mobile, check if we can display the cover responsively or not:
|
||||
// - If the file has a landscape aspect ratio, we display it normally
|
||||
// - If the file is square or portrait, we display it left with 40% of the card width
|
||||
coverIsLandscape
|
||||
? 'grid-rows-[auto,1fr]'
|
||||
: [
|
||||
'grid-cols-[40%,_1fr]',
|
||||
'min-[432px]:grid-cols-none',
|
||||
'min-[432px]:grid-rows-[auto,1fr]',
|
||||
],
|
||||
cover
|
||||
? coverIsLandscape
|
||||
? 'grid-rows-[auto,1fr]'
|
||||
: [
|
||||
'grid-cols-[40%,_1fr]',
|
||||
'min-[432px]:grid-cols-none',
|
||||
'min-[432px]:grid-rows-[auto,1fr]',
|
||||
]
|
||||
: null,
|
||||
)}
|
||||
>
|
||||
{cover ? (
|
||||
|
||||
Reference in New Issue
Block a user