Browse Source

Calendar item styles for public or private

merge-requests/21/head
Bob Mottram 2 months ago
parent
commit
71dff77f20
2 changed files with 20 additions and 5 deletions
  1. 8
    0
      epicyon-calendar.css
  2. 12
    5
      webapp_calendar.py

+ 8
- 0
epicyon-calendar.css View File

@@ -138,6 +138,14 @@ a:focus {
138 138
     font-size: 30px;
139 139
 }
140 140
 
141
+.calItem {
142
+    background-color: var(--event-background-private);
143
+}
144
+
145
+.calItemPublic {
146
+    background-color: var(--event-background);
147
+}
148
+
141 149
 .calendar__day__event {
142 150
     color: var(--event-color);
143 151
     background-color: var(--event-background-private);

+ 12
- 5
webapp_calendar.py View File

@@ -193,34 +193,41 @@ def _htmlCalendarDay(personCache: {}, cssCache: {}, translate: {},
193 193
                     'icons/delete.png" /></a></td>\n'
194 194
 
195 195
             eventClass = 'calendar__day__event'
196
+            calItemClass = 'calItem'
196 197
             if eventIsPublic:
197 198
                 eventClass = 'calendar__day__event__public'
199
+                calItemClass = 'calItemPublic'
198 200
             if eventTime and eventDescription and eventPlace:
199 201
                 calendarStr += \
200
-                    '<tr><td class="calendar__day__time"><b>' + eventTime + \
202
+                    '<tr class="' + calItemClass + '">' + \
203
+                    '<td class="calendar__day__time"><b>' + eventTime + \
201 204
                     '</b></td><td class="' + eventClass + '">' + \
202 205
                     '<span class="place">' + \
203 206
                     eventPlace + '</span><br>' + eventDescription + \
204 207
                     '</td>' + deleteButtonStr + '</tr>\n'
205 208
             elif eventTime and eventDescription and not eventPlace:
206 209
                 calendarStr += \
207
-                    '<tr><td class="calendar__day__time"><b>' + eventTime + \
210
+                    '<tr class="' + calItemClass + '">' + \
211
+                    '<td class="calendar__day__time"><b>' + eventTime + \
208 212
                     '</b></td><td class="' + eventClass + '">' + \
209 213
                     eventDescription + '</td>' + deleteButtonStr + '</tr>\n'
210 214
             elif not eventTime and eventDescription and not eventPlace:
211 215
                 calendarStr += \
212
-                    '<tr><td class="calendar__day__time">' + \
216
+                    '<tr class="' + calItemClass + '">' + \
217
+                    '<td class="calendar__day__time">' + \
213 218
                     '</td><td class="' + eventClass + '">' + \
214 219
                     eventDescription + '</td>' + deleteButtonStr + '</tr>\n'
215 220
             elif not eventTime and eventDescription and eventPlace:
216 221
                 calendarStr += \
217
-                    '<tr><td class="calendar__day__time"></td>' + \
222
+                    '<tr class="' + calItemClass + '">' + \
223
+                    '<td class="calendar__day__time"></td>' + \
218 224
                     '<td class="' + eventClass + '"><span class="place">' + \
219 225
                     eventPlace + '</span><br>' + eventDescription + \
220 226
                     '</td>' + deleteButtonStr + '</tr>\n'
221 227
             elif eventTime and not eventDescription and eventPlace:
222 228
                 calendarStr += \
223
-                    '<tr><td class="calendar__day__time"><b>' + eventTime + \
229
+                    '<tr class="' + calItemClass + '">' + \
230
+                    '<td class="calendar__day__time"><b>' + eventTime + \
224 231
                     '</b></td><td class="' + eventClass + '">' + \
225 232
                     '<span class="place">' + \
226 233
                     eventPlace + '</span></td>' + \

Loading…
Cancel
Save