mirror of
https://github.com/plankanban/planka.git
synced 2025-12-25 17:25:01 +03:00
Background gradients, migrate from CSS to SCSS, remove !important
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import upperFirst from 'lodash/upperFirst';
|
||||
import camelCase from 'lodash/camelCase';
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import classNames from 'classnames';
|
||||
@@ -8,7 +10,8 @@ import { Container, Grid } from 'semantic-ui-react';
|
||||
import Paths from '../../constants/Paths';
|
||||
import { ReactComponent as PlusIcon } from '../../assets/images/plus-icon.svg';
|
||||
|
||||
import styles from './Projects.module.css';
|
||||
import styles from './Projects.module.scss';
|
||||
import globalStyles from '../../styles.module.scss';
|
||||
|
||||
const Projects = React.memo(({ items, isEditable, onAdd }) => {
|
||||
const [t] = useTranslation();
|
||||
@@ -26,7 +29,13 @@ const Projects = React.memo(({ items, isEditable, onAdd }) => {
|
||||
}
|
||||
>
|
||||
<div
|
||||
className={classNames(styles.card, styles.open)}
|
||||
className={classNames(
|
||||
styles.card,
|
||||
styles.open,
|
||||
item.background &&
|
||||
item.background.type === 'gradient' &&
|
||||
globalStyles[`background${upperFirst(camelCase(item.background.name))}`],
|
||||
)}
|
||||
style={{
|
||||
background:
|
||||
item.background &&
|
||||
|
||||
@@ -1,110 +0,0 @@
|
||||
.add {
|
||||
background: #fff;
|
||||
box-shadow: rgba(0, 0, 0, 0.1) 0 3px 6px, rgba(0, 0, 0, 0.1) 0 6px 12px;
|
||||
color: #333;
|
||||
cursor: pointer;
|
||||
fill: #333;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.add:hover {
|
||||
box-shadow: 0 16px 32px rgba(0, 0, 0, 0.1), 0 32px 64px rgba(0, 0, 0, 0.1);
|
||||
transform: translate(0, -2px);
|
||||
}
|
||||
|
||||
.addGridIcon {
|
||||
display: block;
|
||||
margin: 0 auto 12px;
|
||||
width: 36px;
|
||||
}
|
||||
|
||||
.addTitle {
|
||||
display: table-cell;
|
||||
font-size: 17px;
|
||||
line-height: 1;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.addTitleWrapper {
|
||||
display: table;
|
||||
height: 100%;
|
||||
padding: 35px 21px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.card {
|
||||
border-radius: 4px;
|
||||
height: 150px;
|
||||
transition: all 200ms ease !important;
|
||||
}
|
||||
|
||||
.cardOverlay {
|
||||
background: #000000;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
opacity: 0.3;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.cardsWrapper {
|
||||
flex: 1 1 auto;
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
.gridFix {
|
||||
flex: 1 0 auto;
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
.notification {
|
||||
background: #eb5a46;
|
||||
color: #fff;
|
||||
float: right;
|
||||
font-size: 12px;
|
||||
line-height: 20px;
|
||||
padding: 0px 6px;
|
||||
border: none;
|
||||
border-radius: 3px;
|
||||
outline: none;
|
||||
text-align: left;
|
||||
transition: background 0.3s ease;
|
||||
}
|
||||
|
||||
.open {
|
||||
background: #555;
|
||||
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1), 0 6px 12px rgba(0, 0, 0, 0.1);
|
||||
color: #fff;
|
||||
position: relative;
|
||||
transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
|
||||
box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
|
||||
}
|
||||
|
||||
.open:hover {
|
||||
box-shadow: 0 16px 32px rgba(0, 0, 0, 0.1), 0 32px 64px rgba(0, 0, 0, 0.1);
|
||||
transform: translate(0, -2px);
|
||||
}
|
||||
|
||||
.openTitle {
|
||||
bottom: 0;
|
||||
font-size: 24px;
|
||||
left: 0;
|
||||
line-height: 1.1;
|
||||
padding: 24px 20px;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.project {
|
||||
background: #22252a;
|
||||
flex: 1 1 auto;
|
||||
height: 100%;
|
||||
width: calc(100% - 200px);
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
display: flex;
|
||||
flex: 1 1 auto;
|
||||
height: 100%;
|
||||
}
|
||||
112
client/src/components/Projects/Projects.module.scss
Normal file
112
client/src/components/Projects/Projects.module.scss
Normal file
@@ -0,0 +1,112 @@
|
||||
:global(#app) {
|
||||
.add {
|
||||
background: #fff;
|
||||
box-shadow: rgba(0, 0, 0, 0.1) 0 3px 6px, rgba(0, 0, 0, 0.1) 0 6px 12px;
|
||||
color: #333;
|
||||
cursor: pointer;
|
||||
fill: #333;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
|
||||
&:hover {
|
||||
box-shadow: 0 16px 32px rgba(0, 0, 0, 0.1), 0 32px 64px rgba(0, 0, 0, 0.1);
|
||||
transform: translate(0, -2px);
|
||||
}
|
||||
}
|
||||
|
||||
.addGridIcon {
|
||||
display: block;
|
||||
margin: 0 auto 12px;
|
||||
width: 36px;
|
||||
}
|
||||
|
||||
.addTitle {
|
||||
display: table-cell;
|
||||
font-size: 17px;
|
||||
line-height: 1;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.addTitleWrapper {
|
||||
display: table;
|
||||
height: 100%;
|
||||
padding: 35px 21px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.card {
|
||||
border-radius: 4px;
|
||||
height: 150px;
|
||||
transition: all 200ms ease;
|
||||
}
|
||||
|
||||
.cardOverlay {
|
||||
background: #000000;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
opacity: 0.3;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.cardsWrapper {
|
||||
flex: 1 1 auto;
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
.gridFix {
|
||||
flex: 1 0 auto;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.notification {
|
||||
background: #eb5a46;
|
||||
color: #fff;
|
||||
float: right;
|
||||
font-size: 12px;
|
||||
line-height: 20px;
|
||||
padding: 0px 6px;
|
||||
border: none;
|
||||
border-radius: 3px;
|
||||
outline: none;
|
||||
text-align: left;
|
||||
transition: background 0.3s ease;
|
||||
}
|
||||
|
||||
.open {
|
||||
background: #555;
|
||||
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1), 0 6px 12px rgba(0, 0, 0, 0.1);
|
||||
color: #fff;
|
||||
position: relative;
|
||||
transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
|
||||
box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
|
||||
|
||||
&:hover {
|
||||
box-shadow: 0 16px 32px rgba(0, 0, 0, 0.1), 0 32px 64px rgba(0, 0, 0, 0.1);
|
||||
transform: translate(0, -2px);
|
||||
}
|
||||
}
|
||||
|
||||
.openTitle {
|
||||
bottom: 0;
|
||||
font-size: 24px;
|
||||
left: 0;
|
||||
line-height: 1.1;
|
||||
padding: 24px 20px;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.project {
|
||||
background: #22252a;
|
||||
flex: 1 1 auto;
|
||||
height: 100%;
|
||||
width: calc(100% - 200px);
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
display: flex;
|
||||
flex: 1 1 auto;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user