MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. Sam 0
    3. Posts
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    S
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 6
    • Posts 36
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: MMM-CalendarExt3 how do you create multiple events with color css?

      @MMRIZE

      Thank you very much for your effort. I try to describe as best as I can what is working now so that others can learn from it.

      Okay, I did some further research based on the term symbol and saw that the symbols had to be added in the general calendar. I also saw them in MMM-CalendarExt3 as below.
      Will show my config code here:

      {
      			module: "calendar",
      			header: "Familie agenda",
      			position: "top_left",
      			config: {
      				calendars: [
      					{
      						
      						fetchInterval: 7 * 24 * 60 * 60 * 1000,
      						symbol: "calendar-check",
      						url: "outlook url"
      }	
      ],					
      customEvents: [
          	{keyword: "zwemmen", symbol: "person-swimming fas fa-fw fa-person-swimming"},
          	{keyword: "padel", symbol: "running fas fa-fw fa-running"},
      	{keyword: "zingen", symbol: "music fas fa-fw fa-music"},
      	{keyword: "verjaardag", symbol: "cake-candles fas fa-fw fa-cake-candles"},
          	{keyword: "volleybal", symbol: "volleyball fas fa-fw fa-volleyball"}
      ],
      					
      				
      			}
      		},
      
      
      {
        module: "MMM-CalendarExt3",
        position: "lower_third",
        title: "",
        config: {
      eventTransformer: (ev) => {
         if (ev.title.search('Uitje') > -1) ev.color = 'blue'
         if (ev.title.search('Verjaardag') > -1) ev.color = '#FF69B4'
      
      

      5ff82a89-e316-441b-8f3d-996c6f1074eb-image.png

      I will also try your previous code.

      I would also like to control the color via CSS in the config file.
      How are you doing this? I already tried something but this doesn’t seem to work.

      posted in Utilities
      S
      Sam 0
    • RE: MMM-CalendarExt3 how do you create multiple events with color css?

      @MMRIZE

      So I see that Outing has turned blue, but I don’t see any other symbol for birthday.

      ef0ab2b0-d451-47a5-852e-8a219a76a910-image.png

      posted in Utilities
      S
      Sam 0
    • RE: MMM-CalendarExt3 how do you create multiple events with color css?

      @MMRIZE
      I have removed the custom CSS so it is standard, but I do not see the icon but I do see the blue color.

      posted in Utilities
      S
      Sam 0
    • RE: MMM-CalendarExt3 how do you create multiple events with color css?

      @MMRIZE

      Thanks for your help, it went wrong at first because a bracket was missing.) I adjusted this but unfortunately it doesn’t work. Could this be related to the fact that I have already adjusted the CSS?

      {
        module: "MMM-CalendarExt3",
        position: "lower_third",
        title: "",
        config: {
             eventTransformer: (ev) => {
                    if (ev.title.search('Uitje') > -1) ev.color = 'blue'
                    if (ev.title.search('Verjaardag') > -1) ev.icon = 'birthday-cake'
                    return ev	
             },
         }
      }
      

      c63fb0e4-c96c-4db6-81fa-194143cf7d57-image.png

      posted in Utilities
      S
      Sam 0
    • RE: MMM-CalendarExt3 how do you create multiple events with color css?

      @MMRIZE said in MMM-CalendarExt3 how do you create multiple events with color css?:

      if (ev.title.search(‘verjaardag’ > -1) ev.icon = ‘birthday-cake’

      Thanks for your help, it went wrong at first because a bracket was missing.) I adjusted this but unfortunately it doesn’t work. Could this be related to the fact that I have already adjusted the CSS?

      {
      module: “MMM-CalendarExt3”,
      position: “lower_third”,
      title: “”,
      config: {
      eventTransformer: (ev) => {
      if (ev.title.search(‘Uitje’) > -1) ev.color = ‘blue’
      if (ev.title.search(‘Verjaardag’) > -1) ev.icon = ‘birthday-cake’
      return ev
      },
      544eb320-2f9e-4d33-8d22-b7f31600e92b-image.png

      posted in Utilities
      S
      Sam 0
    • MMM-CalendarExt3 how do you create multiple events with color css?

      Hi,

      How do you create multiple events with color css?
      Is there an example of what this looks like?
      I now have the following and it works, but I don’t know how I want to add a second event, so in addition to outings, for example birthdays

      {
      module: “MMM-CalendarExt3”,
      position: “lower_third”,
      title: “”,
      config: {
      eventTransformer: (ev) => {
      if (ev.title.search(‘Uitje’) > -1) ev.color = ‘blue’
      return ev
      },

      I also wonder how I can get a nice icon in an event, for example a birthday cake icon, does anyone have an example that I can look at?

      posted in Utilities
      S
      Sam 0
    • 1
    • 2
    • 3
    • 4
    • 4 / 4