-
-
Notifications
You must be signed in to change notification settings - Fork 355
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
214 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
projects/ledge-render/src/lib/components/ledge-kanban/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
based on: https://github.com/Devstackr/kanban-angular-layout |
31 changes: 30 additions & 1 deletion
31
projects/ledge-render/src/lib/components/ledge-kanban/ledge-kanban.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,30 @@ | ||
<p>ledge-kanban works!</p> | ||
<div class="board"> | ||
|
||
<div class="board-bar"> | ||
<p class="board-name">{{ board.name }}</p> | ||
</div> | ||
|
||
<div class="board-wrapper"> | ||
|
||
<div class="board-columns" cdkDropListGroup> | ||
<div class="board-column" *ngFor="let column of board.columns"> | ||
|
||
<div class="column-title"> | ||
{{ column.name }} | ||
</div> | ||
|
||
<div class="tasks-container" | ||
cdkDropList | ||
[cdkDropListData]="column.tasks" | ||
(cdkDropListDropped)="drop($event)"> | ||
<div class="task" *ngFor="let item of column.tasks" cdkDrag> | ||
{{ item }} | ||
</div> | ||
</div> | ||
</div> | ||
|
||
</div> | ||
|
||
</div> | ||
|
||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
.root { | ||
display: flex; | ||
flex-direction: column; | ||
height: 100%; | ||
} | ||
|
||
.app-name { | ||
font-size: 28px; | ||
font-family: 'Lato', sans-serif; | ||
font-weight: bold; | ||
} | ||
|
||
.has-gradient-text { | ||
background: -webkit-linear-gradient(#13f7f4, #2af598); | ||
-webkit-background-clip: text; | ||
-webkit-text-fill-color: transparent; | ||
} | ||
|
||
|
||
.board { | ||
display: flex; | ||
flex-direction: column; | ||
flex-grow: 1; | ||
|
||
// Override Automatic Minimum Size | ||
// https://stackoverflow.com/questions/36247140/why-dont-flex-items-shrink-past-content-size | ||
min-width: 0; | ||
min-height: 0; | ||
|
||
.board-bar { | ||
background: rgba(gray, 0.5); | ||
padding: 8px 15px; | ||
|
||
.board-name { | ||
font-size: 20px; | ||
font-weight: bold; | ||
color: white; | ||
} | ||
} | ||
|
||
.board-wrapper { | ||
display: flex; | ||
flex-grow: 1; | ||
overflow-x: auto; | ||
|
||
.board-columns { | ||
display: flex; | ||
flex-grow: 1; | ||
|
||
.board-column { | ||
display: flex; | ||
flex-direction: column; | ||
flex-grow: 1; | ||
flex-basis: 0; // to force the columns to all be the same size, regardless of content | ||
|
||
min-width: 300px; | ||
margin: 50px; | ||
padding: 25px; | ||
|
||
border-radius: 4px; | ||
|
||
background: rgba(white, 0.5); | ||
|
||
&:not(:first-child) { | ||
margin-left: 0; | ||
} | ||
|
||
.column-title { | ||
font-size: 20px; | ||
font-weight: 800; | ||
font-family: 'Lato', sans-serif; | ||
text-transform: uppercase; | ||
margin-bottom: 20px; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
|
||
.tasks-container { | ||
flex-grow: 1; | ||
overflow-y: auto; | ||
} | ||
|
||
.task { | ||
display: flex; | ||
padding: 15px 12px; | ||
background: white; | ||
border-bottom: solid 1px #ddd; | ||
border-radius: 4px; | ||
|
||
margin-bottom: 15px; | ||
|
||
box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.05), | ||
0 3px 14px 2px rgba(0, 0, 0, 0.05); | ||
} | ||
|
||
.cdk-drag-preview { | ||
box-sizing: border-box; | ||
border-radius: 4px; | ||
box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2), | ||
0 8px 10px 1px rgba(0, 0, 0, 0.14), | ||
0 3px 14px 2px rgba(0, 0, 0, 0.12); | ||
} | ||
|
||
.cdk-drag-placeholder { | ||
opacity: 0; | ||
} | ||
|
||
.cdk-drag-animating { | ||
transition: transform 250ms cubic-bezier(0, 0, 0.2, 1); | ||
} | ||
|
||
.tasks-container.cdk-drop-list-dragging .task:not(.cdk-drag-placeholder) { | ||
transition: transform 250ms cubic-bezier(0, 0, 0.2, 1); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
projects/ledge-render/src/lib/components/ledge-kanban/model/board.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { Column } from './column'; | ||
|
||
export class Board { | ||
constructor(public name: string, public columns: Column[]) {} | ||
} |
3 changes: 3 additions & 0 deletions
3
projects/ledge-render/src/lib/components/ledge-kanban/model/column.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export class Column { | ||
constructor(public name: string, public tasks: string[]) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters