Skip to content

Commit

Permalink
fixed styles in company card
Browse files Browse the repository at this point in the history
  • Loading branch information
Lvyshnevska committed Nov 30, 2024
1 parent 715b8b8 commit 88b1120
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 48 deletions.
59 changes: 29 additions & 30 deletions FrontEnd/src/components/CompanyCard/CompanyCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,33 +98,34 @@ export default function CompanyCard({
)}
</div>
<div className={styles['company-card__text-block']}>
<Tooltip
title={activitiesString}
placement="bottom"
pointAtCenter={true}
>
<p className={styles['company-card__category-text']}>
{activitiesSliceString}
</p>
</Tooltip>
<div className={styles['company-card__text-block__header']}>
<Tooltip
title={activitiesString}
placement="bottom"
pointAtCenter={true}
>
<p className={styles['company-card__category-text']}>
{activitiesSliceString}
</p>
</Tooltip>

<h3 className={styles['company-card__name-text']}>
{profile.name}
</h3>
<Tooltip
title={profile.regions_ukr_display}
placement="bottom"
pointAtCenter={true}
>
<p className={styles['company-card__region-text']}>
{regions
? regions.length < lengthOfRegion
? regions
: `${regions.substring(0, 35)}...`
: ''}
</p>
</Tooltip>
</div>
<Tooltip
title={profile.regions_ukr_display}
placement="bottom"
pointAtCenter={true}
>
<p className={styles['company-card__region-text']}>
{regions
? regions.length < lengthOfRegion
? regions
: `${regions.substring(0, 35)}...`
: ''}
</p>
</Tooltip>
<div className={styles['company-card__footer_content']}>
<Tooltip
title={
Expand All @@ -138,6 +139,12 @@ export default function CompanyCard({
<CategoryBadges categories={profile.categories.slice(0, 3)} />
</div>
</Tooltip>
<StarForLike
isSaved={profile.is_saved}
isAuthorized={isAuthorized}
ownProfile={ownProfile}
handleClick={profile.is_saved ? handleDeleteSaved : handleSave}
/>
</div>
</div>
</div>
Expand All @@ -157,14 +164,6 @@ export default function CompanyCard({
)}
</div>
</Link>
<div className={styles['company-card__star']}>
<StarForLike
isSaved={profile.is_saved}
isAuthorized={isAuthorized}
ownProfile={ownProfile}
handleClick={profile.is_saved ? handleDeleteSaved : handleSave}
/>
</div>
</div>
);
}
Expand Down
28 changes: 10 additions & 18 deletions FrontEnd/src/components/CompanyCard/CompanyCard.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,21 @@

.company-card__text-block {
width: 345px;
height: 177px;
height: 181px;
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: space-around;
box-sizing: border-box;
gap: 16px;
padding: 16px;
border-radius: 0 0 12px 12px;
}

.company-card__text-block__header {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 12px;
gap: 16px;
}

.company-card__category-text {
Expand All @@ -78,14 +80,11 @@
font-weight: 700;
line-height: 120%;
text-align: left;
padding-left: 16px;
padding-top: 6px;
max-width: 262px;
height: 35px;
}

.company-card__name-text {
height: 44px;
color: var(--companies-card-text-color);
font-family: var(--font-logo);
font-size: 20px;
Expand All @@ -94,7 +93,6 @@
line-height: 120%;
text-transform: uppercase;
text-align: left;
padding-left: 16px;
overflow: hidden;
}

Expand All @@ -109,22 +107,22 @@
line-height: 20px;
letter-spacing: -0.14px;
text-align: left;
padding-left: 16px;
margin-top: -8px;
}

.company-card__footer_content {
width: 100%;
display: flex;
flex-direction: row;
justify-content: space-between;
padding-left: 13px;
padding-bottom: 2px;
}

.company-card__badges_block {
height: 25px;
height: 30px;
display: inline-block;
overflow: hidden;
padding-bottom: 6px;
max-width: 272px;
margin-left: -5px;
}

.company-card__badge-text {
Expand Down Expand Up @@ -158,12 +156,6 @@
object-fit: cover;
}

.company-card__star {
position: absolute;
left: 296px;
bottom: 13px;
}

@media only screen and (min-width: 1200px) {

.company-card,
Expand Down

0 comments on commit 88b1120

Please sign in to comment.