mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 09:59:47 -05:00
Calendar Mode shows each card on the day it is due - the date only, no time - with its labels in their colours and its whole title over as many lines as it needs, and the cards of a day in the board's own order: by their list's place, then their place in the list. A month or a week, starting on the user's first day of the week, with Today, Previous and Next; the board Filter applies, as on Calendar, and a card opens beside the calendar. The grid and the day's order are models/lib/calendarMode.js. A board that saved its Board View order before this view existed still has the default order, with Calendar Mode in its place and the menu's separators: a saved order that lacks only views added later (VIEWS_ADDED_LATER) is the default order of its time. Any other saved order is the user's own, and the new view goes at its end, as before. Tests: tests/calendarMode.test.cjs (the month and week grid, the first day of the week, the day's order, cards without a due date, the wiring), tests/boardViewSettings.test.cjs (an order saved before Calendar Mode, and a custom one), tests/boardViewMenu.test.cjs and tests/playwright/specs/calendar-mode.e2e.js (the menu entry below Calendar, labels and order on today's cell, Week, opening a card). Thanks to tripledee and xet7 ! Fixes #3194.
89 lines
1.7 KiB
CSS
89 lines
1.7 KiB
CSS
/* #3194: Calendar Mode - Trello's calendar. */
|
|
.calendar-mode-view {
|
|
padding: 8px 12px;
|
|
overflow: auto;
|
|
}
|
|
.calendar-mode-toolbar {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 8px;
|
|
margin-bottom: 8px;
|
|
}
|
|
.calendar-mode-title {
|
|
margin: 0;
|
|
font-size: 1.3em;
|
|
}
|
|
.calendar-mode-buttons {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 4px;
|
|
}
|
|
.calendar-mode-buttons button.is-active {
|
|
font-weight: bold;
|
|
box-shadow: inset 0 -2px 0 currentColor;
|
|
}
|
|
.calendar-mode-weekdays,
|
|
.calendar-mode-week {
|
|
display: grid;
|
|
grid-template-columns: repeat(7, minmax(0, 1fr));
|
|
}
|
|
.calendar-mode-weekday {
|
|
padding: 4px;
|
|
font-weight: bold;
|
|
text-align: center;
|
|
}
|
|
.calendar-mode-day {
|
|
min-height: 110px;
|
|
padding: 4px;
|
|
border: 1px solid rgba(0, 0, 0, 0.12);
|
|
background: rgba(255, 255, 255, 0.6);
|
|
min-width: 0;
|
|
}
|
|
.calendar-mode-day.is-outside {
|
|
opacity: 0.55;
|
|
}
|
|
.calendar-mode-day.is-today .calendar-mode-day-number {
|
|
font-weight: bold;
|
|
text-decoration: underline;
|
|
}
|
|
.calendar-mode-day-number {
|
|
font-size: 0.85em;
|
|
margin-bottom: 4px;
|
|
}
|
|
.calendar-mode-card {
|
|
display: block;
|
|
margin-bottom: 4px;
|
|
padding: 4px 6px;
|
|
border-radius: 4px;
|
|
background: #fff;
|
|
color: inherit;
|
|
text-decoration: none;
|
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
|
|
}
|
|
.calendar-mode-card-labels {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 2px;
|
|
margin-bottom: 2px;
|
|
}
|
|
.calendar-mode-card-labels .card-label {
|
|
font-size: 0.75em;
|
|
padding: 0 4px;
|
|
border-radius: 3px;
|
|
max-width: 100%;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
.calendar-mode-card-title {
|
|
white-space: normal;
|
|
overflow-wrap: anywhere;
|
|
}
|
|
@media screen and (max-width: 800px) {
|
|
.calendar-mode-day {
|
|
min-height: 70px;
|
|
}
|
|
}
|