3
0
mirror of https://github.com/Qortal/q-tube.git synced 2025-02-14 11:15:52 +00:00

fix playlist card

This commit is contained in:
PhilReact 2023-12-27 00:19:02 +02:00
parent da2c2b11c9
commit a6bb7e9957
2 changed files with 5 additions and 46 deletions

View File

@ -23,28 +23,12 @@ const ResponsiveImage: React.FC<ResponsiveImageProps> = ({
const aspectRatio = (height / width) * 100
const imageStyle: CSSProperties = {
width: '100%',
height: '100%',
objectFit: 'cover'
}
const wrapperStyle: CSSProperties = {
position: 'relative',
paddingBottom: `${aspectRatio}%`,
overflow: 'hidden',
...style
}
return (
<Box
sx={{
padding: '2px',
height: '100%'
height: '100%',
...style
}}
>
@ -76,34 +60,6 @@ const ResponsiveImage: React.FC<ResponsiveImageProps> = ({
/>
</Box>
)
return (
<div style={wrapperStyle} className={className}>
{loading ? (
<Skeleton
variant="rectangular"
sx={{
position: 'absolute',
top: 0,
left: 0,
right: 0,
bottom: 0
}}
/>
) : (
<img
src={src}
alt={alt}
style={{
...imageStyle,
position: 'absolute',
top: 0,
left: 0
}}
/>
)}
</div>
)
}
export default ResponsiveImage

View File

@ -606,6 +606,9 @@ export const VideoList = ({ mode }: VideoListProps) => {
src={videoObj?.image}
width={266}
height={150}
style={{
maxHeight: '50%'
}}
/>
<VideoCardTitle>{videoObj?.title}</VideoCardTitle>
<BottomParent>