This commit is contained in:
seb
2026-10-03 07:32:29 +02:00
parent bc4a1e0468
commit c79ece307c
19 changed files with 622 additions and 69 deletions

View File

@@ -65,13 +65,13 @@ class ArticlePhoto extends Component {
fill || objectFit === 'cover'
? { position: 'absolute', inset: 0 }
: {
position: 'absolute',
maxWidth: '100%',
maxHeight: '100%',
aspectRatio,
width: photo.thumbW >= photo.thumbH ? '100%' : 'auto',
height: photo.thumbH > photo.thumbW ? '100%' : 'auto',
}
position: 'absolute',
maxWidth: '100%',
maxHeight: '100%',
aspectRatio,
width: photo.thumbW >= photo.thumbH ? '100%' : 'auto',
height: photo.thumbH > photo.thumbW ? '100%' : 'auto',
}
}
>
<ThumbHashImage thumbHash={photo.thumbHash} />
@@ -87,21 +87,21 @@ class ArticlePhoto extends Component {
sx={
fill || objectFit === 'cover'
? {
display: 'block',
width: '100%',
height: '100%',
objectFit: 'cover',
opacity: thumbLoaded ? 1 : 0,
}
display: 'block',
width: '100%',
height: '100%',
objectFit: 'cover',
opacity: thumbLoaded ? 1 : 0,
}
: {
display: 'block',
maxWidth: '100%',
maxHeight: '100%',
width: 'auto',
height: 'auto',
objectFit: 'contain',
opacity: thumbLoaded ? 1 : 0,
}
display: 'block',
maxWidth: '100%',
maxHeight: '100%',
width: 'auto',
height: 'auto',
objectFit: 'contain',
opacity: thumbLoaded ? 1 : 0,
}
}
/>
) : null}