0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-27 08:59:17 -05:00
penpot/frontend/resources/styles/main/partials/dashboard-grid.scss

351 lines
6.4 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/.
//
2021-04-10 09:43:04 +02:00
// Copyright (c) UXBOX Labs SL
2016-03-01 20:39:13 +02:00
2015-06-18 19:35:50 +02:00
.dashboard-grid {
font-size: $fs14;
height: 100%;
2015-06-18 19:35:50 +02:00
.grid-row {
2015-06-18 19:35:50 +02:00
display: flex;
flex-wrap: wrap;
2015-06-18 19:35:50 +02:00
width: 100%;
align-content: flex-start;
&.no-wrap {
flex-wrap: nowrap;
}
}
2015-06-18 19:35:50 +02:00
.grid-item {
align-items: center;
border: 2px solid lighten($color-gray-20, 13%);
border-radius: $br-small;
cursor: pointer;
display: flex;
flex-direction: column;
flex-shrink: 0;
height: 200px;
margin: $medium;
max-width: 260px;
min-width: 260px;
position: relative;
text-align: center;
width: 18%;
2021-04-16 11:28:22 +02:00
&:hover {
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
}
.grid-item-th {
text-align: initial;
}
&.placeholder {
min-width: 115px;
max-width: 115px;
display: flex;
flex-direction: column;
justify-content: center;
.placeholder-icon {
svg {
transform: rotate(-90deg);
width: 20px;
height: 20px;
fill: $color-gray-30;
}
}
.placeholder-label {
font-size: $fs14;
}
}
&.overlay {
border-radius: 4px;
border: 2px solid $color-primary;
height: 100%;
opacity: 0;
pointer-events: none;
position: absolute;
2016-05-06 08:08:33 +02:00
width: 100%;
z-index: 1;
}
2020-10-05 18:20:39 +02:00
&:hover .overlay {
display: block;
opacity: 1;
2016-05-06 08:08:33 +02:00
}
&.small-item {
max-width: 12%;
min-width: 190px;
padding: $medium;
justify-content: center;
}
.grid-item-icon {
width:90px;
height:90px;
}
.item-info {
2015-06-18 19:35:50 +02:00
display: flex;
flex-direction: column;
padding: $small;
text-align: left;
width: 100%;
h3 {
2021-01-20 22:50:18 +01:00
border: 1px solid transparent;
color: $color-gray-60;
font-size: $fs15;
font-weight: 400;
overflow: hidden;
padding: 0;
2021-01-20 22:50:18 +01:00
height: 27px;
padding-right: $small;
text-overflow: ellipsis;
width: 100%;
white-space: nowrap;
2021-01-20 22:50:18 +01:00
line-height: 27px;
}
2015-06-18 19:35:50 +02:00
span.date {
color: $color-gray-20;
font-size: $fs12;
overflow: hidden;
text-overflow: ellipsis;
width: 100%;
2015-12-16 10:15:16 +01:00
}
2020-10-05 18:20:39 +02:00
.edit-wrapper {
.element-title {
2021-01-20 22:50:18 +01:00
padding: 0px;
2020-10-05 18:20:39 +02:00
height: 25px;
2021-01-20 22:50:18 +01:00
color: $color-gray-60;
font-size: $fs15;
font-weight: 400;
2020-10-05 18:20:39 +02:00
}
}
}
.item-badge {
2021-01-20 22:50:18 +01:00
background-color: $color-white;
border: 1px solid $color-gray-20;
border-radius: 4px;
position: absolute;
top: $x-small;
right: $x-small;
height: 32px;
width: 32px;
display: flex;
align-items: center;
justify-content: center;
2016-10-31 15:56:12 +01:00
2021-01-20 22:50:18 +01:00
svg {
fill: $color-gray-30;
height: 16px;
width: 16px;
}
}
2016-10-31 15:56:12 +01:00
&.add-file {
border: 1px dashed $color-gray-20;
justify-content: center;
box-shadow: none;
2016-10-31 15:56:12 +01:00
span {
color: $color-gray-60;
font-size: $fs15;
2016-10-31 15:56:12 +01:00
}
&:hover {
background-color: $color-white;
border: 2px solid $color-primary;
2020-08-04 12:05:54 +02:00
}
}
2015-06-18 19:35:50 +02:00
// PROJECTS, ELEMENTS & ICONS GRID
&.project-th {
background-color: $color-white;
2015-06-18 19:35:50 +02:00
&:hover {
.project-th-actions {
2021-01-20 22:50:18 +01:00
opacity: 1;
}
2015-06-18 19:35:50 +02:00
}
&.selected {
border: 2px solid $color-primary;
}
.project-th-actions {
align-items: center;
2021-01-20 22:50:18 +01:00
bottom: 2px;
opacity: 0;
display: flex;
right: 5px;
justify-content: center;
position: absolute;
2021-01-20 22:50:18 +01:00
width: 15px;
height: 30px;
2015-06-18 19:35:50 +02:00
span {
color: $color-black;
2015-06-18 19:35:50 +02:00
}
.project-th-icon {
2015-06-18 19:35:50 +02:00
align-items: center;
display: flex;
margin-right: $small;
2015-06-18 19:35:50 +02:00
&.menu {
margin-right: 0;
display: flex;
justify-content: flex-end;
align-items: flex-end;
flex-direction: column;
2015-06-18 19:35:50 +02:00
> svg {
2020-11-13 13:10:16 +01:00
fill: $color-gray-60;
2020-03-18 13:39:59 +01:00
margin-right: 0;
height: 18px;
width: 18px;
}
&:hover {
> svg {
fill: $color-primary-dark;
2020-03-18 13:39:59 +01:00
}
}
2020-03-18 13:39:59 +01:00
}
2020-03-18 13:39:59 +01:00
2015-06-18 19:35:50 +02:00
}
}
2020-03-19 16:22:28 +01:00
.project-th-actions.force-display {
opacity: 1;
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-20;
border-bottom: 2px solid lighten($color-gray-20, 12%);
2016-05-07 11:08:43 +02:00
&:hover {
border-color: $color-primary;
2016-05-07 11:08:43 +02:00
}
}
.grid-item-image {
svg {
max-height: 100px;
max-width: 100px;
min-height: 40px;
min-width: 40px;
width: 8vw;
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%;
}
2015-12-16 10:15:16 +01:00
.color-data {
color: $color-gray-30;
margin-top: 15px;
}
.drag-counter {
position: absolute;
top: 5px;
left: 4px;
width: 32px;
height: 32px;
background-color: $color-primary;
border-radius: 50%;
color: $color-black;
font-size: $fs18;
display: flex;
justify-content: center;
align-items: center;
}
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
.grid-item-th {
background-position: center;
background-size: auto 80%;
background-repeat: no-repeat;
border-top-left-radius: $br-small;
border-top-right-radius: $br-small;
height: 70%;
overflow: hidden;
position: relative;
2017-04-24 12:05:46 +02:00
width: 100%;
background-color: $color-canvas;
.img-th {
height: auto;
width: 100%;
}
svg {
2020-04-29 10:03:38 +02:00
height: 100%;
width: 100%;
}
2020-04-29 10:03:38 +02:00
}
2016-11-03 17:03:34 +01:00
}
.grid-empty-placeholder {
align-items: center;
border: 1px dashed $color-gray-20;
border-radius: $br-small;
display: flex;
flex-direction: column;
height: 200px;
margin: $size-4;
padding: 3rem;
justify-content: center;
svg {
width: 36px;
height: 36px;
fill: $color-gray-20;
}
.text {
margin-top: 10px;
color: $color-gray-30;
font-size: $fs16;
2016-10-20 12:37:43 +02:00
}
}