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

709 lines
20 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_apps[kanban],
);
display: flex;
flex-flow: column;
max-height: 100%;
min-height: auto;
color: @cp_kanban-fg;
background-color: @cp_app-bg;
@board-bg: @cp_kanban-board-bg;
@palette0: @cp_kanban-color0; // Default bg color for header
@kanban-colors: @cp_kanban-colors;
@kanban-card-colors: @cp_kanban-card-colors;
.kanban-board-header {
background-color: @palette0;
color: @cryptpad_color_grey_800;
border-radius: @variables_radius @variables_radius 0px 0px;
button.kanban-edit-item {
color: @cryptpad_color_grey_800;
}
}
5 years ago
.kanban-board {
5 years ago
.kanban-board-inner {
touch-action: none;
5 years ago
background-color: @board-bg;
max-height: 100%;
display: flex;
flex-flow: column;
border-radius: @variables_radius;
box-shadow: @cryptpad_ui_shadow;
5 years ago
}
color: @cp_kanban-fg;
button {
color: @cryptpad_text_col;
}
5 years ago
}
.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 !important;
&.cp-kanban-palette-board {
background-color: @color !important;
}
&.kanban-board-inner {
background-color: fade(@color, 50%) !important;
}
5 years ago
}
}
.kanban-card-colors(@kanban-card-colors; @index) when (@index > 0){
// loop through the @colors
.kanban-card-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;
// }
.cp-kanban-palette-color@{index}{
&.cp-kanban-palette-card {
background-color: @color !important;
}
&.kanban-item {
background-color: @color !important;
}
}
}
// call the loop
.kanban-colors(@kanban-colors; length(@kanban-colors));
.kanban-card-colors(@kanban-card-colors; length(@kanban-card-colors));
.cp-kanban-edit-modal {
display: flex;
flex-flow: column;
overflow: hidden;
.cp-markdown-toolbar {
display: block;
}
}
#cp-kanban-edit-conflicts {
padding: 5px;
background: @cp_kanban-conflict-bg;
color: @cp_kanban-fg;
font-size: 14px;
div {
display: inline;
}
.cp-kanban-cursors {
display: inline;
margin-left: 5px;
}
margin-bottom: 5px;
}
#cp-kanban-edit-body {
border: 1px solid @cp_forms-border;
border-radius: @variables_radius;
.CodeMirror {
height: 105px;
resize: vertical;
border-radius: 0px 0px @variables_radius @variables_radius;
}
.CodeMirror-scroll {
box-sizing: content-box;
}
.cp-markdown-toolbar {
background-color: @cp_kanban-conflict-bg;
color: @cp_kanban-fg;
border-radius: @variables_radius @variables_radius 0px 0px;
button {
&:hover {
background-color: @cp_kanban-fg;
color: @cp_kanban-conflict-bg;
}
}
}
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: @cp_kanban-fg;
4 years ago
border: 1px solid fade(@cp_kanban-fg, 40%);
&.fa-check { // tick on selected color
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;
border: 0;
background: transparent;
align-self: flex-start;
@media (hover: none) {
margin-right: 20px;
}
}
.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;
&.cp-cursor.cp-tippy-html {
.avatar_vars(20px);
background-color: var(--red);
font-size: @avatar-font-size;
&.animal {
font-size: @avatar-font-size-animal;
}
}
}
}
.kanban-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 5px;
border-radius: @variables_radius;
flex-wrap: wrap;
background: @cp_kanban-item-bg;
box-shadow: @cryptpad_ui_shadow;
.tools_unselectable();
touch-action: none;
cursor: move;
cursor: grab;
margin-bottom: 5px;
&:last-child {
margin: 0;
}
&.is-moving.gu-mirror {
transform: rotate(3deg);
height: auto !important;
opacity: 0.8;
}
.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;
4 years ago
.markdown_gfm-table();
p {
margin-bottom: 5px;
}
4 years ago
a {
color: @cp_kanban-link;
text-decoration: underline;
}
ul {
padding-left: 20px;
}
img {
max-width: 100%;
}
pre > code {
border: none;
padding: 5px;
margin: 0;
background-color: @cp_markdown-bg;
color: @cp_kanban-fg;
width: 100%;
}
table {
color: @cp_kanban-fg;
th {
padding: 5px !important;
background-color: fade(@cp_kanban-fg, 10%);
4 years ago
border-color: @cp_kanban-fg !important;
}
td {
4 years ago
border-color: @cp_kanban-fg !important;
padding: 5px;
}
}
}
.kanban-item-tags {
display: flex;
align-items: center;
flex-wrap: wrap;
span {
padding: 0 5px;
margin-right: 5px;
margin-top: 5px;
border-radius: @variables_radius;
background-color: @cp_kanban-tags-bg;
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 {
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;
@media (hover: none) {
margin-bottom: 30px;
}
&.is-moving.gu-mirror {
transform: rotate(3deg);
opacity: 0.8;
.kanban-drag {
overflow: hidden;
padding-right: 50px;
}
}
5 years ago
main {
padding: 10px 5px;
//margin: 10px 0;
flex: 1;
5 years ago
overflow-y: auto;
justify-content: space-around;
min-height: 38px; // Size of one card
@media (hover: none) {
padding-right: 30px;
}
5 years ago
}
header {
display: flex;
flex-wrap: wrap;
5 years ago
align-items: center;
padding: 5px 10px;
cursor: move;
cursor: grab;
5 years ago
.kanban-title-board {
flex: 1;
5 years ago
min-width: 0;
overflow: hidden;
//white-space: nowrap;
text-overflow: ellipsis;
font-weight: 700;
margin: 0;
margin-right: 10px;
padding: 0;
display: inline;
cursor: text;
5 years ago
}
5 years ago
#kanban-edit {
font-weight: bold;
}
}
5 years ago
footer {
margin: 5px;
margin-top: 5px;
display: flex;
5 years ago
span {
.tools_unselectable();
outline: none;
width: 50%;
border: 1px solid fade(@cp_kanban-fg, 70%);
color: fade(@cp_kanban-fg, 70%);
border-radius: @variables_radius;
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: @cp_kanban-add-hover;
5 years ago
}
.fa {
margin-right: 5px;
}
5 years ago
}
}
}
5 years ago
#cp-kanban-controls {
//background-color: fade(@toolbar-bg-color-active, 50%); // FIXME ?
//color: @cp_toolbar-fg;
5 years ago
padding: 10px;
display: flex;
position: relative;
width: 100%;
justify-content: space-between;
position: relative;
min-height: 50px;
.cp-kanban-filterTags {
display: inline-flex;
5 years ago
align-items: center;
5 years ago
flex: 1;
//max-width: 80%;
5 years ago
min-width: 150px;
.cp-kanban-filterTags-toggle {
min-width: 100px;
5 years ago
display: flex;
flex-flow: column;
flex-shrink: 0;
& > * {
visibility: hidden;
}
& > span {
display: inline-block;
height: 38px;
line-height: 38px;
}
& > button {
margin-top: -38px;
}
}
5 years ago
button.cp-kanban-filterTags-reset {
5 years ago
cursor: pointer;
5 years ago
white-space: normal !important;
.tools_unselectable();
i {
margin-right: 5px;
}
5 years ago
}
5 years ago
.cp-kanban-filterTags-list {
margin-right: 10px;
5 years ago
margin-left: 10px;
display: flex;
flex-wrap: wrap;
&:not(.cp-empty) {
5 years ago
margin-top: -5px;
}
5 years ago
em {
font-size: 14px;
color: lighten(@cp_kanban-fg, 10%);
5 years ago
}
span {
5 years ago
.tools_unselectable();
padding: 0 5px;
margin-right: 5px;
margin-top: 5px;
background-color: @cp_kanban-tags-bg;
border-radius: @variables_radius;
display: inline-block;
5 years ago
font-size: 14px;
cursor: pointer;
5 years ago
&.active {
background-color: @cp_kanban-fg;
color: @cp_kanban-item-bg;
}
}
}
}
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%);
}
&:first-child {
border-radius: @variables_radius 0px 0px @variables_radius;
}
&:last-child {
border-radius: 0px @variables_radius @variables_radius 0px;
}
5 years ago
}
}
}
#cp-app-kanban-container {
&:not(.cp-kanban-quick) {
#cp-kanban-controls {
.cp-kanban-changeView {
span.cp-kanban-view {
background-color: @cp_kanban-fg !important;
color: @cp_app-bg;
}
// 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: @cp_kanban-fg !important;
color: @cp_app-bg;
}
}
}
.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: 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;
5 years ago
align-items: center;
justify-content: center;
position: relative;
width: 100%;
5 years ago
//pointer-events: none;
&.kanban-trash-active, &.kanban-trash-suggest {
display: flex;
height: 60px;
font-size: 40px;
}
i {
position: fixed;
}
5 years ago
div {
width: 100%;
height: 60px;
position: fixed;
right: 0;
}
5 years ago
&.kanban-trash-active {
color: @cp_kanban-trash-bg;
5 years ago
div {
background: fade(@cp_kanban-trash-bg, 20%);
5 years ago
}
5 years ago
}
&.kanban-trash-suggest {
div {
background: fade(@cp_kanban-fg, 20%);
}
}
5 years ago
.kanban-item, .kanban-board {
display: none;
}
}
#kanban-edit {
width: 100%;
background: transparent;
border: 1px solid @cp_kanban-add-hover;
color: inherit;
}
#kanban-addboard {
order: 2;
width: 50px;
5 years ago
margin: 10px 5px;
border: 1px solid @cp_kanban-fg;
border-radius: @variables_radius;
color: @cp_kanban-fg;
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 {
background-color: @cp_kanban-add-hover;
}
}
.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;
}
}
}
.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;
margin-bottom: 5px;
}
}