You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cryptpad/www/kanban/app-kanban.less

543 lines
14 KiB
Plaintext

@import (reference) "../../customize/src/less2/include/browser.less";
@import (reference) "../../customize/src/less2/include/framework.less";
@import (reference) "../../customize/src/less2/include/tools.less";
@import (reference) "../../customize/src/less2/include/markdown.less";
@import (reference) "../../customize/src/less2/include/avatar.less";
// body
&.cp-app-kanban {
.framework_main(
@bg-color: @colortheme_kanban-bg,
@warn-color: @colortheme_kanban-warn,
@color: @colortheme_kanban-color
);
display: flex;
flex-flow: column;
max-height: 100%;
min-height: auto;
5 years ago
color: @cryptpad_text_col;
@board-bg: #eaeaea;
@palette0: #C9C9C9; // Default bg color for header
@kanban-colors:
#FFD4D4,
#FFDECA,
#FFE69C,
#DBFFB7,
#AFFDC2,
#C9FFFE,
#C8D6FF,
#E4CAFF;
.kanban-board-header {
background-color: @palette0;
}
5 years ago
.kanban-board {
5 years ago
.kanban-board-inner {
background-color: @board-bg;
max-height: 100%;
display: flex;
flex-flow: column;
}
5 years ago
color: @cryptpad_text_col;
}
.cp-kanban-palette-nocolor {
background-color: @palette0;
}
.kanban-colors(@kanban-colors; @index) when (@index > 0){
// loop through the @colors
.kanban-colors(@kanban-colors; (@index - 1));
@color: extract(@kanban-colors, @index);
// make a numbered class selector for each color
.cp-kanban-palette-color@{index}{
background-color: @color;
&.kanban-board-inner {
background-color: fade(@color, 50%);
}
5 years ago
}
}
// call the loop
.kanban-colors(@kanban-colors; length(@kanban-colors));
.cp-kanban-edit-modal {
display: flex;
flex-flow: column;
overflow: hidden;
}
#cp-kanban-edit-conflicts {
padding: 5px;
background: #eee;
color: @cryptpad_text_col;
font-size: 14px;
div {
display: inline;
}
.cp-kanban-cursors {
display: inline;
margin-left: 5px;
}
margin-bottom: 5px;
}
#cp-kanban-edit-body {
border: 1px solid @colortheme_modal-input;
.CodeMirror {
height: 105px;
resize: vertical;
}
.CodeMirror-scroll {
box-sizing: content-box;
}
.cp-markdown-toolbar {
background-color: #eee;
color: @cryptpad_text_col;
button {
&:hover {
background-color: @cryptpad_text_col;
color: white;
}
}
}
margin-bottom: 15px;
}
#cp-kanban-edit-colors {
display: flex;
justify-content: space-between;
.cp-kanban-palette {
display: inline-block;
border-radius: 50%;
height: 30px;
width: 30px;
text-align: center;
line-height: 30px;
color: @cryptpad_text_col;
}
}
#cp-kanban-edit-tags {
.tokenfield {
margin: 0;
width: 100%;
}
margin-bottom: 15px;
}
#cp-app-kanban-container {
flex: 1;
display: flex;
flex-flow: column;
overflow-x: hidden;
}
#cp-app-kanban-editor {
flex: 1;
display: flex;
flex-flow: row;
height: 100%;
overflow: hidden;
}
.kanban-edit-item {
padding: 5px;
align-self: flex-start;
}
.cp-kanban-cursors {
&:empty { display: none; }
order: 2;
width: 100%;
&> span {
display: inline-block;
width: 20px;
height: 20px;
text-align: center;
line-height: 20px;
margin-right: 5px;
.tools_unselectable();
cursor: default;
}
}
.kanban-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 5px;
flex-wrap: wrap;
.cp-kanban-cursors {
margin-top: 10px;
}
.kanban-item-body, .kanban-item-tags {
.tools_unselectable();
width: 100%;
}
.kanban-item-body {
margin: 10px 0;
font-size: 0.8em;
:last-child {
margin-bottom: 0px;
}
.markdown_main();
.markdown_cryptpad();
.markdown_preformatted-code;
.markdown_gfm-table(black);
p {
margin-bottom: 5px;
}
ul {
padding-left: 20px;
}
img {
max-width: 100%;
}
pre > code {
border: none;
padding: 5px;
margin: 0;
background-color: @cryptpad_color_light_grey;
width: 100%;
}
table {
color: @cryptpad_text_col;
border-color: @cryptpad_text_col;
th {
padding: 5px !important;
background-color: fade(@cryptpad_text_col, 10%);
}
td {
padding: 5px;
}
}
}
.kanban-item-tags {
display: flex;
align-items: center;
flex-wrap: wrap;
span {
padding: 0 5px;
margin-right: 5px;
margin-top: 5px;
background-color: rgba(0,0,0,0.1);
display: inline-block;
font-size: 12px;
}
}
&.new-item {
padding: 10px;
}
.kanban-item-text {
.tools_unselectable();
cursor: text;
overflow-wrap: anywhere;
flex: 1;
}
5 years ago
&.kanban-item-hidden {
display: none;
}
}
5 years ago
.kanban-board {
main {
padding: 0 10px;
margin: 10px 0;
flex: 1;
5 years ago
overflow-y: auto;
justify-content: space-around;
min-height: 38px; // Size of one card
5 years ago
}
header {
display: flex;
flex-wrap: wrap;
5 years ago
align-items: center;
padding: 5px 10px;
.kanban-title-board {
flex: 1;
5 years ago
margin-right: 10px;
min-width: 0;
overflow: hidden;
//white-space: nowrap;
text-overflow: ellipsis;
}
#kanban-edit {
font-weight: bold;
}
&:hover {
cursor: move;
}
}
5 years ago
footer {
margin: 10px;
margin-top: 0px;
display: flex;
5 years ago
span {
.tools_unselectable();
outline: none;
width: 50%;
border: 1px solid fade(@cryptpad_text_col, 70%);
color: fade(@cryptpad_text_col, 70%);
5 years ago
border-radius: 0px;
5 years ago
font-size: 25px;
5 years ago
display: inline-flex;
5 years ago
justify-content: center;
align-items: center;
line-height: 1;
cursor: pointer;
height: 40px;
5 years ago
&:first-child {
margin-right: 5px;
}
&:last-child {
margin-left: 5px;
}
5 years ago
&:hover {
background-color: rgba(0,0,0,0.1);
5 years ago
}
.fa {
margin-right: 5px;
}
5 years ago
}
}
}
5 years ago
#cp-kanban-controls {
padding: 10px;
display: flex;
position: relative;
width: 100%;
justify-content: space-between;
position: relative;
min-height: 50px;
.cp-kanban-filterTags {
display: inline-flex;
align-items: baseline;
flex: 1;
max-width: 80%;
min-width: 150px;
5 years ago
.cp-kanban-filterTags-reset {
5 years ago
cursor: pointer;
margin-left: 10px;
flex-shrink: 0;
.tools_unselectable();
i {
margin-right: 5px;
}
5 years ago
}
5 years ago
.cp-kanban-filterTags-name {
flex-shrink: 0;
}
.cp-kanban-filterTags-list {
margin-left: 10px;
display: flex;
flex-wrap: wrap;
em {
font-size: 14px;
color: lighten(@cryptpad_text_col, 10%);
}
span {
5 years ago
.tools_unselectable();
padding: 0 5px;
margin-right: 5px;
margin-top: 5px;
background-color: rgba(0,0,0,0.1);
display: inline-block;
5 years ago
font-size: 14px;
cursor: pointer;
5 years ago
&.active {
background-color: @cryptpad_text_col;
color: #fff;
}
}
}
}
5 years ago
.cp-kanban-changeView {
right: 10px;
height: 30px;
width: 60px;
span {
height: 30px;
width: 30px;
line-height: 30px;
text-align: center;
display: inline-block;
background-color: @board-bg;
cursor: pointer;
&:hover {
background-color: darken(@board-bg, 10%);
}
}
}
}
#cp-app-kanban-container {
&:not(.cp-kanban-quick) {
#cp-kanban-controls {
.cp-kanban-changeView {
span.cp-kanban-view {
background-color: @cryptpad_text_col !important;
color: white;
}
span.cp-kanban-view-small {
}
}
}
}
&.cp-kanban-quick {
#cp-kanban-controls {
.cp-kanban-changeView {
span.cp-kanban-view {
}
span.cp-kanban-view-small {
background-color: @cryptpad_text_col !important;
color: white;
}
}
}
.kanban-item {
.kanban-item-body, .kanban-item-tags {
display: none;
}
}
}
5 years ago
}
#cp-app-kanban-content {
flex: 1;
display: flex;
flex-flow: column;
max-height: 100%;
overflow-x: auto;
outline: none;
5 years ago
.kanban-container-outer {
flex: 1;
display: flex;
min-height: 0;
.kanban-container {
padding: 0px 5px;
5 years ago
flex: 1;
display: flex;
max-height: 100%;
}
}
5 years ago
#kanban-trash {
height: 60px;
5 years ago
font-size: 40px;
display: flex;
align-items: center;
justify-content: center;
position: relative;
width: 100%;
5 years ago
//pointer-events: none;
i {
position: fixed;
}
5 years ago
div {
width: 100%;
height: 60px;
position: fixed;
right: 0;
}
5 years ago
&.kanban-trash-active {
color: @colortheme_notification-warn;
5 years ago
div {
background: fade(@colortheme_notification-warn, 20%);
5 years ago
}
5 years ago
}
&.kanban-trash-suggest {
div {
background: fade(@cryptpad_text_col, 20%);
}
}
5 years ago
.kanban-item, .kanban-board {
display: none;
}
}
#kanban-edit {
width: 100%;
background: transparent;
border: 1px solid rgba(0,0,0,0.3);
color: inherit;
}
#kanban-addboard {
order: 2;
5 years ago
width: 300px;
margin: 10px 5px;
border: 1px solid @cryptpad_text_col;
5 years ago
color: @cryptpad_text_col;
5 years ago
height: 40px;
display: inline-flex;
justify-content: center;
align-items: center;
align-self: flex-start;
5 years ago
font-size: 25px;
line-height: 100%;
cursor: pointer;
.tools_unselectable();
&:hover {
5 years ago
background-color: rgba(0,0,0,0.1);
}
}
.kanban-header-yellow {
background: #FC3 !important;
}
.kanban-header-orange {
background: #F91 !important;
}
.kanban-header-blue {
background: #0AC !important;
}
.kanban-header-red {
background: #E43 !important;
}
.kanban-header-green {
background: #8C4 !important;
}
.kanban-header-purple {
background: #c851ff !important;
}
.kanban-header-cyan {
background: #00ffff !important;
}
.kanban-header-lightgreen {
background: #c3ff5b !important;
}
.kanban-header-lightblue {
background: #adeeff !important;
}
@media (max-width: @browser_media-medium-screen) {
#cp-app-kanban-container {
flex: 1;
max-width: 100%;
resize: none;
}
}
&.cp-app-readonly {
.kanban-item, .kanban-title-board {
cursor: default !important;
.tools_unselectable();
}
.kanban-title-button, #kanban-addboard, .kanban-remove-item, .kanban-additem {
display: none !important;
}
#kanban-trash {
display: none;
}
}
}
}