KAOS/code/web/static/style.css
djuka aabdfa9e50 T10: Drag & Drop — premesti task prevlačenjem
- Sortable.js na Kanban board sa drag & drop
- Server-side validacija: allowedMoves mapa, isMoveAllowed()
- Zabranjeni potezi vraćaju 403 (ready→active, active→review)
- Toast notifikacije (zeleni uspeh, crveni greška)
- Ghost/chosen/drag CSS animacije
- Board auto-refresh posle svakog poteza
- 7 novih testova, 90 ukupno — svi prolaze
- T09 premešten u done/

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 12:18:50 +00:00

242 lines
4.2 KiB
CSS

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
background: #1a1a2e;
color: #eee;
}
.header {
padding: 16px 24px;
background: #16213e;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 2px solid #0f3460;
}
.header h1 { font-size: 1.4em; }
.header .version { color: #888; font-size: 0.9em; }
.board {
display: grid;
grid-template-columns: repeat(5, 1fr);
gap: 8px;
padding: 16px;
min-height: calc(100vh - 60px);
}
.column {
background: #16213e;
border-radius: 8px;
padding: 12px;
min-height: 200px;
}
.column-header {
font-weight: bold;
padding: 8px;
margin-bottom: 8px;
border-bottom: 2px solid #0f3460;
display: flex;
justify-content: space-between;
}
.column-count {
background: #0f3460;
border-radius: 12px;
padding: 2px 8px;
font-size: 0.85em;
}
.task-card {
background: #1a1a2e;
border: 1px solid #333;
border-radius: 6px;
padding: 10px;
margin-bottom: 8px;
cursor: pointer;
transition: border-color 0.2s, transform 0.1s;
}
.task-card:hover {
border-color: #e94560;
transform: translateY(-1px);
}
.task-id {
font-weight: bold;
color: #e94560;
}
.task-title {
margin-top: 4px;
font-size: 0.9em;
}
.task-meta {
margin-top: 6px;
font-size: 0.75em;
color: #888;
}
.task-deps {
font-size: 0.75em;
color: #666;
margin-top: 4px;
}
/* Task detail panel */
#task-detail {
position: fixed;
top: 0;
right: -420px;
width: 420px;
height: 100vh;
background: #16213e;
border-left: 2px solid #0f3460;
padding: 20px;
overflow-y: auto;
z-index: 10;
transition: right 0.3s ease;
}
#task-detail.active {
right: 0;
}
.detail-close {
cursor: pointer;
float: right;
font-size: 1.2em;
color: #888;
padding: 4px 8px;
}
.detail-close:hover { color: #e94560; }
.detail-meta { margin-top: 12px; font-size: 0.9em; color: #aaa; }
.detail-meta p { margin-bottom: 4px; }
.detail-actions {
margin-top: 16px;
display: flex;
gap: 8px;
flex-wrap: wrap;
}
.btn {
display: inline-block;
padding: 8px 16px;
border-radius: 6px;
border: 1px solid #333;
background: #1a1a2e;
color: #eee;
cursor: pointer;
font-size: 0.85em;
text-decoration: none;
transition: background 0.2s;
}
.btn:hover { background: #0f3460; }
.btn-move { border-color: #e94560; }
.btn-success { border-color: #4ecca3; color: #4ecca3; }
.btn-success:hover { background: #4ecca3; color: #1a1a2e; }
.detail-content {
white-space: pre-wrap;
font-family: "JetBrains Mono", "Fira Code", monospace;
font-size: 0.8em;
margin-top: 16px;
line-height: 1.6;
padding: 12px;
background: #111;
border-radius: 6px;
max-height: 60vh;
overflow-y: auto;
}
/* Sortable column-tasks container */
.column-tasks {
min-height: 50px;
}
/* Drag & Drop styles */
.task-ghost {
opacity: 0.4;
border: 2px dashed #e94560;
background: #0f3460;
}
.task-chosen {
box-shadow: 0 4px 16px rgba(233, 69, 96, 0.3);
}
.task-drag {
opacity: 0.9;
transform: rotate(2deg);
}
/* Drop zone highlight */
.column-tasks.sortable-drag-over {
background: rgba(15, 52, 96, 0.3);
border-radius: 6px;
}
/* Flash animations */
@keyframes flash-success {
0% { background: #4ecca3; }
100% { background: #1a1a2e; }
}
@keyframes flash-error {
0% { background: #e94560; }
100% { background: #1a1a2e; }
}
.flash-success { animation: flash-success 0.5s ease; }
.flash-error { animation: flash-error 0.5s ease; }
/* Toast notifications */
.toast {
position: fixed;
bottom: 20px;
left: 50%;
transform: translateX(-50%) translateY(100px);
padding: 12px 24px;
border-radius: 8px;
font-size: 0.9em;
z-index: 100;
transition: transform 0.3s ease;
pointer-events: none;
}
.toast-show {
transform: translateX(-50%) translateY(0);
}
.toast-success {
background: #4ecca3;
color: #1a1a2e;
}
.toast-error {
background: #e94560;
color: #fff;
}
/* Responsive */
@media (max-width: 1100px) {
.board { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
.board { grid-template-columns: repeat(2, 1fr); }
#task-detail { width: 100%; right: -100%; }
}
@media (max-width: 500px) {
.board { grid-template-columns: 1fr; }
}