• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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.

Changing icons of the modules Current Weather and Weather Forecast

Scheduled Pinned Locked Moved Development
301 Posts 30 Posters 1.0m Views 33 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.
  • S Away
    sdetweil @Manu85
    last edited by Jan 16, 2024, 2:30 PM

    @Manu85 said in Changing icons of the modules Current Weather and Weather Forecast:

    > content: url(“/css/icons/rainy-6.svg”);
    

    note that the quotes are leaning, not straight up and down

    change like this

    content: url("/css/icons/rainy-6.svg");
    

    Sam

    How to add modules

    learning how to use browser developers window for css changes

    M 1 Reply Last reply Jan 16, 2024, 2:40 PM Reply Quote 0
    • M Offline
      Manu85 @sdetweil
      last edited by Jan 16, 2024, 2:40 PM

      @sdetweil do they have to be like that? because that’s how they were before I modified them with </>
      }

      .currentweather .wi-day-sunny {
      content: url(“/css/icons/day.svg”);
      }

      .currentweather .wi-day-cloudy {
      content: url(“/css/icons/cloudy-day-1.svg”);
      }

      .currentweather .wi-rain {
      content: url(“/css/icons/rainy-6.svg”);

      S 1 Reply Last reply Jan 16, 2024, 2:41 PM Reply Quote 0
      • S Away
        sdetweil @Manu85
        last edited by Jan 16, 2024, 2:41 PM

        @Manu85 they ALL must be straight up and down…

        I was warning you that the copy you did originally had the wrong quote marks

        they ALL MUST BE ONLY

        "
        

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        M 1 Reply Last reply Jan 16, 2024, 2:53 PM Reply Quote 0
        • M Offline
          Manu85 @sdetweil
          last edited by sdetweil Jan 16, 2024, 2:54 PM Jan 16, 2024, 2:53 PM

          @sdetweil like that ?

          .currentweather .wi-night-clear {
          content: url("/css/icons/night.svg");
          }
          
          S 1 Reply Last reply Jan 16, 2024, 2:54 PM Reply Quote 0
          • S Away
            sdetweil @Manu85
            last edited by Jan 16, 2024, 2:54 PM

            @Manu85 yes

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            M 3 Replies Last reply Jan 16, 2024, 2:56 PM Reply Quote 0
            • M Offline
              Manu85 @sdetweil
              last edited by Jan 16, 2024, 2:56 PM

              @sdetweil excuse me, I’ll do it right away

              1 Reply Last reply Reply Quote 0
              • M Offline
                Manu85 @sdetweil
                last edited by Jan 16, 2024, 3:05 PM

                @sdetweil by putting them straight up and down my weather has the original icons

                avec guillemets droit.JPG

                1 Reply Last reply Reply Quote 0
                • M Offline
                  Manu85 @sdetweil
                  last edited by Jan 16, 2024, 3:37 PM

                  @sdetweil sorry for my mistakes

                  1 Reply Last reply Reply Quote 0
                  • M Offline
                    Manu85
                    last edited by Jan 17, 2024, 8:28 AM

                    Your precious help allowed me to succeed in having the icons on the mirror :-), I added a few lines in the custom to position each icon, for example:
                    .weather .wi-day-sunny {
                    content: url(“/css/icons/day.svg”);
                    padding-left: 60px;
                    padding-top: 7px;
                    height: 50px;
                    }
                    the last thing to do is how to manage the current day icon (position and size) because on the original file there was a part:.currentweather .weathericon { and another part:.weatherforecast .weathericon {
                    Following your help I named everything: .weather .weathericon { so that it works and I think that now it no longer makes a difference between current and forecast and I cannot manage the icon of the current day. Do you have any ideas on how to handle this?
                    Thank you for your valuable help

                    17 01 2024.JPG

                    S 1 Reply Last reply Jan 17, 2024, 12:58 PM Reply Quote 0
                    • S Away
                      sdetweil @Manu85
                      last edited by sdetweil Jan 17, 2024, 12:59 PM Jan 17, 2024, 12:58 PM

                      @Manu85 yes the current/forecast are not unique modules now…but mm provides a way to differentiate between two of the same module

                      you can add arbitrary names that are used in the class of the module in the html tree, and then use that class in your custom.css

                      I wish I had thought of the sooner

                      in the config.js for one of the weather modules, showing forecast for instance, after the module name line add

                          module:"weather",
                          classes:"forecast",
                      ...
                      ...
                      

                      then in the custom.css, for the icons used in forecast change the primary selector
                      from

                      .weather
                      

                      to

                      .forecast
                      

                      if I had thought of this first, we would have just added the two classes lines in config.js

                      one for currentweather and one for weatherforecast, each on the appropriate weather module instance

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      M 2 Replies Last reply Jan 17, 2024, 2:53 PM Reply Quote 1
                      • 1
                      • 2
                      • 7
                      • 8
                      • 9
                      • 10
                      • 11
                      • 30
                      • 31
                      • 9 / 31
                      9 / 31
                      • First post
                        87/301
                        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