mirror of
https://github.com/penpot/penpot.git
synced 2025-01-26 00:19:07 -05:00
363 lines
6.9 KiB
SCSS
363 lines
6.9 KiB
SCSS
// 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) UXBOX Labs SL
|
|
|
|
.dashboard-grid {
|
|
font-size: $fs14;
|
|
height: 100%;
|
|
|
|
.grid-row {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
width: 100%;
|
|
align-content: flex-start;
|
|
|
|
&.no-wrap {
|
|
flex-wrap: nowrap;
|
|
}
|
|
}
|
|
|
|
.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: $size-4;
|
|
max-width: 260px;
|
|
min-width: 260px;
|
|
position: relative;
|
|
text-align: center;
|
|
width: 18%;
|
|
|
|
&: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;
|
|
width: 100%;
|
|
z-index: 1;
|
|
}
|
|
|
|
&:hover .overlay {
|
|
display: block;
|
|
opacity: 1;
|
|
}
|
|
|
|
&.small-item {
|
|
max-width: 12%;
|
|
min-width: 190px;
|
|
padding: $size-4;
|
|
justify-content: center;
|
|
}
|
|
|
|
.grid-item-icon {
|
|
width: 90px;
|
|
height: 90px;
|
|
}
|
|
|
|
.item-info {
|
|
display: flex;
|
|
flex-direction: column;
|
|
padding: $size-2;
|
|
text-align: left;
|
|
width: 100%;
|
|
|
|
h3 {
|
|
border: 1px solid transparent;
|
|
color: $color-gray-60;
|
|
font-size: $fs14;
|
|
font-weight: 400;
|
|
overflow: hidden;
|
|
padding: 0;
|
|
height: 27px;
|
|
padding-right: $size-2;
|
|
text-overflow: ellipsis;
|
|
width: 100%;
|
|
white-space: nowrap;
|
|
line-height: 27px;
|
|
}
|
|
|
|
span.date {
|
|
color: $color-gray-20;
|
|
font-size: $fs12;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
width: 100%;
|
|
}
|
|
|
|
.edit-wrapper {
|
|
.element-title {
|
|
padding: 0px;
|
|
height: 25px;
|
|
color: $color-gray-60;
|
|
font-size: $fs14;
|
|
font-weight: 400;
|
|
}
|
|
}
|
|
}
|
|
|
|
.item-badge {
|
|
background-color: $color-white;
|
|
border: 1px solid $color-gray-20;
|
|
border-radius: 4px;
|
|
position: absolute;
|
|
top: $size-1;
|
|
right: $size-1;
|
|
height: 32px;
|
|
width: 32px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
|
|
svg {
|
|
fill: $color-gray-30;
|
|
height: 16px;
|
|
width: 16px;
|
|
}
|
|
}
|
|
|
|
&.add-file {
|
|
border: 1px dashed $color-gray-20;
|
|
justify-content: center;
|
|
box-shadow: none;
|
|
|
|
span {
|
|
color: $color-gray-60;
|
|
font-size: $fs14;
|
|
}
|
|
|
|
&:hover {
|
|
background-color: $color-white;
|
|
border: 2px solid $color-primary;
|
|
}
|
|
}
|
|
|
|
// PROJECTS, ELEMENTS & ICONS GRID
|
|
&.project-th {
|
|
background-color: $color-white;
|
|
|
|
&:hover {
|
|
.project-th-actions {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
&.selected {
|
|
border: 2px solid $color-primary;
|
|
}
|
|
|
|
.project-th-actions {
|
|
align-items: center;
|
|
bottom: 2px;
|
|
opacity: 0;
|
|
display: flex;
|
|
right: 5px;
|
|
justify-content: center;
|
|
position: absolute;
|
|
width: 15px;
|
|
height: 30px;
|
|
|
|
span {
|
|
color: $color-black;
|
|
}
|
|
|
|
.project-th-icon {
|
|
align-items: center;
|
|
display: flex;
|
|
margin-right: $size-2;
|
|
|
|
&.menu {
|
|
margin-right: 0;
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
align-items: flex-end;
|
|
flex-direction: column;
|
|
|
|
> svg {
|
|
fill: $color-gray-60;
|
|
margin-right: 0;
|
|
height: 18px;
|
|
width: 18px;
|
|
}
|
|
|
|
&:hover {
|
|
> svg {
|
|
fill: $color-primary-dark;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.project-th-actions.force-display {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
// IMAGES SECTION
|
|
&.images-th {
|
|
border: 1px dashed $color-gray-20;
|
|
border-bottom: 2px solid lighten($color-gray-20, 12%);
|
|
|
|
&:hover {
|
|
border-color: $color-primary;
|
|
}
|
|
}
|
|
|
|
.grid-item-image {
|
|
svg {
|
|
max-height: 100px;
|
|
max-width: 100px;
|
|
min-height: 40px;
|
|
min-width: 40px;
|
|
width: 8vw;
|
|
}
|
|
}
|
|
|
|
.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-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;
|
|
}
|
|
}
|
|
|
|
// STYLES FOR LIBRARIES
|
|
&.library {
|
|
padding: $size-4;
|
|
}
|
|
|
|
.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;
|
|
width: 100%;
|
|
|
|
background-color: $color-canvas;
|
|
display: flex;
|
|
justify-content: center;
|
|
flex-direction: row;
|
|
|
|
.img-th {
|
|
height: auto;
|
|
width: 100%;
|
|
}
|
|
|
|
svg {
|
|
height: 100%;
|
|
width: 100%;
|
|
}
|
|
|
|
svg#loader-pencil {
|
|
fill: $color-gray-20;
|
|
}
|
|
}
|
|
}
|
|
|
|
.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;
|
|
|
|
&.drafts {
|
|
background-image: url("/images/ph-left.svg"), url("/images/ph-right.svg");
|
|
background-position: 15% bottom, 85% top;
|
|
background-repeat: no-repeat;
|
|
.text {
|
|
p {
|
|
max-width: 360px;
|
|
text-align: center;
|
|
font-size: $fs16;
|
|
}
|
|
}
|
|
}
|
|
|
|
svg {
|
|
width: 36px;
|
|
height: 36px;
|
|
fill: $color-gray-20;
|
|
}
|
|
|
|
.text {
|
|
margin-top: 10px;
|
|
color: $color-gray-30;
|
|
font-size: $fs16;
|
|
}
|
|
|
|
img.ph-files {
|
|
height: 150px;
|
|
margin-right: calc(100% - 148px);
|
|
}
|
|
}
|