mirror of
https://github.com/penpot/penpot.git
synced 2026-05-24 09:23:40 +00:00
245 lines
4.7 KiB
SCSS
245 lines
4.7 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) KALEIDOS INC
|
|
|
|
@use "common/refactor/common-refactor.scss" as *;
|
|
|
|
.dashboard-templates-section {
|
|
background-color: var(--color-background-tertiary);
|
|
bottom: 0;
|
|
border-bottom-left-radius: $br-8;
|
|
border-bottom-right-radius: $br-8;
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: $s-228;
|
|
justify-content: flex-end;
|
|
margin-left: $s-6;
|
|
margin-right: $s-6;
|
|
margin-bottom: $s-6;
|
|
position: absolute;
|
|
transition: bottom 300ms;
|
|
width: calc(100% - $s-12);
|
|
pointer-events: none;
|
|
&.collapsed {
|
|
bottom: calc(-1 * $s-228);
|
|
background-color: transparent;
|
|
transition: bottom 300ms;
|
|
.title-btn {
|
|
border-bottom-right-radius: $br-8;
|
|
border-bottom-left-radius: $br-8;
|
|
}
|
|
.content,
|
|
.content-description {
|
|
visibility: hidden;
|
|
}
|
|
}
|
|
}
|
|
|
|
.title {
|
|
pointer-events: all;
|
|
width: 100%;
|
|
top: calc(-1 * $s-56);
|
|
text-align: right;
|
|
height: $s-56;
|
|
position: absolute;
|
|
}
|
|
|
|
.title-btn {
|
|
border: none;
|
|
cursor: pointer;
|
|
height: $s-56;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
border-top-left-radius: $br-8;
|
|
border-top-right-radius: $br-8;
|
|
position: relative;
|
|
z-index: $z-index-1;
|
|
background-color: var(--color-background-tertiary);
|
|
width: 100%;
|
|
}
|
|
|
|
.title-text {
|
|
display: inline-block;
|
|
vertical-align: middle;
|
|
line-height: 1.2;
|
|
font-size: $fs-16;
|
|
margin-left: $s-12;
|
|
margin-right: $s-8;
|
|
color: var(--color-foreground-primary);
|
|
font-weight: $fw400;
|
|
}
|
|
|
|
.title-icon-container {
|
|
display: inline-block;
|
|
vertical-align: middle;
|
|
margin-left: auto;
|
|
margin-right: $s-8;
|
|
color: var(--color-foreground-primary);
|
|
}
|
|
|
|
.title-icon {
|
|
display: inline-block;
|
|
vertical-align: middle;
|
|
margin-left: auto;
|
|
margin-right: $s-8;
|
|
transform: rotate(90deg);
|
|
}
|
|
|
|
.title-icon-text {
|
|
margin-right: $s-8;
|
|
}
|
|
|
|
.title-icon-collapsed {
|
|
transform: rotate(-90deg);
|
|
}
|
|
|
|
.arrow-icon {
|
|
@extend .button-icon;
|
|
stroke: var(--color-foreground-secondary);
|
|
}
|
|
|
|
.move-button {
|
|
position: absolute;
|
|
top: $s-80;
|
|
border: $s-2 solid var(--button-secondary-background-color-rest);
|
|
border-radius: 50%;
|
|
text-align: center;
|
|
width: $s-36;
|
|
height: $s-36;
|
|
cursor: pointer;
|
|
background-color: var(--button-secondary-background-color-rest);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
pointer-events: all;
|
|
|
|
&:hover {
|
|
border: $s-2 solid var(--color-background-tertiary);
|
|
background-color: var(--color-accent-primary);
|
|
.arrow-icon {
|
|
stroke: var(--color-background-tertiary);
|
|
}
|
|
}
|
|
}
|
|
|
|
.move-left {
|
|
left: 0;
|
|
margin-left: $s-44;
|
|
transform: rotate(180deg);
|
|
}
|
|
|
|
.move-right {
|
|
right: 0;
|
|
margin-right: $s-44;
|
|
}
|
|
|
|
.content-description {
|
|
font-size: $fs-14;
|
|
color: var(--color-foreground-primary);
|
|
margin-bottom: -8px;
|
|
margin-top: -4px;
|
|
margin-left: $s-16;
|
|
visibility: visible;
|
|
}
|
|
|
|
.content {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax($s-276, $s-276));
|
|
grid-auto-flow: column;
|
|
pointer-events: all;
|
|
height: $s-228;
|
|
overflow: scroll hidden;
|
|
scroll-behavior: smooth;
|
|
scroll-snap-type: x mandatory;
|
|
scroll-snap-stop: always;
|
|
visibility: visible;
|
|
}
|
|
|
|
.card-container {
|
|
width: $s-276;
|
|
margin-top: $s-20;
|
|
text-align: center;
|
|
vertical-align: top;
|
|
background-color: transparent;
|
|
border: none;
|
|
padding: 0;
|
|
scroll-snap-align: start;
|
|
}
|
|
|
|
.template-card {
|
|
display: inline-block;
|
|
width: $s-256;
|
|
font-size: $fs-16;
|
|
cursor: pointer;
|
|
color: var(--color-foreground-primary);
|
|
padding: 0 $s-4 $s-8 $s-4;
|
|
border-radius: $br-8;
|
|
border: $s-2 solid transparent;
|
|
&:hover {
|
|
border-color: var(--color-accent-primary);
|
|
.download-icon {
|
|
stroke: var(--color-accent-primary);
|
|
}
|
|
.card-text {
|
|
color: var(--color-accent-primary);
|
|
}
|
|
}
|
|
}
|
|
|
|
.img-container {
|
|
width: 100%;
|
|
height: $s-136;
|
|
margin-bottom: $s-8;
|
|
border-radius: $br-5;
|
|
display: flex;
|
|
justify-content: center;
|
|
flex-direction: column;
|
|
|
|
img {
|
|
border-radius: $br-4;
|
|
}
|
|
}
|
|
|
|
.card-name {
|
|
padding: 0 $s-6;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
height: $s-24;
|
|
align-items: center;
|
|
}
|
|
|
|
.card-text {
|
|
font-weight: $fw400;
|
|
font-size: $fs-16;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
width: 90%;
|
|
text-overflow: ellipsis;
|
|
text-align: left;
|
|
}
|
|
|
|
.download-icon {
|
|
@extend .button-icon;
|
|
stroke: var(--icon-foreground);
|
|
}
|
|
|
|
.template-link {
|
|
border: $s-2 solid transparent;
|
|
margin: $s-32;
|
|
padding: $s-32 0;
|
|
}
|
|
|
|
.template-link-title {
|
|
font-size: $fs-14;
|
|
color: var(--color-foreground-primary);
|
|
font-weight: $fw400;
|
|
}
|
|
|
|
.template-link-text {
|
|
font-size: $fs-12;
|
|
margin-top: $s-8;
|
|
color: var(--color-foreground-secondary);
|
|
}
|