First off, I’m a complete and utter noob with coding. I’m capable enough to get MagicMirror installed and start adding in some of the 3rd party modules. I’m now trying to get into the space of modifying CSS and such for a little added customization.
I’m trying to something that I think should be simple but I cannot get it work for the life of me. I’ve searched the forum and this topic and found a couple pieces but I’m still struggling. Finally got frustrated enough to create an account and post.
I’m trying to change the color of events based on the title of an event coming from a google calendar. The events are coming in fine, just not changing color.
Based on what I have read, I need to use the eventTransformer function. I have put the following into the config.js file (including the full module for total information).
{
module: "MMM-CalendarExt3",
position: "bottom_bar",
config: {
mode: "week",
weekIndex: "0",
weeksInView: "2",
firstDayOfWeek: "1",
maxEventLines: "8",
fontSize: "25px",
eventHeight: "16px"
},
eventTransformer: function(event) {
if (event.title.search('Daycare') > -1) {
event.className = 'Daycare'
}
}
}
then in the custom.css file (Trying hot pink hex so it pops out):
.CX3 .Daycare {
background-color:#FF69B4;
color:#FF69B4;
}
For all I know, that’s completely wrong so any help you can provide will be appreciated!