Skip to content

Commit 9cd05f7

Browse files
🎨 fix image on peoplecard (#3772)
1 parent f1b59b1 commit 9cd05f7

2 files changed

Lines changed: 17 additions & 16 deletions

File tree

web/sections/cards/PeopleCard/PeopleCard.tsx

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -48,37 +48,37 @@ const PeopleCard = forwardRef<HTMLDivElement, PeopleCardProps>(
4848
const linkClassNames =
4949
'text-norwegian-woods-100 no-underline hover:underline text-sm'
5050

51-
const variantContentClassNames = {
52-
default: ``,
53-
single: ``,
54-
}
55-
5651
return (
5752
<>
5853
<div
5954
ref={ref}
6055
className={twMerge(
6156
`focus-visible:envis-outline dark:focus-visible:envis-outline-invert flex h-full w-full items-center justify-start rounded-sm bg-white-100 px-6 py-8 text-slate-80 shadow-card focus:outline-hidden dark:text-white-100`,
62-
variant === 'default' && 'gap-4 lg:flex-col lg:gap-8',
57+
variant === 'default' &&
58+
'items-start gap-4 lg:flex-col lg:items-center lg:gap-8',
6359
variant === 'single' &&
6460
'flex-col gap-8 lg:w-fit lg:flex-row lg:gap-12',
6561
className,
6662
)}
6763
>
6864
{image && (
69-
<Image
70-
image={image}
71-
fill
72-
grid='xs'
73-
aspectRatio='1:1'
74-
className={`${variant === 'single' ? 'size-40 lg:size-64' : 'size-32 lg:size-40'}`}
75-
imageClassName='rounded-full'
76-
/>
65+
<div className='aspect-square w-24 shrink-0 self-start overflow-hidden rounded-full sm:w-28 lg:w-32 lg:self-center'>
66+
<Image
67+
image={image}
68+
fill
69+
grid='xs'
70+
aspectRatio='1:1'
71+
keepRatioOnMobile
72+
className='h-full w-full'
73+
imageClassName='h-full w-full object-cover'
74+
/>
75+
</div>
7776
)}
7877
<div
7978
className={twMerge(
8079
`flex flex-col items-start justify-center gap-3`,
81-
variant === 'default' && 'lg:items-center lg:*:text-center',
80+
variant === 'default' &&
81+
'lg:items-center lg:justify-center lg:*:text-center',
8282
variant === 'single' && 'lg:items-start',
8383
)}
8484
>
@@ -108,7 +108,7 @@ const PeopleCard = forwardRef<HTMLDivElement, PeopleCardProps>(
108108
: undefined
109109
}
110110
variant='fit'
111-
className='m-0 p-0'
111+
className='m-0 mt-2 p-0'
112112
>
113113
{cv?.label}
114114
</ResourceLink>

web/sections/promotions/PromotionsBlock.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ const PromotionsBlock = ({
241241
`3xl:mx-layout-md grid auto-rows-fr grid-cols-1 gap-x-4 gap-y-3 md:grid-cols-2 2xl:grid-cols-3`,
242242
promotionList?.length === 2 && '2xl:grid-cols-2',
243243
promotionList?.length === 3 && 'md:grid-cols-3',
244+
promotionVariant === 'promotePeople' && 'max-lg:auto-rows-auto',
244245
)}
245246
>
246247
{promotionList?.map((promotion: any) => {

0 commit comments

Comments
 (0)