Add project backgrounds

This commit is contained in:
Maksim Eltyshev
2020-05-26 00:46:04 +05:00
parent af4297ac62
commit 3bb68b0d4f
67 changed files with 774 additions and 210 deletions

View File

@@ -25,7 +25,15 @@ const Projects = React.memo(({ items, isEditable, onAdd }) => {
: Paths.PROJECTS.replace(':id', item.id)
}
>
<div className={classNames(styles.card, styles.open)}>
<div
className={classNames(styles.card, styles.open)}
style={{
background:
item.background &&
item.background.type === 'image' &&
`url("${item.backgroundImage.coverUrl}") center / cover`,
}}
>
{item.notificationsTotal > 0 && (
<span className={styles.notification}>{item.notificationsTotal}</span>
)}

View File

@@ -75,7 +75,6 @@
.open {
background: #555;
background-size: cover;
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1), 0 6px 12px rgba(0, 0, 0, 0.1);
color: #fff;
position: relative;