-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
Update styling of partners sidebar (#2694)
* Unify Partner Info Cards * Remove extraneous "in the press" * Fix layout Style like other grids in mobile; as sidebar otherwise * Fix press test
1 parent
42a4a8b
commit 32c9a7d
Showing
11 changed files
with
283 additions
and
227 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
@import 'pattern-library/core/pattern-library/headers'; | ||
@import 'mixins/placeholder-selectors'; | ||
|
||
.partner-card { | ||
align-content: center; | ||
align-items: center; | ||
color: inherit; | ||
display: grid; | ||
grid-column-gap: $normal-margin; | ||
grid-row-gap: 0.5rem; | ||
grid-template-columns: 33% 1fr; | ||
grid-template-rows: 100%; | ||
min-height: 13rem; | ||
padding: 1.2rem 1rem 1.2rem 1.2rem; | ||
position: relative; | ||
text-decoration: none; | ||
|
||
&:hover::after, | ||
&:active::after { | ||
background: rgba(ui-color(black), 0.1); | ||
content: '\A'; | ||
height: 100%; | ||
left: 0; | ||
position: absolute; | ||
top: 0; | ||
width: 100%; | ||
} | ||
|
||
.logo { | ||
align-items: center; | ||
display: grid; | ||
height: 100%; | ||
max-width: 100%; | ||
position: relative; | ||
|
||
> img { | ||
max-width: 100%; | ||
} | ||
} | ||
|
||
.badge { | ||
@include verified-badge(); | ||
|
||
margin-top: 0.5rem; | ||
position: absolute; | ||
right: 0; | ||
top: 0; | ||
z-index: 1; | ||
} | ||
|
||
.name { | ||
@include title-font(1.8rem); | ||
} | ||
|
||
.tags { | ||
@include body-font(1.2rem); | ||
|
||
color: text-color(helper); | ||
|
||
.tag:not(:first-child)::before { | ||
content: ' • '; | ||
} | ||
} | ||
|
||
.stars-and-count { | ||
margin-top: $normal-margin; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
import React from 'react'; | ||
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome'; | ||
import {faCheck} from '@fortawesome/free-solid-svg-icons/faCheck'; | ||
import './partner-card.scss'; | ||
|
||
export default function PartnerCard({ | ||
type, | ||
href, | ||
title, | ||
logoUrl, | ||
tags, | ||
onClick, | ||
badgeImage, | ||
verifiedFeatures, | ||
analyticsContentType | ||
}: { | ||
type: string | null; | ||
title: string; | ||
href: string; | ||
logoUrl: string | null; | ||
tags: string[]; | ||
onClick?: React.MouseEventHandler<HTMLAnchorElement>; | ||
badgeImage?: string; | ||
verifiedFeatures?: string; | ||
analyticsContentType?: string; | ||
}) { | ||
const analyticsInfo = analyticsContentType | ||
? { | ||
'data-analytics-select-content': title, | ||
'data-content-type': analyticsContentType, | ||
'data-content-tags': `,category=${type},` | ||
} | ||
: {}; | ||
|
||
return ( | ||
<a className="partner-card" href={href} onClick={onClick} {...analyticsInfo}> | ||
<div className="logo"> | ||
<img src={logoUrl ?? ''} alt="" /> | ||
{verifiedFeatures && badgeImage && ( | ||
<div className="badge"> | ||
<img | ||
className="background" | ||
src={badgeImage} | ||
alt="verified" | ||
/> | ||
<FontAwesomeIcon className="checkmark" icon={faCheck} /> | ||
<div className="tooltip right">{verifiedFeatures}</div> | ||
</div> | ||
)} | ||
</div> | ||
<div className="info"> | ||
<div className="name">{title}</div> | ||
<div className="tags"> | ||
{tags.map((value) => ( | ||
<span className="tag" key={value}> | ||
{value} | ||
</span> | ||
))} | ||
</div> | ||
</div> | ||
</a> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ | |
} | ||
|
||
.badge { | ||
@extend %verified-badge; | ||
@include verified-badge(); | ||
|
||
align-self: start; | ||
grid-area: icon; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters