|
1 | 1 | .calendar-view { |
2 | | - --fc-event-border-color: var(--calendar-coll-event-text-color, var(--main-text-color)); |
3 | | - --fc-event-bg-color: var(--calendar-coll-event-background-color, var(--accented-background-color)); |
4 | | - --fc-event-text-color: var(--calendar-coll-event-text-color, var(--main-text-color)); |
5 | | - --fc-event-selected-overlay-color: transparent; |
6 | | - --fc-today-bg-color: var(--calendar-coll-today-background-color, var(--more-accented-background-color)); |
7 | | - |
8 | 2 | overflow: hidden; |
9 | 3 | position: relative; |
10 | 4 | outline: 0; |
|
13 | 7 | padding: 0; |
14 | 8 | display: flex; |
15 | 9 | flex-direction: column; |
16 | | - padding-bottom: 16px; |
17 | 10 | box-sizing: border-box; |
18 | 11 |
|
19 | 12 | @media (max-width: 991px) { |
|
26 | 19 | } |
27 | 20 | } |
28 | 21 |
|
29 | | -.calendar-view a, |
30 | | -:root .calendar-view a.fc-daygrid-event:hover { |
31 | | - color: var(--fc-event-text-color); |
32 | | -} |
33 | | - |
34 | 22 | .search-result-widget-content .calendar-view { |
35 | 23 | position: absolute; |
36 | 24 | top: 0; |
|
41 | 29 |
|
42 | 30 | .calendar-container { |
43 | 31 | height: 100%; |
44 | | - --fc-page-bg-color: var(--main-background-color); |
45 | | - --fc-border-color: var(--main-border-color); |
46 | | - --fc-neutral-bg-color: var(--launcher-pane-background-color); |
47 | | - --fc-list-event-hover-bg-color: var(--left-pane-item-hover-background); |
48 | | - padding: 0 var(--content-margin-inline); |
49 | 32 | } |
50 | 33 |
|
51 | | -.calendar-container .fc-list-sticky .fc-list-day > * { |
52 | | - z-index: 50; |
53 | | -} |
54 | | - |
55 | | -.calendar-container .fc-button { |
56 | | - padding: 0.2em 0.5em; |
| 34 | +/* Stacked beneath the title, the chip's own container being a column wherever these are shown at |
| 35 | + all (see hasRoomForAttributes). Kept narrow so the overflow below has something to bite on. */ |
| 36 | +.calendar-view .calendar-event-attributes { |
| 37 | + min-width: 0; |
57 | 38 | } |
58 | 39 |
|
59 | 40 | .calendar-container .promoted-attribute { |
|
94 | 75 |
|
95 | 76 | /* #region Events */ |
96 | 77 |
|
97 | | -/* |
98 | | - * week, month, year views |
99 | | - */ |
100 | | - |
101 | | -.calendar-container a.fc-event { |
| 78 | +.calendar-view .calendar-event:hover { |
102 | 79 | text-decoration: none; |
103 | 80 | } |
104 | 81 |
|
105 | | -.calendar-container a.fc-event.archived { |
106 | | - opacity: .65; |
107 | | -} |
108 | | - |
109 | | -.calendar-container a.fc-event.archived::after { |
110 | | - content: ""; |
111 | | - position: absolute; |
112 | | - top: 0; |
113 | | - left: 0; |
114 | | - right: 0; |
115 | | - bottom: 0; |
116 | | - z-index: -1; |
117 | | - |
118 | | - --c1: transparent; |
119 | | - --c2: var(--callendar-coll-event-archived-sripe-color, #00000013); |
120 | | - |
121 | | - background: repeating-linear-gradient(45deg, var(--c1), var(--c1) 8px, |
122 | | - var(--c2) 8px, var(--c2) 16px); |
123 | | -} |
124 | | - |
125 | | -.calendar-view a.fc-timegrid-event, |
126 | | -.calendar-view a.fc-daygrid-event, |
127 | | -.calendar-view .fc-daygrid-dot-event .fc-event-title { |
128 | | - font-weight: 500; |
129 | | -} |
130 | | - |
131 | | -.calendar-view a.fc-timegrid-event, |
132 | | -.calendar-view a.fc-daygrid-event { |
133 | | - --border-color: transparent; |
134 | | - |
135 | | - border: 2px solid; |
136 | | - border-left-width: 4px; |
137 | | - border-color: var(--border-color) var(--border-color) var(--border-color) |
138 | | - var(--fc-event-text-color) !important; |
139 | | - background: var(--fc-event-bg-color) !important; |
| 82 | +/* |
| 83 | + * Forma draws a chip out of a single accent colour: a solid bar down its leading edge, and a 30% |
| 84 | + * tint of that same colour for the body. Trilium's chip is a pair rather than a derivation — a |
| 85 | + * black bar over a flat #eaeaea body — so the two are split. The accent is handed to the bar |
| 86 | + * through the palette's --fc-forma-event, and the body is stated here, on a class eventClass puts |
| 87 | + * on every chip. |
| 88 | + */ |
| 89 | +.calendar-view .calendar-event { |
| 90 | + background: var(--calendar-coll-event-background-color, var(--accented-background-color)); |
140 | 91 |
|
141 | | - padding-left: 8px; |
| 92 | + /* Said outright, and so beyond the reach of the app-wide a:hover, the chip being an anchor. */ |
| 93 | + color: var(--calendar-coll-event-text-color, var(--main-text-color)); |
142 | 94 | } |
143 | 95 |
|
144 | | -.calendar-view .fc-timegrid-event.with-hue, |
145 | | -.calendar-view .fc-daygrid-event.with-hue { |
146 | | - --fc-event-text-color: var(--custom-color); |
147 | | - |
148 | | - --fc-event-bg-color: hsl(var(--custom-color-hue), |
| 96 | +/* |
| 97 | + * A note carrying a colour of its own says both: the bar takes the colour, the body a pale wash of |
| 98 | + * the same hue. Said as border-color rather than through --fc-event-color, which FullCalendar |
| 99 | + * writes inline on the chip and a stylesheet therefore cannot reach. |
| 100 | + */ |
| 101 | +.calendar-view .calendar-event.with-hue { |
| 102 | + border-color: var(--custom-color); |
| 103 | + color: var(--custom-color); |
| 104 | + background: hsl(var(--custom-color-hue), |
149 | 105 | var(--calendar-coll-event-background-saturation, 80%), |
150 | | - var(--calendar-coll-event-background-lightness, 95%)) !important; |
151 | | -} |
152 | | - |
153 | | -.calendar-view a.fc-timegrid-event:focus-visible, |
154 | | -.calendar-view a.fc-daygrid-event:focus-visible { |
155 | | - outline: none; |
| 106 | + var(--calendar-coll-event-background-lightness, 95%)); |
156 | 107 | } |
157 | 108 |
|
158 | | -.calendar-view a.fc-timegrid-event.fc-event-selected, |
159 | | -.calendar-view a.fc-timegrid-event.fc-event:focus, |
160 | | -.calendar-view a.fc-daygrid-event.fc-event-selected, |
161 | | -.calendar-view a.fc-daygrid-event.fc-event:focus { |
162 | | - --border-color: var(--custom-color, var(--input-focus-outline-color)); |
| 109 | +/* Flat body and all, a chip still has to answer the pointer; Forma's own hover tint is what the |
| 110 | + rule above overrides. */ |
| 111 | +.calendar-view .calendar-event:hover { |
| 112 | + filter: var(--calendar-coll-event-hover-filter, none); |
163 | 113 | } |
164 | 114 |
|
165 | | -/* The event the popover stands for, marked the way a focused event is. */ |
166 | | -.calendar-view a.fc-timegrid-event.calendar-event-selected, |
167 | | -.calendar-view a.fc-daygrid-event.calendar-event-selected { |
168 | | - --border-color: var(--custom-color, var(--input-focus-outline-color)); |
| 115 | +/* The shading a dragged range stands in, named by us rather than left to the theme's hashed class |
| 116 | + so the ghost can anchor to it; the colour is still Forma's, off the palette. */ |
| 117 | +.calendar-view .calendar-highlight { |
| 118 | + background-color: var(--fc-forma-highlight); |
169 | 119 | } |
170 | 120 |
|
171 | | -.calendar-view a.fc-timegrid-event:hover, |
172 | | -.calendar-view a.fc-daygrid-event:hover { |
173 | | - filter: var(--calendar-coll-event-hover-filter, none); |
174 | | - border-color: var(--fc-event-text-color); |
175 | | - text-decoration: none; |
176 | | - color: currentColor; |
177 | | - opacity: 1; |
| 121 | +/* The note's icon, leading its title on the chip (see eventContent). */ |
| 122 | +.calendar-view .calendar-event-icon { |
| 123 | + margin-inline-end: .25em; |
178 | 124 | } |
179 | 125 |
|
180 | | -.calendar-view .fc-daygrid-event-dot { |
181 | | - display: none; |
| 126 | +/* An archived note is faded and hatched, the stripes drawn behind its content. */ |
| 127 | +.calendar-view .calendar-event.archived { |
| 128 | + opacity: .65; |
182 | 129 | } |
183 | 130 |
|
| 131 | +.calendar-view .calendar-event.archived::after { |
| 132 | + content: ""; |
| 133 | + position: absolute; |
| 134 | + top: 0; |
| 135 | + inset-inline-start: 0; |
| 136 | + inset-inline-end: 0; |
| 137 | + bottom: 0; |
| 138 | + z-index: -1; |
184 | 139 |
|
185 | | -.calendar-view .fc-event-time { |
186 | | - opacity: .75; |
187 | | -} |
188 | | - |
189 | | -/* |
190 | | - * List view |
191 | | - */ |
| 140 | + --c1: transparent; |
| 141 | + --c2: var(--callendar-coll-event-archived-sripe-color, #00000013); |
192 | 142 |
|
193 | | -.fc-list-table tr.fc-event.archived { |
194 | | - opacity: .5; |
| 143 | + background: repeating-linear-gradient(45deg, var(--c1), var(--c1) 8px, |
| 144 | + var(--c2) 8px, var(--c2) 16px); |
195 | 145 | } |
196 | 146 |
|
197 | | -.fc-list-table .fc-list-event-dot { |
198 | | - /* Apply note colors to the list item dots */ |
199 | | - --fc-event-border-color: var(--custom-color); |
| 147 | +/* The event the popover stands for, marked the way a focused event is. An outline rather than a |
| 148 | + border, the chip's only border being the bar down its leading edge. */ |
| 149 | +.calendar-view .calendar-event-selected { |
| 150 | + outline: 2px solid var(--custom-color, var(--input-focus-outline-color)); |
| 151 | + outline-offset: -2px; |
200 | 152 | } |
201 | 153 |
|
202 | 154 | /* #endregion */ |
0 commit comments