Skip to content

Commit

Permalink
feat(project): hide off-screen card metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
royschut committed Jun 17, 2021
1 parent 6150be9 commit 144ca6a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 4 additions & 1 deletion src/components/Card/Card.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
cursor: pointer;
transition: transform 0.2s ease-out, -webkit-transform 0.2s ease-out;

// @media (hover: hover) and (pointer: fine) {
display: flex;
flex-direction: column;
justify-content: flex-start;

&:focus,
&:hover {
z-index: 1;
Expand Down
8 changes: 5 additions & 3 deletions src/components/Card/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,15 @@ function Card({
<div className={posterClassNames} style={{ backgroundImage: posterSource ? `url(${posterSource})` : '' }}>
{!loading && (
<div className={styles.meta}>
{featured && <div className={classNames(styles.title, { [styles.loading]: loading })}>{title}</div>}
{metaData()}
{featured && !disabled && (
<div className={classNames(styles.title, { [styles.loading]: loading })}>{title}</div>
)}
{!disabled && metaData()}
</div>
)}
{isCurrent && <div className={styles.currentLabel}>{currentLabel}</div>}
</div>
{!featured && (
{!featured && !disabled && (
<div className={styles.titleContainer}>
<div className={classNames(styles.title, { [styles.loading]: loading })}>{title}</div>
</div>
Expand Down

0 comments on commit 144ca6a

Please sign in to comment.