diff --git a/saturn/calendar/__init__.py b/saturn/calendar/__init__.py
index b6c8e70..4c7abcc 100644
--- a/saturn/calendar/__init__.py
+++ b/saturn/calendar/__init__.py
@@ -19,7 +19,7 @@ def get_events(davclient):
events = []
for cal in pri.calendars():
- events += [Event(event)
+ events += [Event(event, cal)
for event in cal.date_search(start=date.today())]
return sorted(events)
diff --git a/saturn/calendar/event.py b/saturn/calendar/event.py
index c022b2d..59df18a 100644
--- a/saturn/calendar/event.py
+++ b/saturn/calendar/event.py
@@ -2,12 +2,16 @@ import re
import datetime
import html
+import caldav.elements.ical
+
class Event:
def __init__(
self,
event,
+ calendar,
):
+ self._calendar = calendar
self._v = event.instance.vevent
@property
@@ -40,6 +44,16 @@ class Event:
return self._v.rrule.value
return None
+ @property
+ def calendar(self):
+ return self._calendar
+
+ @property
+ def color(self):
+ return self._calendar.get_properties(
+ [caldav.elements.ical.CalendarColor()]
+ )['{http://apple.com/ns/ical/}calendar-color']
+
def fdescription(self):
if self.description is None: return None
diff --git a/saturn/server/static/icons/remixicon.css b/saturn/server/static/icons/remixicon.css
index 5e8ae8f..26921d0 100644
--- a/saturn/server/static/icons/remixicon.css
+++ b/saturn/server/static/icons/remixicon.css
@@ -8,12 +8,12 @@
@font-face {
font-family: "remixicon";
- src: url('remixicon.eot?t=1643377622508'); /* IE9*/
- src: url('remixicon.eot?t=1643377622508#iefix') format('embedded-opentype'), /* IE6-IE8 */
- url("remixicon.woff2?t=1643377622508") format("woff2"),
- url("remixicon.woff?t=1643377622508") format("woff"),
- url('remixicon.ttf?t=1643377622508') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
- url('remixicon.svg?t=1643377622508#remixicon') format('svg'); /* iOS 4.1- */
+ src: url('remixicon.eot?t=1643444096731'); /* IE9*/
+ src: url('remixicon.eot?t=1643444096731#iefix') format('embedded-opentype'), /* IE6-IE8 */
+ url("remixicon.woff2?t=1643444096731") format("woff2"),
+ url("remixicon.woff?t=1643444096731") format("woff"),
+ url('remixicon.ttf?t=1643444096731') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
+ url('remixicon.svg?t=1643444096731#remixicon') format('svg'); /* iOS 4.1- */
font-display: swap;
}
@@ -43,3 +43,4 @@
.ri-map-pin-line:before { content: "\ef14"; }
.ri-repeat-line:before { content: "\f074"; }
+.ri-calendar-line:before { content: "\eb27"; }
diff --git a/saturn/server/static/icons/remixicon.eot b/saturn/server/static/icons/remixicon.eot
index c670a91..909c339 100644
Binary files a/saturn/server/static/icons/remixicon.eot and b/saturn/server/static/icons/remixicon.eot differ
diff --git a/saturn/server/static/icons/remixicon.less b/saturn/server/static/icons/remixicon.less
index f7653fc..f7753bf 100644
--- a/saturn/server/static/icons/remixicon.less
+++ b/saturn/server/static/icons/remixicon.less
@@ -8,12 +8,12 @@
@font-face {
font-family: "remixicon";
- src: url('remixicon.eot?t=1643377622508'); /* IE9*/
- src: url('remixicon.eot?t=1643377622508#iefix') format('embedded-opentype'), /* IE6-IE8 */
- url("remixicon.woff2?t=1643377622508") format("woff2"),
- url("remixicon.woff?t=1643377622508") format("woff"),
- url('remixicon.ttf?t=1643377622508') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
- url('remixicon.svg?t=1643377622508#remixicon') format('svg'); /* iOS 4.1- */
+ src: url('remixicon.eot?t=1643444096731'); /* IE9*/
+ src: url('remixicon.eot?t=1643444096731#iefix') format('embedded-opentype'), /* IE6-IE8 */
+ url("remixicon.woff2?t=1643444096731") format("woff2"),
+ url("remixicon.woff?t=1643444096731") format("woff"),
+ url('remixicon.ttf?t=1643444096731') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
+ url('remixicon.svg?t=1643444096731#remixicon') format('svg'); /* iOS 4.1- */
font-display: swap;
}
@@ -44,4 +44,5 @@
.ri-map-pin-line:before { content: "\ef14"; }
.ri-repeat-line:before { content: "\f074"; }
+.ri-calendar-line:before { content: "\eb27"; }
}
\ No newline at end of file
diff --git a/saturn/server/static/icons/remixicon.svg b/saturn/server/static/icons/remixicon.svg
index 291b05d..47fdd7c 100644
--- a/saturn/server/static/icons/remixicon.svg
+++ b/saturn/server/static/icons/remixicon.svg
@@ -9,4 +9,6 @@
unicode=""
horiz-adv-x="1200" d="M600 155L847.5 402.5A350 350 0 1 1 352.5 402.5L600 155zM600 13.6000000000001L281.8 331.8000000000002A450 450 0 1 0 918.2 331.8000000000002L600 13.5999999999999zM600 550A100 100 0 1 1 600 750A100 100 0 0 1 600 550zM600 450A200 200 0 1 0 600 850A200 200 0 0 0 600 450z" />