Fix board height

pull/1/head
yflory 5 years ago
parent bd7d9a93c2
commit 411b125b0f

@ -33,7 +33,12 @@
background-color: #c9c9c9; background-color: #c9c9c9;
} }
.kanban-board { .kanban-board {
.kanban-board-inner {
background-color: @board-bg; background-color: @board-bg;
max-height: 100%;
display: flex;
flex-flow: column;
}
color: @cryptpad_text_col; color: @cryptpad_text_col;
} }
@ -42,49 +47,49 @@
} }
.cp-kanban-palette-color1 { .cp-kanban-palette-color1 {
background-color: @palette1; background-color: @palette1;
&.kanban-board { &.kanban-board-inner {
background-color: lighten(@palette1, 5%); background-color: lighten(@palette1, 5%);
} }
} }
.cp-kanban-palette-color2 { .cp-kanban-palette-color2 {
background-color: @palette2; background-color: @palette2;
&.kanban-board { &.kanban-board-inner {
background-color: lighten(@palette2, 5%); background-color: lighten(@palette2, 5%);
} }
} }
.cp-kanban-palette-color3 { .cp-kanban-palette-color3 {
background-color: @palette3; background-color: @palette3;
&.kanban-board { &.kanban-board-inner {
background-color: lighten(@palette3, 10%); background-color: lighten(@palette3, 10%);
} }
} }
.cp-kanban-palette-color4 { .cp-kanban-palette-color4 {
background-color: @palette4; background-color: @palette4;
&.kanban-board { &.kanban-board-inner {
background-color: lighten(@palette4, 10%); background-color: lighten(@palette4, 10%);
} }
} }
.cp-kanban-palette-color5 { .cp-kanban-palette-color5 {
background-color: @palette5; background-color: @palette5;
&.kanban-board { &.kanban-board-inner {
background-color: lighten(@palette5, 10%); background-color: lighten(@palette5, 10%);
} }
} }
.cp-kanban-palette-color6 { .cp-kanban-palette-color6 {
background-color: @palette6; background-color: @palette6;
&.kanban-board { &.kanban-board-inner {
background-color: lighten(@palette6, 5%); background-color: lighten(@palette6, 5%);
} }
} }
.cp-kanban-palette-color7 { .cp-kanban-palette-color7 {
background-color: @palette7; background-color: @palette7;
&.kanban-board { &.kanban-board-inner {
background-color: lighten(@palette7, 5%); background-color: lighten(@palette7, 5%);
} }
} }
.cp-kanban-palette-color8 { .cp-kanban-palette-color8 {
background-color: @palette8; background-color: @palette8;
&.kanban-board { &.kanban-board-inner {
background-color: lighten(@palette8, 5%); background-color: lighten(@palette8, 5%);
} }
} }

@ -407,6 +407,8 @@
var boardNode = document.createElement('div'); var boardNode = document.createElement('div');
boardNode.dataset.id = board.id; boardNode.dataset.id = board.id;
boardNode.classList.add('kanban-board'); boardNode.classList.add('kanban-board');
var boardNodeInner = document.createElement('div');
boardNodeInner.classList.add('kanban-board-inner');
//set style //set style
if (self.options.responsivePercentage) { if (self.options.responsivePercentage) {
boardNode.style.width = boardWidth + '%'; boardNode.style.width = boardWidth + '%';
@ -430,7 +432,7 @@
if (/color/.test(board.color)) { if (/color/.test(board.color)) {
// Palette color // Palette color
headerBoard.classList.add('cp-kanban-palette-'+board.color); headerBoard.classList.add('cp-kanban-palette-'+board.color);
boardNode.classList.add('cp-kanban-palette-'+board.color); boardNodeInner.classList.add('cp-kanban-palette-'+board.color);
} else if (!/^[0-9a-f]{6}$/.test(board.color)) { } else if (!/^[0-9a-f]{6}$/.test(board.color)) {
// "string" color (red, blue, etc.) // "string" color (red, blue, etc.)
headerBoard.classList.add("kanban-header-" + board.color); headerBoard.classList.add("kanban-header-" + board.color);
@ -472,9 +474,10 @@
__onAddItemClickHandler(addBoardItem); __onAddItemClickHandler(addBoardItem);
//board assembly //board assembly
boardNode.appendChild(headerBoard); boardNode.appendChild(boardNodeInner);
boardNode.appendChild(contentBoard); boardNodeInner.appendChild(headerBoard);
boardNode.appendChild(footerBoard); boardNodeInner.appendChild(contentBoard);
boardNodeInner.appendChild(footerBoard);
return boardNode; return boardNode;
}; };

Loading…
Cancel
Save