0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-12 01:58:44 -05:00
penpot/frontend/resources/styles/main/partials/dashboard-grid.scss

455 lines
8 KiB
SCSS
Raw Normal View History

2016-03-01 20:39:13 +02:00
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
//
// Copyright (c) 2015-2016 Andrey Antukh <niwi@niwi.nz>
// Copyright (c) 2015-2016 Juan de la Cruz <delacruzgarciajuan@gmail.com>
2015-06-18 19:35:50 +02:00
.dashboard-grid {
display: flex;
flex-direction: column;
font-size: $fs14;
2016-02-20 22:26:07 +01:00
height: 100%;
2015-06-18 19:35:50 +02:00
2015-12-15 22:56:03 +01:00
.dashboard-title {
position: relative;
width: 100%;
h2 {
text-align: center;
width: 100%;
.edit {
padding: 5px 10px;
2020-03-03 13:14:37 +01:00
background: $color-gray-50;
border: none;
height: 100%;
}
.close {
padding: 5px 10px;
2020-03-03 13:14:37 +01:00
background: $color-gray-50;
cursor: pointer;
svg {
transform: rotate(45deg);
fill: $color-gray;
height: 20px;
width: 20px;
}
}
2015-12-15 22:56:03 +01:00
}
.edition {
align-items: center;
display: flex;
position: absolute;
right: 40px;
top: 0;
span {
cursor: pointer;
svg {
fill: $color-gray;
height: 20px;
margin: 0 10px;
width: 20px;
}
&:hover {
svg {
fill: $color-gray-darker;
}
2015-12-16 10:15:16 +01:00
2015-12-15 22:56:03 +01:00
}
}
}
}
2015-06-18 19:35:50 +02:00
.dashboard-grid-content {
display: flex;
2017-03-27 10:25:51 +02:00
height: 100%;
2015-06-18 19:35:50 +02:00
width: 100%;
2016-05-06 08:08:33 +02:00
.dashboard-grid-row {
display: flex;
flex-wrap: wrap;
width: 100%;
align-content: flex-start;
2016-05-06 08:08:33 +02:00
}
2015-06-18 19:35:50 +02:00
.grid-item {
align-items: center;
2019-12-19 12:50:58 +01:00
border-radius: $br-small;
2015-06-18 19:35:50 +02:00
cursor: pointer;
display: flex;
flex-direction: column;
flex-shrink: 0;
2016-10-02 17:50:30 +02:00
height: 200px;
margin: $medium;
2016-10-02 17:50:30 +02:00
max-width: 300px;
min-width: 260px;
2015-06-18 19:35:50 +02:00
position: relative;
text-align: center;
2016-02-20 22:26:07 +01:00
width: 18%;
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
& .overlay {
border-radius: 4px;
border: 2px solid $color-primary;
height: 100%;
opacity: 0;
pointer-events: none;
position: absolute;
width: 100%;
z-index: 1;
}
&:hover .overlay {
display: block;
opacity: 1;
}
2015-06-18 19:35:50 +02:00
2015-12-16 10:15:16 +01:00
&.small-item {
max-width: 12%;
2016-02-20 22:26:07 +01:00
min-width: 190px;
2016-11-03 17:03:34 +01:00
padding: $medium;
justify-content: center;
2015-12-16 10:15:16 +01:00
}
.grid-item-icon {
width:90px;
height:90px;
}
2016-10-31 15:56:12 +01:00
.item-info {
bottom: 0;
display: flex;
flex-direction: column;
left: 0;
padding: $small;
position: absolute;
text-align: left;
width: 100%;
h3 {
2020-03-03 13:14:37 +01:00
color: $color-gray-60;
2019-12-19 13:23:30 +01:00
font-size: $fs15;
2016-10-31 15:56:12 +01:00
font-weight: 400;
overflow: hidden;
padding: 0;
padding-right: $small;
text-overflow: ellipsis;
width: 100%;
white-space: nowrap;
}
span.date {
2020-03-03 13:14:37 +01:00
color: $color-gray-20;
2016-10-31 15:56:12 +01:00
font-size: $fs12;
overflow: hidden;
text-overflow: ellipsis;
width: 100%;
}
}
&.add-file {
2019-12-19 12:50:58 +01:00
border: 1px dashed $color-gray-light;
2015-06-18 19:35:50 +02:00
justify-content: center;
box-shadow: none;
2015-06-18 19:35:50 +02:00
span {
2020-03-03 13:14:37 +01:00
color: $color-gray-60;
2019-12-19 12:50:58 +01:00
font-size: $fs15;
2015-06-18 19:35:50 +02:00
}
&:hover {
2019-12-19 12:50:58 +01:00
background-color: $color-white;
2020-03-03 13:14:37 +01:00
border: 2px solid $color-primary;
2015-06-18 19:35:50 +02:00
}
}
2016-05-07 11:08:43 +02:00
// PROJECTS, ELEMENTS & ICONS GRID
2015-06-18 19:35:50 +02:00
&.project-th {
2019-12-19 12:50:58 +01:00
background-color: $color-white;
2020-03-03 13:14:37 +01:00
// border: 2px solid $color-gray-10;
2015-06-18 19:35:50 +02:00
&:hover {
2020-03-03 13:14:37 +01:00
border-color: $color-primary;
2020-03-18 13:39:59 +01:00
.project-th-actions {
display: flex;
}
2015-06-18 19:35:50 +02:00
}
.project-th-actions {
align-items: center;
bottom: 0;
2020-03-18 13:39:59 +01:00
display: none;
2015-06-18 19:35:50 +02:00
left: 0;
2016-10-31 15:56:12 +01:00
justify-content: flex-end;
2015-06-18 19:35:50 +02:00
padding: $small;
position: absolute;
width: 100%;
svg {
fill: $color-gray-light;
height: 14px;
2016-10-31 15:56:12 +01:00
margin-right: $x-small;
2015-06-18 19:35:50 +02:00
width: 14px;
}
span {
2019-12-19 12:50:58 +01:00
color: $color-black;
2015-06-18 19:35:50 +02:00
}
.project-th-icon {
align-items: center;
display: flex;
margin-right: $small;
2020-03-18 13:39:59 +01:00
&.menu {
margin-right: 0;
svg {
fill: $color-gray-30;
margin-right: 0;
}
&:hover {
transform: scale(1.4);
svg {
fill: $color-danger;
}
}
}
2016-10-31 15:56:12 +01:00
&.delete {
2015-06-18 19:35:50 +02:00
margin-right: 0;
svg {
2020-03-03 13:14:37 +01:00
fill: $color-gray-30;
2016-10-31 15:56:12 +01:00
margin-right: 0;
2015-06-18 19:35:50 +02:00
}
&:hover {
transform: scale(1.4);
2016-10-31 15:56:12 +01:00
svg {
fill: $color-danger;
}
2015-06-18 19:35:50 +02:00
}
}
2015-12-15 19:13:50 +01:00
&.edit {
2016-10-31 15:56:12 +01:00
margin-right: 0;
svg {
2020-03-03 13:14:37 +01:00
fill: $color-gray-30;
2016-10-31 15:56:12 +01:00
}
2015-12-15 19:13:50 +01:00
&:hover {
transform: scale(1.4);
2016-10-31 15:56:12 +01:00
svg {
2020-03-03 13:14:37 +01:00
fill: $color-gray-60;
2016-10-31 15:56:12 +01:00
}
2015-12-15 19:13:50 +01:00
}
}
2015-06-18 19:35:50 +02:00
}
}
2020-03-19 16:22:28 +01:00
.project-th-actions.force-display {
display: flex;
}
2015-06-18 19:35:50 +02:00
}
2016-05-07 11:08:43 +02:00
// IMAGES SECTION
&.images-th {
border: 1px dashed $color-gray-light;
2016-05-07 11:08:43 +02:00
border-bottom: 2px solid lighten($color-gray-light, 12%);
&:hover {
2020-03-03 13:14:37 +01:00
border-color: $color-primary;
2016-05-07 11:08:43 +02:00
}
}
2015-12-15 19:13:50 +01:00
.grid-item-image {
2015-12-15 19:13:50 +01:00
svg {
max-height: 100px;
max-width: 100px;
2017-02-23 19:12:41 +01:00
min-height: 40px;
min-width: 40px;
width: 8vw;
2015-12-15 19:13:50 +01:00
}
2015-12-15 19:13:50 +01:00
}
2015-12-16 10:15:16 +01:00
.color-swatch {
border-top-left-radius: $br-medium;
border-top-right-radius: $br-medium;
height: 25%;
left: 0;
position: absolute;
top: 0;
width: 100%;
}
.color-data {
color: $color-gray;
margin-top: 15px;
}
.input-checkbox {
margin: 0;
position: absolute;
top: 10px;
right: 5px;
label {
margin: 0;
}
}
2015-06-18 19:35:50 +02:00
}
}
2016-05-07 11:08:43 +02:00
2015-12-15 12:58:49 +01:00
// STYLES FOR LIBRARIES
&.library {
2020-03-10 13:26:07 +01:00
padding: $medium;
2015-12-15 12:58:49 +01:00
}
2015-06-18 19:35:50 +02:00
}
2016-11-03 17:03:34 +01:00
.grid-item-th {
background-position: center;
2016-11-10 20:43:53 +01:00
background-size: auto 80%;
background-repeat: no-repeat;
2019-12-19 12:50:58 +01:00
border-top-left-radius: $br-small;
border-top-right-radius: $br-small;
2016-11-03 17:03:34 +01:00
height: 70%;
2017-04-24 12:05:46 +02:00
overflow: hidden;
2016-11-03 17:03:34 +01:00
position: relative;
width: 100%;
2017-04-24 12:05:46 +02:00
.img-th {
height: auto;
width: 100%;
}
2016-11-03 17:03:34 +01:00
}
// MULTISELECT OPTIONS BAR
.multiselect-bar {
2016-05-09 20:13:53 +02:00
@include animation(0,.5s,fadeInUp);
align-items: center;
2020-03-03 13:14:37 +01:00
background-color: $color-gray-50;
display: flex;
left: 0;
justify-content: center;
padding: $medium;
position: absolute;
width: 100%;
bottom: 0;
.multiselect-nav {
align-items: center;
display: flex;
2016-10-20 11:58:35 +02:00
justify-content: center;
margin-left: 10%;
width: 110px;
2016-10-20 11:58:35 +02:00
span {
margin-right: 1.5rem;
&:last-child {
margin-right: 0;
}
}
svg {
cursor: pointer;
2020-03-03 13:14:37 +01:00
fill: $color-gray-30;
height: 20px;
width: 20px;
&:hover {
2020-03-03 13:14:37 +01:00
fill: $color-gray-20;
}
}
span.delete {
&:hover {
svg{
fill: $color-danger-light;
}
}
}
}
}
2016-10-20 12:37:43 +02:00
.move-item {
position: relative;
.move-list {
2020-03-03 13:14:37 +01:00
background-color: $color-gray-10;
2016-10-20 12:37:43 +02:00
border-radius: $br-small;
bottom: 30px;
display: flex;
flex-direction: column;
left: -30px;
max-height: 260px;
overflow-y: scroll;
padding: $medium;
position: absolute;
width: 260px;
li {
padding-bottom: $medium;
&.title {
color: $color-gray-darker;
}
}
}
}
.grid-files-empty {
align-items: center;
border: 1px dashed $color-gray-20;
display: flex;
flex-direction: column;
margin: $size-4;
padding: 3rem;
width: 100%;
}
2016-10-20 12:37:43 +02:00
.grid-files-link-text {
color: $color-black;
2016-10-20 12:37:43 +02:00
}