Do not use hardcoded colors for calendar API
One-sentence description
Do not use hardcoded colors for calendar API in website/members/api/serializers.py
r42-49 and website/events/api/serializers.py
Why?
We shouldn't hardcode these things at the API level but provide them using CSS.
Current implementation
The API provides a backgroundColor
and textColor
in the event sources APIs that is used by FullCalendar via https://fullcalendar.io/docs/events-json-feed. Every item in the feed is an event source object: https://fullcalendar.io/docs/event-source-object.
Suggested implementation
Provide a className
attribute instead and determine the background color and text color based on the class using CSS.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information