| export const CategoryCardImage = styled.img` | export const CategoryCardImage = styled.img` | ||||
| width: 18px; | width: 18px; | ||||
| height: 18px; | height: 18px; | ||||
| filter: invert(58%) sepia(100%) saturate(431%) hue-rotate(355deg) brightness(104%) contrast(105%); | |||||
| margin-right: 9px; | margin-right: 9px; | ||||
| position: relative; | position: relative; | ||||
| top: 1px; | top: 1px; |
| </ButtonsContainer> | </ButtonsContainer> | ||||
| <ProfileInfoContainer> | <ProfileInfoContainer> | ||||
| {/* Profile Main Info */} | {/* Profile Main Info */} | ||||
| <ProfileMainInfo profile={props.profile} isAdmin bigProfileCard /> | |||||
| <ProfileMainInfo profile={props.profile} bigProfileCard isAdmin /> | |||||
| {/* Profile Contact */} | {/* Profile Contact */} | ||||
| <ProfileContact profile={props.profile} isAdmin /> | |||||
| <ProfileContact profile={props.profile} bigProfileCard isAdmin /> | |||||
| </ProfileInfoContainer> | </ProfileInfoContainer> | ||||
| <CheckButton | <CheckButton | ||||
| halfwidth={props.halfwidth} | halfwidth={props.halfwidth} |
| )} | )} | ||||
| </ButtonsContainer> | </ButtonsContainer> | ||||
| <ProfileInfoContainer> | <ProfileInfoContainer> | ||||
| <ProfileInfoAndContactContainer isAdmin={props.isAdmin}> | |||||
| <ProfileInfoAndContactContainer isAdmin={props.isAdmin} bigProfileCard={props.bigProfileCard}> | |||||
| {profile?._blocked && !props.isAdmin && isMobile && ( | {profile?._blocked && !props.isAdmin && isMobile && ( | ||||
| <BlockedProfile aboveTitle isAdmin={props.isAdmin} /> | <BlockedProfile aboveTitle isAdmin={props.isAdmin} /> | ||||
| )} | )} | ||||
| ProfileCard.propTypes = { | ProfileCard.propTypes = { | ||||
| children: PropTypes.node, | children: PropTypes.node, | ||||
| isAdmin: PropTypes.bool, | isAdmin: PropTypes.bool, | ||||
| bigProfileCard: PropTypes.bool, | |||||
| }; | }; | ||||
| export default ProfileCard; | export default ProfileCard; |
| flex-direction: column; | flex-direction: column; | ||||
| margin-bottom: ${props => props.isAdmin && "36px"}; | margin-bottom: ${props => props.isAdmin && "36px"}; | ||||
| @media (max-width: 600px) { | @media (max-width: 600px) { | ||||
| padding-bottom: 18px; | |||||
| ${props => props.isAdmin && 'gap: 18px;'} | |||||
| flex-direction: ${props => props.isAdmin ? "row" : "column"}; | |||||
| padding-bottom: ${props => props.isAdmin ? '0' : '18px'}; | |||||
| margin-bottom: ${props => props.isAdmin && '0'}; | |||||
| ${props => props.bigProfileCard && 'gap: 18px;'} | |||||
| flex-direction: ${props => props.bigProfileCard ? "row" : "column"}; | |||||
| } | } | ||||
| `; | `; | ||||
| return ( | return ( | ||||
| <ProfileContactContainer | <ProfileContactContainer | ||||
| container | container | ||||
| bigProfileCard={props.bigProfileCard} | |||||
| isAdmin={props.isAdmin} | isAdmin={props.isAdmin} | ||||
| direction={{ xs: "column", sm: "row" }} | direction={{ xs: "column", sm: "row" }} | ||||
| justifyContent={{ xs: "center", sm: "start" }} | justifyContent={{ xs: "center", sm: "start" }} | ||||
| <Stack direction="row"> | <Stack direction="row"> | ||||
| <LocationIcon isMyProfile={props.isMyProfile} /> | <LocationIcon isMyProfile={props.isMyProfile} /> | ||||
| <ContactItem | <ContactItem | ||||
| bigProfileCard={props.bigProfileCard} | |||||
| isAdmin={props.isAdmin} | isAdmin={props.isAdmin} | ||||
| isMyProfile={props.isMyProfile} | isMyProfile={props.isMyProfile} | ||||
| variant="subtitle2" | variant="subtitle2" | ||||
| <Stack direction="row"> | <Stack direction="row"> | ||||
| <MailIcon isMyProfile={props.isMyProfile} /> | <MailIcon isMyProfile={props.isMyProfile} /> | ||||
| <ContactItem | <ContactItem | ||||
| bigProfileCard={props.bigProfileCard} | |||||
| isAdmin={props.isAdmin} | isAdmin={props.isAdmin} | ||||
| isMyProfile={props.isMyProfile} | isMyProfile={props.isMyProfile} | ||||
| variant="subtitle2" | variant="subtitle2" | ||||
| <Stack direction="row"> | <Stack direction="row"> | ||||
| <GlobeIcon isMyProfile={props.isMyProfile} /> | <GlobeIcon isMyProfile={props.isMyProfile} /> | ||||
| <ContactItem | <ContactItem | ||||
| bigProfileCard={props.bigProfileCard} | |||||
| isAdmin={props.isAdmin} | isAdmin={props.isAdmin} | ||||
| isMyProfile={props.isMyProfile} | isMyProfile={props.isMyProfile} | ||||
| variant="subtitle2" | variant="subtitle2" | ||||
| isMyProfile: PropTypes.bool, | isMyProfile: PropTypes.bool, | ||||
| children: PropTypes.node, | children: PropTypes.node, | ||||
| isAdmin: PropTypes.bool, | isAdmin: PropTypes.bool, | ||||
| bigProfileCard: PropTypes.bool, | |||||
| }; | }; | ||||
| export default ProfileContact; | export default ProfileContact; |
| } | } | ||||
| @media (max-width: 600px) { | @media (max-width: 600px) { | ||||
| ${(props) => props.isAdmin && `overflow: hidden;`} | ${(props) => props.isAdmin && `overflow: hidden;`} | ||||
| padding-top: ${(props) => props.isAdmin && "88px"}; | |||||
| padding-top: ${(props) => props.isAdmin && (props.bigProfileCard ? "88px" : "58px")}; | |||||
| padding-bottom: ${(props) => (props.isAdmin ? "1rem" : "0")}; | padding-bottom: ${(props) => (props.isAdmin ? "1rem" : "0")}; | ||||
| gap: 5px; | gap: 5px; | ||||
| width: ${props => props.isAdmin && 'calc(100vw - 198px)'}; | |||||
| width: ${props => props.bigProfileCard && 'calc(100vw - 198px)'}; | |||||
| } | } | ||||
| `; | `; | ||||
| export const LocationIcon = styled(Location)` | export const LocationIcon = styled(Location)` | ||||
| font-size: 14px; | font-size: 14px; | ||||
| bottom: 4px; | bottom: 4px; | ||||
| margin-right: 0; | margin-right: 0; | ||||
| ${props => props.isAdmin && css` | |||||
| ${props => props.bigProfileCard && css` | |||||
| width: calc(100vw - 218px); | width: calc(100vw - 218px); | ||||
| overflow-wrap: break-word; | overflow-wrap: break-word; | ||||
| `} | `} |
| } | } | ||||
| }; | }; | ||||
| return ( | return ( | ||||
| <ProfileMainInfoContainer isAdmin={props.isAdmin}> | |||||
| <ProfileMainInfoContainer | |||||
| bigProfileCard={props.bigProfileCard} | |||||
| isAdmin={props.isAdmin} | |||||
| > | |||||
| <AvatarImageContainer> | <AvatarImageContainer> | ||||
| <AvatarImage | <AvatarImage | ||||
| isAdmin={props.isAdmin} | isAdmin={props.isAdmin} | ||||
| <BlockedProfile hideIcon redText aboveTitle isAdmin /> | <BlockedProfile hideIcon redText aboveTitle isAdmin /> | ||||
| )} | )} | ||||
| <ProfileName | <ProfileName | ||||
| bigProfileCard={props.bigProfileCard} | |||||
| isAdmin={props.isAdmin} | isAdmin={props.isAdmin} | ||||
| isMyProfile={props.isMyProfile} | isMyProfile={props.isMyProfile} | ||||
| isBlocked={props.isBlocked} | isBlocked={props.isBlocked} |
| align-items: start; | align-items: start; | ||||
| flex-direction: row; | flex-direction: row; | ||||
| @media (max-width: 600px) { | @media (max-width: 600px) { | ||||
| flex-direction: ${(props) => (props.isAdmin ? `column-reverse` : `row`)}; | |||||
| flex-direction: ${(props) => | |||||
| props.bigProfileCard ? `column-reverse` : `row`}; | |||||
| gap: 18px; | gap: 18px; | ||||
| max-width: 108px; | max-width: 108px; | ||||
| ${(props) => | |||||
| props.isAdmin && | |||||
| !props.bigProfileCard && | |||||
| css` | |||||
| align-items: center; | |||||
| position: relative; | |||||
| top: 36px; | |||||
| `} | |||||
| } | } | ||||
| `; | `; | ||||
| export const AvatarImageContainer = styled(Grid)` | export const AvatarImageContainer = styled(Grid)` | ||||
| align-items: center; | align-items: center; | ||||
| `; | `; | ||||
| export const AvatarImage = styled.img` | export const AvatarImage = styled.img` | ||||
| border: 1px solid black; | |||||
| min-height: ${(props) => (props.isAdmin ? `108px` : `144px`)}; | min-height: ${(props) => (props.isAdmin ? `108px` : `144px`)}; | ||||
| min-width: ${(props) => (props.isAdmin ? `108px` : `144px`)}; | min-width: ${(props) => (props.isAdmin ? `108px` : `144px`)}; | ||||
| width: ${(props) => (props.isAdmin ? `108px` : `144px`)}; | width: ${(props) => (props.isAdmin ? `108px` : `144px`)}; | ||||
| cursor: ${(props) => props.isAdmin && `pointer`}; | cursor: ${(props) => props.isAdmin && `pointer`}; | ||||
| @media (max-width: 600px) { | @media (max-width: 600px) { | ||||
| font-size: 18px; | font-size: 18px; | ||||
| line-height: 24px; | |||||
| margin-bottom: 0; | margin-bottom: 0; | ||||
| ${props => props.isAdmin && css` | |||||
| max-width: calc(100vw - 200px); | |||||
| min-width: 0; | |||||
| white-space: nowrap; | |||||
| text-overflow: ellipsis; | |||||
| overflow: hidden; | |||||
| display: inline; | |||||
| `} | |||||
| ${(props) => | |||||
| props.bigProfileCard && | |||||
| css` | |||||
| max-width: calc(100vw - 200px); | |||||
| min-width: 0; | |||||
| text-overflow: ellipsis; | |||||
| overflow: hidden; | |||||
| white-space: nowrap; | |||||
| `} | |||||
| ${(props) => | |||||
| props.isAdmin && | |||||
| !props.bigProfileCard && | |||||
| css` | |||||
| max-width: calc(100vw - 200px); | |||||
| min-width: 0; | |||||
| text-overflow: ellipsis; | |||||
| overflow: hidden; | |||||
| display: -webkit-box; | |||||
| max-height: 48px; | |||||
| -webkit-line-clamp: 2; | |||||
| -webkit-box-orient: vertical; | |||||
| `} | |||||
| } | } | ||||
| `; | `; | ||||
| export const ProfilePIBContainer = styled(Grid)` | export const ProfilePIBContainer = styled(Grid)` |