cryptpad/www/kanban/app-kanban.less

693 lines
19 KiB
Text
Raw Normal View History

@import (reference) "../../customize/src/less2/include/browser.less";
@import (reference) "../../customize/src/less2/include/framework.less";
@import (reference) "../../customize/src/less2/include/tools.less";
2020-03-04 16:48:20 +00:00
@import (reference) "../../customize/src/less2/include/markdown.less";
2020-03-09 17:49:57 +00:00
@import (reference) "../../customize/src/less2/include/avatar.less";
2018-04-01 16:52:21 +00:00
// body
&.cp-app-kanban {
2018-07-14 13:15:23 +00:00
.framework_main(
@bg-color: @colortheme_apps[kanban],
2018-07-14 13:15:23 +00:00
);
2018-04-01 16:52:21 +00:00
display: flex;
flex-flow: column;
2018-04-01 16:52:21 +00:00
max-height: 100%;
min-height: auto;
2021-01-27 16:00:21 +00:00
color: @cp_kanban-fg;
background-color: @cp_app-bg;
2021-01-27 16:00:21 +00:00
@board-bg: @cp_kanban-board-bg;
2020-03-04 16:48:20 +00:00
2021-01-27 16:00:21 +00:00
@palette0: @cp_kanban-color0; // Default bg color for header
2020-03-11 15:21:53 +00:00
2021-01-27 16:00:21 +00:00
@kanban-colors: @cp_kanban-colors;
2020-03-03 15:20:45 +00:00
2020-03-04 11:56:47 +00:00
.kanban-board-header {
2020-03-10 15:32:18 +00:00
background-color: @palette0;
color: @cryptpad_color_grey_800;
2022-03-01 10:28:46 +00:00
border-radius: @variables_radius @variables_radius 0px 0px;
button.kanban-edit-item {
color: @cryptpad_color_grey_800;
}
2020-03-04 11:56:47 +00:00
}
2020-03-04 16:59:13 +00:00
.kanban-board {
2020-03-05 10:47:49 +00:00
.kanban-board-inner {
2020-10-05 15:35:09 +00:00
touch-action: none;
2020-03-05 10:47:49 +00:00
background-color: @board-bg;
max-height: 100%;
display: flex;
flex-flow: column;
2022-03-01 10:28:46 +00:00
border-radius: @variables_radius;
2022-05-11 12:45:27 +00:00
box-shadow: @cryptpad_ui_shadow;
2020-03-05 10:47:49 +00:00
}
2021-01-27 16:00:21 +00:00
color: @cp_kanban-fg;
button {
color: @cryptpad_text_col;
2021-01-27 16:00:21 +00:00
}
2020-03-04 16:59:13 +00:00
}
2020-03-03 15:20:45 +00:00
2020-03-04 11:56:47 +00:00
.cp-kanban-palette-nocolor {
background-color: @palette0;
}
2020-03-11 15:21:53 +00:00
.kanban-colors(@kanban-colors; @index) when (@index > 0){
// loop through the @colors
2020-03-11 15:21:53 +00:00
.kanban-colors(@kanban-colors; (@index - 1));
@color: extract(@kanban-colors, @index);
// make a numbered class selector for each color
2020-03-11 15:21:53 +00:00
.cp-kanban-palette-color@{index}{
2021-01-29 10:15:30 +00:00
background-color: @color !important;
2020-03-11 15:21:53 +00:00
&.kanban-board-inner {
2021-01-29 10:15:30 +00:00
background-color: fade(@color, 50%) !important;
2020-03-11 15:21:53 +00:00
}
2020-03-04 16:59:13 +00:00
}
2020-03-03 15:20:45 +00:00
}
.kanban-card-colors(@kanban-card-colors; @index) when (@index > 0){
// loop through the @colors
.kanban-colors(@kanban-card-colors; (@index - 1));
@color: extract(@kanban-card-colors, @index);
// make a numbered class selector for each color
.cp-kanban-card-color@{index}{
background-color: @color !important;
}
}
// call the loop
2020-03-11 15:21:53 +00:00
.kanban-colors(@kanban-colors; length(@kanban-colors));
2020-03-03 15:20:45 +00:00
2020-03-09 13:58:49 +00:00
.cp-kanban-edit-modal {
display: flex;
flex-flow: column;
overflow: hidden;
.cp-markdown-toolbar {
display: block;
}
2020-03-09 13:58:49 +00:00
}
2020-03-09 17:49:57 +00:00
#cp-kanban-edit-conflicts {
padding: 5px;
2021-01-27 16:00:21 +00:00
background: @cp_kanban-conflict-bg;
color: @cp_kanban-fg;
2020-03-09 17:49:57 +00:00
font-size: 14px;
div {
display: inline;
}
2020-03-09 17:49:57 +00:00
.cp-kanban-cursors {
display: inline;
margin-left: 5px;
2020-03-09 17:49:57 +00:00
}
margin-bottom: 5px;
}
2020-03-03 15:20:45 +00:00
#cp-kanban-edit-body {
2021-01-27 16:00:21 +00:00
border: 1px solid @cp_forms-border;
2022-03-01 10:28:46 +00:00
border-radius: @variables_radius;
2020-03-03 15:20:45 +00:00
.CodeMirror {
height: 105px;
resize: vertical;
2022-03-01 10:28:46 +00:00
border-radius: 0px 0px @variables_radius @variables_radius;
2020-03-03 15:20:45 +00:00
}
.CodeMirror-scroll {
box-sizing: content-box;
}
.cp-markdown-toolbar {
2021-01-27 16:00:21 +00:00
background-color: @cp_kanban-conflict-bg;
color: @cp_kanban-fg;
2022-03-01 10:28:46 +00:00
border-radius: @variables_radius @variables_radius 0px 0px;
button {
&:hover {
2021-01-27 16:00:21 +00:00
background-color: @cp_kanban-fg;
color: @cp_kanban-conflict-bg;
}
}
2020-03-03 15:20:45 +00:00
}
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;
2021-01-27 16:00:21 +00:00
color: @cp_kanban-fg;
2021-02-04 21:30:13 +00:00
border: 1px solid fade(@cp_kanban-fg, 40%);
2020-03-03 15:20:45 +00:00
}
}
#cp-kanban-edit-tags {
.tokenfield {
margin: 0;
2020-03-12 17:01:38 +00:00
width: 100%;
2020-03-03 15:20:45 +00:00
}
margin-bottom: 15px;
}
#cp-app-kanban-container {
2018-05-16 17:28:30 +00:00
flex: 1;
display: flex;
flex-flow: column;
2020-03-04 14:25:03 +00:00
overflow-x: hidden;
}
#cp-app-kanban-editor {
flex: 1;
display: flex;
flex-flow: row;
height: 100%;
overflow: hidden;
2018-04-01 16:52:21 +00:00
}
2020-03-04 16:48:20 +00:00
.kanban-edit-item {
padding: 5px;
2020-06-19 15:45:01 +00:00
border: 0;
background: transparent;
2020-03-11 16:17:27 +00:00
align-self: flex-start;
2021-02-03 16:27:38 +00:00
@media (hover: none) {
margin-right: 20px;
}
2020-03-04 16:48:20 +00:00
}
2020-03-09 17:49:57 +00:00
.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;
2021-08-26 11:34:38 +00:00
&.cp-cursor.cp-tippy-html {
.avatar_vars(20px);
2021-08-26 11:34:38 +00:00
background-color: var(--red);
font-size: @avatar-font-size;
2021-08-26 11:34:38 +00:00
&.animal {
font-size: @avatar-font-size-animal;
2021-08-26 11:34:38 +00:00
}
}
2020-03-09 17:49:57 +00:00
}
}
2020-03-04 16:48:20 +00:00
.kanban-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 5px;
2022-03-01 10:28:46 +00:00
border-radius: @variables_radius;
2020-03-04 16:48:20 +00:00
flex-wrap: wrap;
2021-01-27 16:00:21 +00:00
background: @cp_kanban-item-bg;
2022-05-11 12:45:27 +00:00
box-shadow: @cryptpad_ui_shadow;
2021-02-03 16:27:38 +00:00
.tools_unselectable();
touch-action: none;
2021-01-27 16:00:21 +00:00
cursor: move;
2021-02-03 16:27:38 +00:00
cursor: grab;
2021-01-27 16:00:21 +00:00
margin-bottom: 10px;
&:last-child {
margin: 0;
}
&.is-moving.gu-mirror {
transform: rotate(3deg);
height: auto !important;
opacity: 0.8;
}
2020-03-09 17:49:57 +00:00
.cp-kanban-cursors {
margin-top: 10px;
}
2020-03-04 16:48:20 +00:00
.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;
2021-01-22 17:30:54 +00:00
.markdown_gfm-table();
p {
margin-bottom: 5px;
}
2021-02-04 21:30:13 +00:00
a {
color: @cp_kanban-link;
text-decoration: underline;
}
2020-03-04 16:48:20 +00:00
ul {
padding-left: 20px;
}
img {
max-width: 100%;
}
2020-03-12 15:28:26 +00:00
pre > code {
border: none;
padding: 5px;
margin: 0;
2021-02-09 20:27:16 +00:00
background-color: @cp_markdown-bg;
color: @cp_kanban-fg;
2020-03-12 15:30:47 +00:00
width: 100%;
2020-03-12 15:28:26 +00:00
}
table {
2021-01-27 16:00:21 +00:00
color: @cp_kanban-fg;
th {
padding: 5px !important;
2021-01-27 16:00:21 +00:00
background-color: fade(@cp_kanban-fg, 10%);
2021-02-04 21:30:13 +00:00
border-color: @cp_kanban-fg !important;
}
td {
2021-02-04 21:30:13 +00:00
border-color: @cp_kanban-fg !important;
padding: 5px;
}
2020-03-04 16:48:20 +00:00
}
}
.kanban-item-tags {
display: flex;
align-items: center;
flex-wrap: wrap;
span {
padding: 0 5px;
margin-right: 5px;
margin-top: 5px;
2022-03-01 10:28:46 +00:00
border-radius: @variables_radius;
2021-01-27 16:00:21 +00:00
background-color: @cp_kanban-tags-bg;
2020-03-04 16:48:20 +00:00
display: inline-block;
font-size: 12px;
}
}
&.new-item {
padding: 10px;
}
.kanban-item-text {
.tools_unselectable();
cursor: text;
overflow-wrap: anywhere;
flex: 1;
}
2020-03-04 17:50:17 +00:00
&.kanban-item-hidden {
display: none;
}
2020-03-04 16:48:20 +00:00
}
2020-03-09 13:27:33 +00:00
.kanban-board {
2021-01-27 16:00:21 +00:00
position: relative;
transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
vertical-align: top;
display: flex;
flex-flow: column;
width: 300px;
margin: 10px 5px;
2021-02-03 16:27:38 +00:00
@media (hover: none) {
margin-bottom: 30px;
}
2021-01-27 16:00:21 +00:00
&.is-moving.gu-mirror {
transform: rotate(3deg);
opacity: 0.8;
.kanban-drag {
overflow: hidden;
padding-right: 50px;
}
}
2020-03-09 13:27:33 +00:00
main {
2022-03-01 10:28:46 +00:00
padding: 10px 5px;
//margin: 10px 0;
2018-05-16 17:28:30 +00:00
flex: 1;
2020-03-09 13:27:33 +00:00
overflow-y: auto;
justify-content: space-around;
2020-03-10 16:05:17 +00:00
min-height: 38px; // Size of one card
2021-02-03 16:27:38 +00:00
@media (hover: none) {
padding-right: 30px;
}
2020-03-09 13:27:33 +00:00
}
header {
2018-05-16 17:28:30 +00:00
display: flex;
2020-03-09 17:49:57 +00:00
flex-wrap: wrap;
2020-03-09 13:27:33 +00:00
align-items: center;
padding: 5px 10px;
2021-02-03 16:27:38 +00:00
cursor: move;
cursor: grab;
2020-03-09 13:27:33 +00:00
.kanban-title-board {
2018-05-16 17:28:30 +00:00
flex: 1;
2020-03-09 13:27:33 +00:00
min-width: 0;
overflow: hidden;
//white-space: nowrap;
text-overflow: ellipsis;
2021-01-27 16:00:21 +00:00
font-weight: 700;
margin: 0;
margin-right: 10px;
padding: 0;
display: inline;
cursor: text;
2020-03-09 13:27:33 +00:00
}
2021-01-27 16:00:21 +00:00
2020-03-09 13:27:33 +00:00
#kanban-edit {
font-weight: bold;
}
2018-05-16 17:28:30 +00:00
}
2020-03-09 13:27:33 +00:00
footer {
2022-03-01 10:28:46 +00:00
margin: 5px;
margin-top: 5px;
2020-06-03 11:16:10 +00:00
display: flex;
2020-03-09 13:27:33 +00:00
span {
.tools_unselectable();
outline: none;
2020-06-03 11:16:10 +00:00
width: 50%;
2021-01-27 16:00:21 +00:00
border: 1px solid fade(@cp_kanban-fg, 70%);
color: fade(@cp_kanban-fg, 70%);
2022-03-01 10:28:46 +00:00
border-radius: @variables_radius;
2020-06-09 12:27:04 +00:00
font-size: 25px;
2020-03-04 17:50:17 +00:00
display: inline-flex;
2020-03-09 13:27:33 +00:00
justify-content: center;
align-items: center;
line-height: 1;
cursor: pointer;
2020-06-03 11:16:10 +00:00
height: 40px;
2020-06-09 12:27:04 +00:00
&:first-child {
margin-right: 5px;
}
&:last-child {
margin-left: 5px;
}
2020-03-09 13:27:33 +00:00
&:hover {
2021-01-27 16:00:21 +00:00
background-color: @cp_kanban-add-hover;
2020-03-05 11:06:35 +00:00
}
2020-06-03 11:16:10 +00:00
.fa {
margin-right: 5px;
}
2020-03-09 13:27:33 +00:00
}
}
}
2020-03-05 13:06:34 +00:00
2020-03-09 13:27:33 +00:00
#cp-kanban-controls {
//background-color: fade(@toolbar-bg-color-active, 50%); // FIXME ?
//color: @cp_toolbar-fg;
2020-03-09 13:27:33 +00:00
padding: 10px;
display: flex;
position: relative;
width: 100%;
justify-content: space-between;
position: relative;
min-height: 50px;
.cp-kanban-filterTags {
display: inline-flex;
2020-06-15 13:16:33 +00:00
align-items: center;
2020-03-09 13:27:33 +00:00
flex: 1;
//max-width: 80%;
2020-03-09 13:27:33 +00:00
min-width: 150px;
.cp-kanban-filterTags-toggle {
min-width: 100px;
2020-06-15 13:16:33 +00:00
display: flex;
flex-flow: column;
flex-shrink: 0;
& > * {
visibility: hidden;
}
& > span {
display: inline-block;
height: 38px;
line-height: 38px;
}
& > button {
margin-top: -38px;
}
}
2020-06-15 13:16:33 +00:00
button.cp-kanban-filterTags-reset {
2020-03-09 13:27:33 +00:00
cursor: pointer;
2020-06-15 13:16:33 +00:00
white-space: normal !important;
.tools_unselectable();
2020-03-12 14:43:10 +00:00
i {
margin-right: 5px;
}
2020-03-04 17:50:17 +00:00
}
2020-03-09 13:27:33 +00:00
.cp-kanban-filterTags-list {
margin-right: 10px;
2020-03-09 13:27:33 +00:00
margin-left: 10px;
display: flex;
flex-wrap: wrap;
2020-06-19 15:45:01 +00:00
&:not(.cp-empty) {
2020-06-15 13:16:33 +00:00
margin-top: -5px;
}
2020-03-09 13:27:33 +00:00
em {
font-size: 14px;
2021-01-27 16:00:21 +00:00
color: lighten(@cp_kanban-fg, 10%);
2020-03-09 13:27:33 +00:00
}
2020-03-04 16:48:20 +00:00
span {
2020-03-09 13:27:33 +00:00
.tools_unselectable();
padding: 0 5px;
margin-right: 5px;
margin-top: 5px;
2021-01-27 16:00:21 +00:00
background-color: @cp_kanban-tags-bg;
2022-03-01 10:28:46 +00:00
border-radius: @variables_radius;
2020-03-04 16:48:20 +00:00
display: inline-block;
2020-03-09 13:27:33 +00:00
font-size: 14px;
2020-03-04 16:48:20 +00:00
cursor: pointer;
2020-03-09 13:27:33 +00:00
&.active {
2021-01-27 16:00:21 +00:00
background-color: @cp_kanban-fg;
color: @cp_kanban-item-bg;
2020-03-04 16:48:20 +00:00
}
}
}
}
2020-03-09 13:27:33 +00:00
.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%);
}
2022-03-01 10:28:46 +00:00
&:first-child {
border-radius: @variables_radius 0px 0px @variables_radius;
}
&:last-child {
border-radius: 0px @variables_radius @variables_radius 0px;
}
2020-03-09 13:27:33 +00:00
}
}
}
#cp-app-kanban-container {
2020-03-04 16:48:20 +00:00
&:not(.cp-kanban-quick) {
#cp-kanban-controls {
.cp-kanban-changeView {
span.cp-kanban-view {
2021-01-27 16:00:21 +00:00
background-color: @cp_kanban-fg !important;
color: @cp_app-bg;
2020-03-04 16:48:20 +00:00
}
2022-03-01 10:28:46 +00:00
// span.cp-kanban-view-small {
// }
2020-03-04 16:48:20 +00:00
}
}
}
&.cp-kanban-quick {
#cp-kanban-controls {
.cp-kanban-changeView {
2022-03-01 10:28:46 +00:00
// span.cp-kanban-view {
// }
2020-03-04 16:48:20 +00:00
span.cp-kanban-view-small {
2021-01-27 16:00:21 +00:00
background-color: @cp_kanban-fg !important;
color: @cp_app-bg;
2020-03-04 16:48:20 +00:00
}
}
}
.kanban-item {
.kanban-item-body, .kanban-item-tags {
display: none;
}
}
}
2020-03-09 13:27:33 +00:00
}
#cp-app-kanban-content {
flex: 1;
display: flex;
flex-flow: column;
max-height: 100%;
overflow-x: auto;
2020-03-10 16:00:54 +00:00
outline: none;
2020-03-09 13:27:33 +00:00
.kanban-container-outer {
flex: 1;
display: flex;
min-height: 0;
.kanban-container {
2020-03-13 10:42:52 +00:00
padding: 0px 5px;
2020-03-09 13:27:33 +00:00
flex: 1;
display: flex;
max-height: 100%;
}
}
2020-03-02 11:05:09 +00:00
#kanban-trash {
height: 1px;
font-size: 0px;
/* CSS transitions are nice to look at, but it seems some interaction of "display: flex" here
makes the horizontal scrollbar stop working, so we need "display: none" for this state, but
CSS transitions are disabled when one state has "display: none". We can accomplish this in
js, but js animations are more prone to bugs and I'd rather live with a slight jank than
have the trash get stuck in some intermediary animation state under heavy use. --ansuz
*/
display: none; // flex;
//transition: opacity 400ms, height 400ms, font-size 400ms;
2020-03-02 11:05:09 +00:00
align-items: center;
justify-content: center;
2020-03-04 14:25:03 +00:00
position: relative;
width: 100%;
2020-03-09 13:27:33 +00:00
//pointer-events: none;
&.kanban-trash-active, &.kanban-trash-suggest {
display: flex;
height: 60px;
font-size: 40px;
}
2020-03-04 14:25:03 +00:00
i {
position: fixed;
}
2020-03-09 13:27:33 +00:00
div {
width: 100%;
height: 60px;
position: fixed;
right: 0;
}
2020-03-02 11:05:09 +00:00
&.kanban-trash-active {
2021-01-27 16:00:21 +00:00
color: @cp_kanban-trash-bg;
2020-03-09 13:27:33 +00:00
div {
2021-01-27 16:00:21 +00:00
background: fade(@cp_kanban-trash-bg, 20%);
2020-03-09 13:27:33 +00:00
}
2020-03-02 11:05:09 +00:00
}
2020-03-13 09:40:52 +00:00
&.kanban-trash-suggest {
div {
2021-01-27 16:00:21 +00:00
background: fade(@cp_kanban-fg, 20%);
2020-03-13 09:40:52 +00:00
}
}
2020-03-02 11:05:09 +00:00
.kanban-item, .kanban-board {
display: none;
}
}
2018-05-16 17:28:30 +00:00
#kanban-edit {
width: 100%;
background: transparent;
2021-01-27 16:00:21 +00:00
border: 1px solid @cp_kanban-add-hover;
2018-09-18 12:56:06 +00:00
color: inherit;
}
2018-05-16 17:28:30 +00:00
#kanban-addboard {
order: 2;
width: 50px;
2020-03-04 14:34:36 +00:00
margin: 10px 5px;
2021-01-27 16:00:21 +00:00
border: 1px solid @cp_kanban-fg;
2022-03-01 10:28:46 +00:00
border-radius: @variables_radius;
2021-01-27 16:00:21 +00:00
color: @cp_kanban-fg;
2020-03-04 14:34:36 +00:00
height: 40px;
display: inline-flex;
justify-content: center;
align-items: center;
align-self: flex-start;
2020-06-09 12:27:04 +00:00
font-size: 25px;
line-height: 100%;
cursor: pointer;
.tools_unselectable();
&:hover {
2021-01-27 16:00:21 +00:00
background-color: @cp_kanban-add-hover;
}
2018-05-22 16:22:25 +00:00
}
.kanban-header-yellow {
background: #FC3 !important;
}
2018-05-16 17:28:30 +00:00
.kanban-header-orange {
background: #F91 !important;
}
2018-05-16 17:28:30 +00:00
.kanban-header-blue {
background: #0AC !important;
}
2018-05-16 17:28:30 +00:00
.kanban-header-red {
background: #E43 !important;
}
2018-05-16 17:28:30 +00:00
.kanban-header-green {
background: #8C4 !important;
}
2018-04-01 16:52:21 +00:00
.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;
}
2020-03-05 13:06:34 +00:00
#kanban-trash {
display: none;
}
2018-04-01 16:52:21 +00:00
}
}
2021-01-27 16:00:21 +00:00
.gu-mirror {
position: fixed !important;
margin: 0 !important;
z-index: 9999 !important;
}
.gu-hide {
display: none !important;
}
.gu-unselectable {
-webkit-user-select: none !important;
-moz-user-select: none !important;
-ms-user-select: none !important;
user-select: none !important;
}
.gu-transit {
opacity: 0.2 !important;
transform: rotate(0deg) !important;
}
.form-group {
text-align: right;
2022-03-01 10:28:46 +00:00
margin-bottom: 5px;
2021-01-27 16:00:21 +00:00
}
2018-04-01 16:52:21 +00:00
}