-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add colorization of events #9
base: master
Are you sure you want to change the base?
Conversation
Hi @DarienFord , thx for the pull-request, I appreciate it! Would it be an option to have it as an option in the config and that you can specify the colors? As I only use one calendar, for me it doesn't bring any value. So, happy to add it, if it would be configurable however. |
<div class="event-wrapper"> | ||
<div class="event"> | ||
<div class="event-wrapper" style="border:2px solid ${event.color}"> | ||
<div class="event" > | ||
<div class="info"> | ||
<div class="summary">${event.title}</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about instead of doing a border, we do something like this:
<div class="summary">${event.title}<span style="color: ${event.color};"> ●</span></div>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gives a small indication of the calendar it is on and is more in line with what you see on proper Google Calendar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And to @rdehuyss wanting this to be configurable, we can use this:
<div class="summary">${event.title}
${this.config.showColors ? `<span style="color: ${event.color};"> ●</span>` : ''}
</div>
Adding showColors: false
to this.config
within setConfig
I've added a colored border around each event based on the calendar it comes from.
This gives a little more context when dealing with multiple calendars (I have 5).