Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

DarienFord
Copy link

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).

@rdehuyss
Copy link
Owner

rdehuyss commented Sep 5, 2018

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>
Copy link
Contributor

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};">&nbsp&#9679;</span></div>

Copy link
Contributor

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

Copy link
Contributor

@iantrich iantrich Sep 22, 2018

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};">&nbsp&#9679;</span>` : ''}
</div>

Adding showColors: false to this.config within setConfig

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants