0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-23 23:18:48 -05:00
penpot/frontend/resources/styles/main/partials/dashboard-sidebar.scss

477 lines
8.3 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/.
//
2022-09-20 23:23:22 +02:00
// Copyright (c) KALEIDOS INC
2016-03-01 20:39:13 +02:00
2020-08-07 14:55:22 +02:00
.dashboard-sidebar {
2019-12-19 12:50:58 +01:00
background-color: $color-white;
z-index: 1;
display: flex;
flex-direction: column;
height: 100%;
padding-top: $size-2;
.sidebar-content {
2015-12-15 19:13:50 +01:00
display: flex;
flex-direction: column;
2015-12-15 22:56:03 +01:00
height: 100%;
overflow-y: auto;
padding: 0;
2015-12-15 19:13:50 +01:00
hr {
border-color: $color-gray-10;
2020-10-05 18:20:39 +02:00
margin: 1rem 15px;
}
}
.sidebar-team-switch {
position: relative;
display: flex;
margin: 5px 15px;
.teams-dropdown {
left: 0;
top: 50px;
z-index: 12;
max-height: 30rem;
2022-09-29 12:11:09 +02:00
min-width: 234px;
overflow-y: auto;
}
.options-dropdown {
2022-02-14 09:46:59 +01:00
right: 2px;
top: 50px;
z-index: 12;
max-height: 30rem;
2022-02-14 09:46:59 +01:00
min-width: 162px;
}
.switch-content {
height: 40px;
display: flex;
width: 100%;
border: 1px solid $color-gray-10;
border-radius: $br5;
align-items: center;
}
.switch-options {
display: flex;
max-width: 22px;
2020-11-04 08:59:55 +01:00
min-width: 28px;
border-left: 1px solid $color-gray-10;
justify-content: center;
align-items: center;
cursor: pointer;
background-color: transparent;
border: none;
svg {
width: 15px;
height: 13px;
fill: $color-gray-60;
}
}
2015-12-15 19:13:50 +01:00
.current-team {
cursor: pointer;
display: flex;
align-items: center;
flex-grow: 1;
2020-10-19 13:19:30 +02:00
font-size: $fs14;
padding: 0px 10px;
background-color: transparent;
border: none;
2020-10-05 18:20:39 +02:00
}
2020-10-05 18:20:39 +02:00
.team-name {
flex-grow: 1;
display: flex;
height: 40px;
2020-10-05 18:20:39 +02:00
align-items: center;
2022-09-29 12:11:09 +02:00
&.action {
.team-icon {
border-radius: 50%;
background-color: $color-gray-10;
height: 24px;
margin-right: 10px;
padding: 6px;
width: 24px;
2022-09-29 12:11:09 +02:00
svg {
height: 12px;
width: 12px;
}
}
2022-09-29 12:11:09 +02:00
&:hover {
.team-icon {
background-color: $color-primary;
}
}
.team-text {
width: 150px;
}
}
2020-10-05 18:20:39 +02:00
.team-icon {
display: flex;
align-items: center;
2020-10-05 18:20:39 +02:00
padding-right: 10px;
2020-10-05 18:20:39 +02:00
svg {
width: 23px;
height: 23px;
fill: $color-gray-60;
2019-12-19 13:23:30 +01:00
}
2020-10-05 18:20:39 +02:00
img {
border-radius: 50%;
flex-shrink: 0;
height: 23px;
width: 23px;
}
}
2020-10-05 18:20:39 +02:00
.team-text {
color: $color-gray-60;
@include text-ellipsis;
2020-11-04 08:59:55 +01:00
width: 130px;
2022-12-29 13:59:57 +01:00
text-align: left;
}
.icon {
margin-left: auto;
svg {
fill: $color-gray-60;
}
}
}
.switch-icon {
display: flex;
align-items: center;
justify-content: center;
svg {
width: 10px;
height: 10px;
fill: $color-gray-60;
}
}
}
.sidebar-empty-placeholder {
padding: 10px 12px;
color: $color-gray-30;
display: flex;
align-items: flex-start;
.icon {
padding: 0px 10px;
svg {
fill: $color-gray-30;
width: 12px;
height: 12px;
}
}
.text {
2021-10-05 12:59:00 +02:00
font-size: $fs12;
}
}
.sidebar-nav {
display: flex;
flex-direction: column;
overflow-y: auto;
margin: 0;
user-select: none;
2015-12-15 19:13:50 +01:00
// TODO: should be deprecated / unclear name
&.dashboard-common {
overflow: unset;
}
&.no-overflow {
overflow: unset;
}
& > li {
align-items: center;
cursor: pointer;
display: flex;
flex-shrink: 0;
padding: $size-2;
a {
font-weight: $fw400;
width: 100%;
2023-01-02 09:34:19 +01:00
&:hover {
text-decoration: none;
}
}
svg {
fill: $color-black;
margin-right: 8px;
height: $size-3;
width: $size-3;
}
span.element-title {
color: $color-gray-60;
font-size: $fs14;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
&::before {
background-color: transparent;
border-radius: $br3;
content: "";
height: 26px;
2021-10-05 10:16:44 +02:00
margin-right: $size-2;
width: 4px;
}
&.recent-projects {
svg {
fill: $color-white;
}
}
& .edit-wrapper {
border: 1px solid $color-gray-10;
border-radius: $br3;
display: flex;
width: 100%;
}
input.element-title {
border: 0;
height: 30px;
padding: 5px;
margin: 0;
width: 100%;
background-color: $color-white;
}
.close {
background-color: $color-white;
cursor: pointer;
padding-left: 5px;
svg {
fill: $color-gray-30;
height: 15px;
transform: rotate(45deg) translateY(7px);
width: 15px;
margin: 0;
}
}
.element-subtitle {
color: $color-gray-20;
font-style: italic;
}
&:hover {
&::before {
background-color: $color-gray-10;
}
}
&.current {
2023-01-02 09:34:19 +01:00
a {
font-weight: $fw700;
2023-01-02 09:34:19 +01:00
}
&::before {
background-color: $color-primary;
2015-12-15 22:56:03 +01:00
}
}
&.dragging {
background-color: color.adjust($color-primary, $alpha: -0.69);
}
}
}
2015-12-15 22:56:03 +01:00
.sidebar-search {
align-items: center;
2020-12-09 22:39:37 +01:00
background-color: $color-white;
border: 1px solid $color-gray-10;
border-radius: $br5;
display: flex;
margin: 5px 15px;
.input-text {
2020-12-09 22:39:37 +01:00
background: transparent;
border: 0;
color: $color-gray-60;
font-size: $fs14;
padding: 6px;
margin: 0;
2020-11-04 09:36:20 +01:00
max-width: 195px;
width: 100%;
height: 40px;
}
&:focus,
&:focus-within {
border-color: $color-black;
}
.search,
.clear-search {
align-items: center;
cursor: pointer;
display: flex;
height: 22px;
margin-left: auto;
2021-10-05 10:16:44 +02:00
padding: 0 $size-2;
width: 32px;
svg {
fill: $color-gray-30;
height: 15px;
width: 15px;
2015-12-15 19:13:50 +01:00
}
}
.clear-search svg {
transform: rotate(45deg);
2023-03-07 08:36:40 +01:00
&:hover {
fill: $color-danger;
}
}
2015-12-15 19:13:50 +01:00
}
&.profile-bar {
background-color: $color-gray-10;
2020-08-07 14:55:22 +02:00
.dashboard-sidebar-inside {
display: none;
}
}
2015-12-15 19:13:50 +01:00
}
2019-12-20 11:27:24 +01:00
.projects-row {
align-items: center;
display: flex;
2020-05-11 13:05:06 +02:00
margin-top: 1rem;
padding: $size-2;
position: relative;
2019-12-20 11:27:24 +01:00
span {
color: $color-gray-30;
font-size: $fs14;
}
2020-05-06 15:31:44 +02:00
.btn-icon-light {
2019-12-20 11:27:24 +01:00
margin-left: auto;
}
&::before {
background-color: $color-gray-10;
content: "";
height: 1px;
left: 4%;
position: absolute;
right: 4%;
top: -5px;
width: 92%;
}
}
.team-form-modal {
h2 {
font-weight: $fw400;
color: $color-gray-40;
font-size: 28px;
margin-bottom: 30px;
}
.buttons-row {
margin-top: 20px;
display: flex;
justify-content: center;
}
input[type="submit"] {
margin-bottom: 0px;
}
2019-12-20 11:27:24 +01:00
}
.profile-section {
2019-12-20 11:27:24 +01:00
align-items: center;
cursor: pointer;
2019-12-20 11:27:24 +01:00
display: flex;
2020-10-05 18:20:39 +02:00
padding: 10px 15px;
position: relative;
2020-11-21 00:14:59 +01:00
.profile {
align-items: center;
cursor: pointer;
display: flex;
flex-grow: 1;
2019-12-20 11:27:24 +01:00
2020-12-10 09:50:56 +01:00
span {
2020-11-21 00:14:59 +01:00
@include text-ellipsis;
color: $color-black;
2022-09-28 15:54:58 +02:00
margin: 10px;
2020-11-21 00:14:59 +01:00
font-size: $fs14;
max-width: 160px;
}
2020-03-09 11:54:35 +01:00
2020-11-21 00:14:59 +01:00
img {
border-radius: 50%;
flex-shrink: 0;
height: 25px;
width: 25px;
}
svg {
height: 10px;
margin-left: auto;
2021-10-05 10:16:44 +02:00
margin-right: $size-2;
2020-11-21 00:14:59 +01:00
width: 10px;
}
2020-11-05 09:55:35 +01:00
}
.dropdown {
left: 15px;
bottom: 45px;
2020-10-05 18:20:39 +02:00
min-width: 189px;
2019-12-20 11:27:24 +01:00
@include animation(0, 0.2s, fadeInUp);
2019-12-20 11:27:24 +01:00
li {
2020-10-19 14:07:59 +02:00
font-size: $fs14;
padding: $size-2 $size-4;
2019-12-20 11:27:24 +01:00
svg {
fill: $color-gray-20;
2021-10-05 10:16:44 +02:00
margin-right: $size-2;
2020-11-21 00:14:59 +01:00
height: 12px;
width: 12px;
}
&.separator {
border-top: 1px solid $color-gray-10;
}
}
2019-12-20 11:27:24 +01:00
}
2020-03-10 13:26:07 +01:00
}
2020-12-10 09:50:56 +01:00
.primary-badge {
border: 1px solid $color-primary;
border-radius: $br2;
font-size: $fs9 !important;
font-weight: $fw500;
color: $color-primary !important;
2020-12-10 09:50:56 +01:00
padding: 2px 4px;
}