0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-15 11:38:24 -05:00
penpot/frontend/resources/styles/main/partials/dashboard-grid.scss

475 lines
8.1 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 {
font-size: $fs14;
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);
2020-04-14 10:15:39 +02:00
fill: $color-gray-30;
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 {
2020-04-14 10:15:39 +02:00
fill: $color-gray-30;
2015-12-15 22:56:03 +01:00
height: 20px;
margin: 0 10px;
width: 20px;
}
&:hover {
svg {
2020-04-14 10:15:39 +02:00
fill: $color-gray-50;
2015-12-15 22:56:03 +01:00
}
2015-12-16 10:15:16 +01:00
2015-12-15 22:56:03 +01:00
}
}
}
}
.dashboard-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;
}
2015-06-18 19:35:50 +02:00
.grid-item {
align-items: center;
border: 1px 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: 300px;
min-width: 260px;
position: relative;
text-align: center;
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;
2016-05-06 08:08:33 +02:00
width: 100%;
z-index: 1;
}
&: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 {
bottom: 0;
2015-06-18 19:35:50 +02:00
display: flex;
flex-direction: column;
left: 0;
padding: $small;
position: absolute;
text-align: left;
width: 100%;
h3 {
color: $color-gray-60;
font-size: $fs15;
font-weight: 400;
overflow: hidden;
padding: 0;
padding-right: $small;
text-overflow: ellipsis;
width: 100%;
white-space: nowrap;
}
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
}
}
.item-badge {
background-color: $color-white;
border: 1px solid $color-gray-20;
border-radius: 4px;
2016-10-31 15:56:12 +01:00
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
svg {
fill: $color-gray-30;
height: 16px;
width: 16px;
2016-10-31 15:56:12 +01:00
}
}
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;
// border: 2px solid $color-gray-10;
2015-06-18 19:35:50 +02:00
&:hover {
border-color: $color-primary;
2015-06-18 19:35:50 +02:00
.project-th-actions {
display: flex;
}
2015-06-18 19:35:50 +02:00
}
.project-th-actions {
align-items: center;
bottom: 0;
display: none;
left: 0;
justify-content: flex-end;
padding: $small;
position: absolute;
width: 100%;
2015-06-18 19:35:50 +02:00
svg {
fill: $color-gray-20;
height: 14px;
margin-right: $x-small;
width: 14px;
}
2020-03-18 13:39:59 +01: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;
2015-06-18 19:35:50 +02:00
svg {
fill: $color-gray-30;
2020-03-18 13:39:59 +01:00
margin-right: 0;
}
&:hover {
transform: scale(1.4);
2020-03-18 13:39:59 +01:00
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
&.delete {
margin-right: 0;
2020-03-18 13:39:59 +01:00
svg {
fill: $color-gray-30;
margin-right: 0;
2020-03-18 13:39:59 +01:00
}
&:hover {
transform: scale(1.4);
2015-06-18 19:35:50 +02:00
svg {
fill: $color-danger;
2015-06-18 19:35:50 +02:00
}
}
2016-10-31 15:56:12 +01:00
}
2016-10-31 15:56:12 +01:00
&.edit {
margin-right: 0;
2015-06-18 19:35:50 +02:00
svg {
fill: $color-gray-30;
2015-06-18 19:35:50 +02:00
}
&:hover {
transform: scale(1.4);
2016-10-31 15:56:12 +01:00
svg {
fill: $color-gray-60;
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-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;
}
.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
2020-04-29 10:03:38 +02:00
background-color: $color-canvas;
2017-04-24 12:05:46 +02:00
.img-th {
height: auto;
width: 100%;
}
2020-04-29 10:03:38 +02:00
svg {
height: 100%;
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 {
2020-04-14 10:15:39 +02:00
color: $color-gray-50;
2016-10-20 12:37:43 +02:00
}
}
}
}
.grid-files-empty {
align-items: center;
border: 1px dashed $color-gray-20;
2020-05-19 14:37:53 +02:00
border-radius: $br-small;
display: flex;
flex-direction: column;
2020-05-05 20:42:53 +02:00
height: fit-content;
margin: $size-4;
padding: 3rem;
2020-04-14 10:15:39 +02:00
.grid-files-desc {
2020-05-19 14:37:53 +02:00
color: $color-gray-60;
2020-04-14 10:15:39 +02:00
margin-bottom: $medium;
}
}