iz
Clone
https://git.tahinli.com/Tahinli/iz.git
0 watching0 forksRustAGPL-3.0567.3 KiB3950aceTahinli27 days ago34 commits
| 1 | //! The board page: the filter bar, the columns with their cards, the card chips and avatars, the |
| 2 | //! new-task form and the toast of a refused drag. Chip colours come from a fixed palette of eight |
| 3 | //! tones; no user-written CSS reaches the page. |
| 4 | |
| 5 | // --- Palette of project tones (fixed, eight entries) ------------------------------------------- |
| 6 | |
| 7 | @mixin tone($n, $bg, $fg) { |
| 8 | .tone-#{$n} { |
| 9 | background: $bg; |
| 10 | color: $fg; |
| 11 | } |
| 12 | } |
| 13 | |
| 14 | @include tone(0, #e6ebff, #2a43a8); |
| 15 | @include tone(1, #e4f4ea, #1e6b35); |
| 16 | @include tone(2, #fff4d6, #7a4f00); |
| 17 | @include tone(3, #fdecea, #9b2219); |
| 18 | @include tone(4, #efe6ff, #5a2a9e); |
| 19 | @include tone(5, #e0f3f5, #1c6470); |
| 20 | @include tone(6, #fbe9f3, #8c2a64); |
| 21 | @include tone(7, #eeeeea, #3e4250); |
| 22 | |
| 23 | @media (prefers-color-scheme: dark) { |
| 24 | :root:not([data-theme="light"]) { |
| 25 | .tone-0 { background: #1f2a4f; color: #c2d0ff; } |
| 26 | .tone-1 { background: #173424; color: #9fe0b4; } |
| 27 | .tone-2 { background: #3a2e10; color: #f2c265; } |
| 28 | .tone-3 { background: #3a1d1b; color: #ffb4ac; } |
| 29 | .tone-4 { background: #2e2245; color: #d7c2ff; } |
| 30 | .tone-5 { background: #15313a; color: #9fdbe6; } |
| 31 | .tone-6 { background: #3a1d2c; color: #f3b3d3; } |
| 32 | .tone-7 { background: #2a2d35; color: #d0d4dd; } |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | :root[data-theme="dark"] { |
| 37 | .tone-0 { background: #1f2a4f; color: #c2d0ff; } |
| 38 | .tone-1 { background: #173424; color: #9fe0b4; } |
| 39 | .tone-2 { background: #3a2e10; color: #f2c265; } |
| 40 | .tone-3 { background: #3a1d1b; color: #ffb4ac; } |
| 41 | .tone-4 { background: #2e2245; color: #d7c2ff; } |
| 42 | .tone-5 { background: #15313a; color: #9fdbe6; } |
| 43 | .tone-6 { background: #3a1d2c; color: #f3b3d3; } |
| 44 | .tone-7 { background: #2a2d35; color: #d0d4dd; } |
| 45 | } |
| 46 | |
| 47 | // --- Page ------------------------------------------------------------------------------------- |
| 48 | |
| 49 | .board { |
| 50 | display: grid; |
| 51 | gap: var(--space-4); |
| 52 | width: 100%; |
| 53 | padding: var(--space-4) var(--space-4) var(--space-8); |
| 54 | } |
| 55 | |
| 56 | .board-toolbar { |
| 57 | display: flex; |
| 58 | flex-wrap: wrap; |
| 59 | align-items: flex-end; |
| 60 | justify-content: space-between; |
| 61 | gap: var(--space-3); |
| 62 | } |
| 63 | |
| 64 | .board-summary { |
| 65 | display: flex; |
| 66 | flex-wrap: wrap; |
| 67 | align-items: center; |
| 68 | gap: var(--space-2); |
| 69 | } |
| 70 | |
| 71 | .filters { |
| 72 | display: flex; |
| 73 | flex-wrap: wrap; |
| 74 | align-items: flex-end; |
| 75 | gap: var(--space-3); |
| 76 | } |
| 77 | |
| 78 | .filters .field { |
| 79 | min-width: 9rem; |
| 80 | } |
| 81 | |
| 82 | .filters .field-search { |
| 83 | min-width: 14rem; |
| 84 | } |
| 85 | |
| 86 | .filters .field label, |
| 87 | .new-task label { |
| 88 | margin-bottom: 0; |
| 89 | } |
| 90 | |
| 91 | .filters-actions { |
| 92 | display: flex; |
| 93 | align-items: center; |
| 94 | gap: var(--space-2); |
| 95 | } |
| 96 | |
| 97 | // --- Columns and cards ------------------------------------------------------------------------ |
| 98 | |
| 99 | .columns { |
| 100 | display: grid; |
| 101 | grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); |
| 102 | gap: var(--space-4); |
| 103 | align-items: start; |
| 104 | } |
| 105 | |
| 106 | .board-column { |
| 107 | display: grid; |
| 108 | gap: var(--space-2); |
| 109 | padding: var(--space-3); |
| 110 | min-height: 8rem; |
| 111 | background: var(--surface-2); |
| 112 | border: 1px solid var(--border); |
| 113 | border-radius: var(--radius); |
| 114 | } |
| 115 | |
| 116 | .board-column-head { |
| 117 | display: flex; |
| 118 | align-items: center; |
| 119 | justify-content: space-between; |
| 120 | gap: var(--space-2); |
| 121 | padding: 0 var(--space-1); |
| 122 | font-weight: 650; |
| 123 | } |
| 124 | |
| 125 | .column-cards { |
| 126 | display: grid; |
| 127 | gap: var(--space-2); |
| 128 | margin: 0; |
| 129 | padding: 0; |
| 130 | list-style: none; |
| 131 | min-height: 3rem; |
| 132 | } |
| 133 | |
| 134 | .column-cards.is-target { |
| 135 | outline: 2px dashed var(--focus); |
| 136 | outline-offset: 2px; |
| 137 | border-radius: var(--radius-sm); |
| 138 | } |
| 139 | |
| 140 | .task-card { |
| 141 | display: grid; |
| 142 | gap: var(--space-2); |
| 143 | padding: var(--space-3); |
| 144 | background: var(--surface); |
| 145 | border: 1px solid var(--border); |
| 146 | border-radius: var(--radius-sm); |
| 147 | box-shadow: var(--shadow); |
| 148 | } |
| 149 | |
| 150 | .task-card[draggable="true"] { |
| 151 | cursor: grab; |
| 152 | } |
| 153 | |
| 154 | .task-card.is-dragging { |
| 155 | opacity: 0.5; |
| 156 | } |
| 157 | |
| 158 | .task-card.is-done { |
| 159 | opacity: 0.65; |
| 160 | } |
| 161 | |
| 162 | .task-key { |
| 163 | color: var(--muted); |
| 164 | font-family: var(--font-mono); |
| 165 | font-size: 0.8rem; |
| 166 | } |
| 167 | |
| 168 | .task-title { |
| 169 | margin: 0; |
| 170 | font-size: 1rem; |
| 171 | overflow-wrap: anywhere; |
| 172 | } |
| 173 | |
| 174 | .task-meta { |
| 175 | display: flex; |
| 176 | flex-wrap: wrap; |
| 177 | align-items: center; |
| 178 | gap: var(--space-1); |
| 179 | font-size: var(--text-sm); |
| 180 | color: var(--muted); |
| 181 | } |
| 182 | |
| 183 | .task-actions { |
| 184 | display: flex; |
| 185 | flex-wrap: wrap; |
| 186 | align-items: flex-end; |
| 187 | gap: var(--space-2); |
| 188 | padding-top: var(--space-2); |
| 189 | border-top: 1px solid var(--border); |
| 190 | } |
| 191 | |
| 192 | .task-actions .field { |
| 193 | flex: 1 1 8rem; |
| 194 | } |
| 195 | |
| 196 | .task-actions .field label { |
| 197 | font-size: 0.8rem; |
| 198 | } |
| 199 | |
| 200 | .task-actions .button { |
| 201 | min-height: 2.25rem; |
| 202 | } |
| 203 | |
| 204 | // --- Chips and avatars ------------------------------------------------------------------------ |
| 205 | |
| 206 | .chip { |
| 207 | display: inline-block; |
| 208 | padding: 0.1rem var(--space-2); |
| 209 | border-radius: 999px; |
| 210 | background: var(--surface-2); |
| 211 | color: var(--muted); |
| 212 | font-size: 0.78rem; |
| 213 | font-weight: 600; |
| 214 | white-space: nowrap; |
| 215 | } |
| 216 | |
| 217 | .chip.overdue { |
| 218 | background: var(--danger-soft); |
| 219 | color: var(--danger); |
| 220 | } |
| 221 | |
| 222 | .chip.blocked { |
| 223 | background: var(--warn-soft); |
| 224 | color: var(--warn); |
| 225 | } |
| 226 | |
| 227 | .avatars { |
| 228 | display: flex; |
| 229 | margin: 0; |
| 230 | padding: 0; |
| 231 | list-style: none; |
| 232 | } |
| 233 | |
| 234 | .avatars li + li { |
| 235 | margin-left: -0.4rem; |
| 236 | } |
| 237 | |
| 238 | .avatar { |
| 239 | display: block; |
| 240 | width: 1.6rem; |
| 241 | height: 1.6rem; |
| 242 | border-radius: 50%; |
| 243 | border: 2px solid var(--surface); |
| 244 | background: var(--surface-2); |
| 245 | object-fit: cover; |
| 246 | font-size: 0.7rem; |
| 247 | } |
| 248 | |
| 249 | // --- New task, notices, toast ----------------------------------------------------------------- |
| 250 | |
| 251 | .new-task { |
| 252 | display: grid; |
| 253 | gap: var(--space-3); |
| 254 | } |
| 255 | |
| 256 | .new-task-grid { |
| 257 | display: grid; |
| 258 | grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); |
| 259 | gap: var(--space-3); |
| 260 | } |
| 261 | |
| 262 | .new-task-grid .field-wide { |
| 263 | grid-column: 1 / -1; |
| 264 | } |
| 265 | |
| 266 | .new-task-actions { |
| 267 | display: flex; |
| 268 | align-items: center; |
| 269 | gap: var(--space-3); |
| 270 | } |
| 271 | |
| 272 | .toast { |
| 273 | position: fixed; |
| 274 | left: 50%; |
| 275 | bottom: var(--space-6); |
| 276 | transform: translateX(-50%); |
| 277 | max-width: min(90vw, 32rem); |
| 278 | padding: var(--space-3) var(--space-4); |
| 279 | background: var(--danger-soft); |
| 280 | color: var(--danger); |
| 281 | border: 1px solid var(--danger); |
| 282 | border-radius: var(--radius-sm); |
| 283 | box-shadow: var(--shadow-lift); |
| 284 | z-index: 10; |
| 285 | } |
| 286 | |
| 287 | @media (max-width: 720px) { |
| 288 | .board { |
| 289 | padding: var(--space-2) var(--space-2) var(--space-6); |
| 290 | } |
| 291 | |
| 292 | .columns { |
| 293 | grid-template-columns: 1fr; |
| 294 | } |
| 295 | } |