cryptpad/customize.dist/src/less2/include/sidebar-layout.less

247 lines
8.2 KiB
Plaintext

/*
* SPDX-FileCopyrightText: 2023 XWiki CryptPad Team <contact@cryptpad.org> and contributors
*
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
@import (reference) "/customize/src/less2/include/colortheme-all.less";
@import (reference) "/customize/src/less2/include/leftside-menu.less";
@import (reference) "/customize/src/less2/include/browser.less";
@sidebar_button-width: 400px;
.sidebar-layout_main() {
--LessLoader_require: LessLoader_currentFile();
// This is way too broad to put in the global scope
input[type="text"], input[type="password"] {
padding-left: 10px;
}
}
& {
#cp-sidebarlayout-container {
font-size: 16px;
display: flex;
flex: 1;
min-height: 0;
@media(min-width:800px) {
#cp-sidebarlayout-leftside {
overflow-y: scroll;
}
}
#cp-sidebarlayout-leftside {
color: @cp_sidebar-left-fg;
width: 250px;
background: @cp_sidebar-left-bg;
display: flex;
flex-flow: column;
padding: 0px 5px;
.cp-sidebarlayout-categories {
flex: 1;
.cp-sidebarlayout-category {
display: flex;
align-items: center;
.leftside-menu-category_main();
box-shadow: @cryptpad_ui_shadow;
}
}
&.cp-leftside-narrow {
transition: width 0.2s;
width: 55px;
.cp-sidebarlayout-category {
display: flex;
max-width: 100%;
align-items: center;
.fa, .cptools {
margin-right: 0;
flex: 0;
}
span.cp-sidebarlayout-category-name {
padding-left: 5px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
min-width: 0;
display: none;
@media screen and (max-width: @browser_media-medium-screen) {
display: inline;
}
}
}
&:hover {
transition: width 0.5s;
width: 250px;
.cp-sidebarlayout-category {
span.cp-sidebarlayout-category-name {
display: inline;
}
}
}
}
}
#cp-sidebarlayout-rightside {
flex: 1;
padding: 5px 20px;
background: @cp_sidebar-right-bg;
color: @cp_sidebar-right-fg;
overflow: auto;
// Following rules are only in settings
.cp-sidebarlayout-element {
pre {
color: @cryptpad_text_col;
}
&:not([data-item]) { // Old sidebar-layout blocks
label:not(.noTitle), .cp-default-label {
display: block;
font-weight: bold;
margin-bottom: 0;
}
}
&[data-item] { // New sidebar-layout blocks
label.cp-item-label, .cp-default-label {
display: block;
font-weight: bold;
margin-bottom: 0;
}
.cp-sidebar-form {
display: flex;
flex-flow: column;
align-items: baseline;
}
input {
max-width: 25rem;
}
nav {
display: flex;
align-items: baseline;
.btn.btn-primary {
margin: 5px 0.5rem 0 0;
}
}
.cp-sidebar-bigger-alert {
font-size: 16px;
}
label {
margin-bottom: 0;
margin-top: 0.5rem;
}
th {
max-width: 60vw;
border: 1px solid #777;
padding: 7px;
}
td {
padding: 0.3rem;
margin-right: 2px;
}
.cp-checkmark {
padding: 0.5rem;
}
.cp-broadcast-container {
display: flex;
flex-flow: column;
}
.cp-broadcast-lang {
order: 4;
margin: 30px;
margin-bottom: 0;
display: flex;
flex-flow: column;
align-items: baseline;
}
a {
color: @cryptpad_color_link;
text-decoration: underline;
}
table {
.cp-strong {
font-weight: bold;
}
}
}
.cp-sidebarlayout-description {
display: block;
color: @cp_sidebar-hint;
margin-bottom: 0.5rem;
p {
margin-bottom: 0;
}
}
label.noTitle {
display: inline-flex;
.fa {
margin-left: 10px;
}
}
margin-bottom: 20px;
}
.secret-code {
margin-top: 1rem;
}
[type="text"], [type="password"], button {
vertical-align: middle;
min-width: 40px;
height: 40px;
box-sizing: border-box;
}
[type="file"] { // XXX hack, to fix with sidebar layout refactoring
height: auto;
box-sizing: border-box;
padding: 6.5px;
}
.cp-sidebarlayout-input-block {
display: inline-flex;
width: @sidebar_button-width;
max-width: 100%;
input {
flex: 1;
//border-radius: 0.25em 0 0 0.25em;
border: 1px solid @cryptpad_color_grey_500;
border-right: 0px;
border-top-right-radius: 0px;
border-bottom-right-radius: 0px;
}
button {
border-top-left-radius: 0px;
border-bottom-left-radius: 0px;
border-left: 0px;
height: 40px;
margin: 0 !important;
}
}
&>div {
margin: 10px 0;
}
button.btn {
margin: 0 0.5rem 0 0;
}
span.cp-password-container {
margin-bottom: 1rem;
}
}
@media screen and (max-width: @browser_media-medium-screen) {
flex-flow: column;
overflow: auto;
#cp-sidebarlayout-leftside {
width: 100% !important; // Override "narrow" mode
padding-bottom: 20px;
.cp-sidebarlayout-categories {
.cp-sidebarlayout-category {
margin: 0 0 0.5rem 0;
span.cp-sidebar-layout-category-name {
display: inline !important; // override "narrow" mode
}
}
}
}
#cp-sidebarlayout-rightside {
overflow: unset;
}
}
}
}