MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    MMM-Traffic - make text lighter ?

    Scheduled Pinned Locked Moved Troubleshooting
    10 Posts 4 Posters 4.7k Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • strawberry 3.141S Offline
      strawberry 3.141 Project Sponsor Module Developer @ironman_DK
      last edited by

      @ironman_DK should be

      .MMM-Traffic div.small.dimmed {
        //your magic
      }
      

      but couldn’t test it

      Please create a github issue if you need help, so I can keep track

      I 1 Reply Last reply Reply Quote 0
      • I Offline
        ironman_DK @strawberry 3.141
        last edited by

        @strawberry-3.141 what do you mean do I have to delete it or … I guess that the text regarding the text is here :

        //routeName
        if (this.config.route_name) {
        routeName.className = ‘dimmed small’;
        if (this.summary.length > 0 && this.config.show_summary){
        routeName.innerHTML = this.config.route_name + ’ ’ + this.config.summaryText + ’ ’ + this.summary;
        } else {
        routeName.innerHTML = this.config.route_name;
        }
        }

        Mykle1M 1 Reply Last reply Reply Quote 0
        • Mykle1M Offline
          Mykle1 Project Sponsor Module Developer @ironman_DK
          last edited by

          @ironman_DK said in MMM-Traffic - make text lighter ?:

          what do you mean do I have to delete it or … I guess that the text regarding the text is here :

          I think he means make a custon.css entry with the info he gave you rather than change the module files

          Create a working config
          How to add modules

          I 1 Reply Last reply Reply Quote 0
          • I Offline
            ironman_DK @Mykle1
            last edited by

            @Mykle1 I have solved the problem, I had to add bright in the text :

            //routeName
            if (this.config.route_name) {
            routeName.className = ‘bright small’;
            if (this.summary.length > 0 && this.config.show_summary){
            routeName.innerHTML = this.config.route_name + ’ ’ + this.config.summaryText + ’ ’ + this.summary + ’ ’ + this.config.arriveByText + ’ ’ + this.config.arrival_time.substring(0,2) + “:” + this.config.arrival_time.substring(2,4);
            } else {
            console.log(typeof this.config.arrival_time );
            routeName.innerHTML = this.config.route_name + ’ ’ + this.config.arriveByText + ’ ’ + this.config.arrival_time.substring(0,2) + “:” + this.config.arrival_time.substring(2,4);
            }
            }
            }

            Mykle1M pjkoelemanP 2 Replies Last reply Reply Quote 0
            • Mykle1M Offline
              Mykle1 Project Sponsor Module Developer @ironman_DK
              last edited by

              @ironman_DK said in MMM-Traffic - make text lighter ?:

              I have solved the problem, I had to add bright in the text :

              That’s one way of doing it but they never recommend changing the module file. That is why he gave you a custom.css entry. If that module gets updated you will lose your changes. If you had made the change in the custom.css file then you would not lose your changes if the module gets updated.

              Peace

              Create a working config
              How to add modules

              pjkoelemanP 1 Reply Last reply Reply Quote 1
              • pjkoelemanP Offline
                pjkoeleman @ironman_DK
                last edited by

                @ironman_DK Thats not the way to do this.

                Do it this way:

                • When you don’t have a custom.css create one in /MagicMirror/css
                • Add the following code to custom.css
                .MMM-Traffic div.small.dimmed {
                color: #00FF00;
                }
                

                Now you have the text in green but you can change that as you like.

                I 1 Reply Last reply Reply Quote 1
                • pjkoelemanP Offline
                  pjkoeleman @Mykle1
                  last edited by

                  @Mykle1
                  I’am not that fast in typing and testing it …

                  Mykle1M 1 Reply Last reply Reply Quote 0
                  • Mykle1M Offline
                    Mykle1 Project Sponsor Module Developer @pjkoeleman
                    last edited by Mykle1

                    @pjkoeleman
                    I beat you by 1ms ;-)

                    Create a working config
                    How to add modules

                    1 Reply Last reply Reply Quote 1
                    • I Offline
                      ironman_DK @pjkoeleman
                      last edited by

                      @pjkoeleman ahh off course,I have done it, Thnak you for your help :-)

                      1 Reply Last reply Reply Quote 1
                      • 1 / 1
                      • First post
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy