MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    Weather Forecast - Inver min max

    Custom CSS
    3
    5
    413
    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.
    • B
      Bira last edited by

      Hello everyone.

      I’ve been slowly getting my mirror to my taste and now have a pet peeve that I’m unable to get rid of.

      To me it feels kinda weird read left to right as max temp and min temp. I was able to inspect the page and find those classes and change font, padding and whatnot but I don’t know how to swap those information.

      P.S.: I’m using the old weather forecast module because I’m afraid I’ll have to redo some styling if I update.

      Thank you.

      max_min.png

      mumblebaj S 2 Replies Last reply Reply Quote 0
      • mumblebaj
        mumblebaj Project Sponsor @Bira last edited by

        @bira Unfortunately it is defined in the MMM-weatherforecast.js when the table is built.

        1 Reply Last reply Reply Quote 0
        • S
          sdetweil @Bira last edited by

          @bira as @mumblebaj says, this is hard coded

          but could be easily changed

          edit the file
          MMM-WeatherForecast.js and swap (cut/paste) these two sections of code
          starting on lines 166 and 171

          				var maxTempCell = document.createElement("td");
          				maxTempCell.innerHTML = forecast.maxTemp.replace(".", this.config.decimalSymbol) + degreeLabel;
          				maxTempCell.className = "align-right bright max-temp";
          				row.appendChild(maxTempCell);
          
          				var minTempCell = document.createElement("tr");
          				minTempCell.innerHTML = forecast.minTemp.replace(".", this.config.decimalSymbol) + degreeLabel;
          				minTempCell.className = "align-right min-temp";
          				row.appendChild(minTempCell);
          

          and u have to remember that u did this to the module and any update would revert it

          Sam

          Create a working config
          How to add modules

          mumblebaj 1 Reply Last reply Reply Quote 0
          • mumblebaj
            mumblebaj Project Sponsor @sdetweil last edited by

            @sdetweil Yeah, I didn’t want to advise that for exactly that reason.

            1 Reply Last reply Reply Quote 0
            • B
              Bira last edited by

              Thanks @mumblebaj and @sdetweil. Guess I’ll try what you guys suggested since I don’t plan on updating things often. I thought there could be a way to do so without changing the code.

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post
              Enjoying MagicMirror? Please consider a donation!
              MagicMirror created by Michael Teeuw.
              Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
              This forum is using NodeBB as its core | Contributors
              Contact | Privacy Policy