Merge branch 'stillimage-tw' into 'develop'

Make StillImage Tailwind friendly

See merge request soapbox-pub/soapbox!1925
This commit is contained in:
Alex Gleason
2022-11-22 23:31:38 +00:00
12 changed files with 72 additions and 111 deletions

View File

@@ -74,6 +74,7 @@ const MediaItem: React.FC<IMediaItem> = ({ attachment, displayWidth, onOpenMedia
src={attachment.preview_url}
alt={attachment.description}
style={{ objectPosition: `${x}% ${y}%` }}
className='w-full h-full rounded-lg overflow-hidden'
/>
);
} else if (['gifv', 'video'].indexOf(attachment.type) !== -1) {

View File

@@ -551,13 +551,12 @@ const Header: React.FC<IHeader> = ({ account }) => {
)}
<div>
<div className='relative h-32 w-full lg:h-48 md:rounded-t-xl bg-gray-200 dark:bg-gray-900/50'>
<div className='relative flex flex-col justify-center h-32 w-full lg:h-48 md:rounded-t-xl bg-gray-200 dark:bg-gray-900/50 overflow-hidden isolate'>
{account.header && (
<a href={account.header} onClick={handleHeaderClick} target='_blank'>
<StillImage
src={account.header}
alt='Profile Header'
className='absolute inset-0 object-cover md:rounded-t-xl'
/>
</a>
)}
@@ -577,7 +576,7 @@ const Header: React.FC<IHeader> = ({ account }) => {
<Avatar
src={account.avatar}
size={96}
className='h-24 w-24 rounded-full ring-4 ring-white dark:ring-primary-900'
className='relative h-24 w-24 rounded-full ring-4 ring-white dark:ring-primary-900'
/>
</a>
</div>

View File

@@ -36,13 +36,9 @@ const UserPanel: React.FC<IUserPanel> = ({ accountId, action, badges, domain })
<div className='relative'>
<Stack space={2}>
<Stack>
<div className='-mt-4 -mx-4 h-24 bg-gray-200 relative'>
<div className='-mt-4 -mx-4 h-24 bg-gray-200 relative overflow-hidden'>
{header && (
<StillImage
src={account.get('header')}
className='absolute inset-0 object-cover'
alt=''
/>
<StillImage src={account.header} />
)}
</div>