• 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.

MagicMirror default weather module

Scheduled Pinned Locked Moved Unsolved Troubleshooting
6 Posts 2 Posters 203 Views 2 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 Offline
    sankum
    last edited by 26 days ago

    Hi,
    In the default weather module, what names are given to temperature, wind speed, sunset time and feels like temperature? The default module displays three rows for these in the current weather. I would like to display them in one row. How can I do that?

    Any clues for me? I guess it will need classes and custom css but for that I need to know what are the actual names being used by the module. Thanks.

    S 1 Reply Last reply 25 days ago Reply Quote 0
    • S Away
      sdetweil @sankum
      last edited by sdetweil 25 days ago 25 days ago

      @sankum i do not know, but you can use the developers window elements tab to discover and test css changes

      see the second link in my signature below for a starter discussion on how to use it

      you can also discover some info from the css we provide in the module folder

      MagicMirror/modules/default/weather

      weather also uses the nunjucks template formatting file,
      .njk, it is a text file, you can see the class assignments there too

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • S Offline
        sankum
        last edited by 25 days ago

        Thanks Sam,
        I was trying to use the web dev tool in the browser. The trouble was that the screen display was quite busy and was hard to navigate to the right corners. Did not quite know how to disable other module displays, so I could focus on weather module.

        Ultimately I just commented out some of the modules and then it was easier to navigate!! I found the dimming of the feels like is span.dimmed and dimmed is defined in main.css.

        Dont quite know how to do undim in .feelslike so as to be a local effect, so for now I just defined the dimmed color. Is there another way?

        Also, is it possible to disable displays of some modules in web dev tool other than have to comment them out in config.js? Thanks.

        S 1 Reply Last reply 24 days ago Reply Quote 0
        • S Away
          sdetweil @sankum
          last edited by sdetweil 24 days ago 24 days ago

          @sankum lots to learn!

          dont need to comment out, just add

          disabled :true,
          

          after the module: line

          in dev window , elements tab
          you can select each module entry and add

          display:none;
          

          to hide it

          changing a style
          css stands for cascading style sheet
          which means there are layers, and you can override a previous definition at any layer

          MagicMirror provides a mechanism to be the last layer
          css/custom.css

          using this syntax you select the elements you want apply styles to

          selector_clause {
              styles
          }
          

          a selector clause contains items to identify the elements
          . means class , class=
          # means id , id=
          no prefix means html tag name , div, span, table, tr, li, p etc

          a selector_clause ALWAYS selects ALL elements in the web page/document, so you have to be careful not to modify everything accidentally.

          we recommend always using the modulename as a class prefix to only select the elements in that tree

          .modulename dimmed {
          ????
          }
          

          note:

          that IF you have multiple instances of the same module, this selector will select ALL modules of that classname, even if you didn’t intend that… you could use the ID field, OR add a

          classes:"classname" 
          

          to the module instance in config.js and use THAT class in the selector clause, as it would ONLY apply to the module(s) you added the classes: property to

          this is where the dev window helps. select the elements you are interested in modifying and set the styles in the upper right window

          if they produce the effect you want, you can swipe copy/paste them to insert in custom css

          then put the selector around the content you pasted

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          1 Reply Last reply Reply Quote 0
          • S Offline
            sankum
            last edited by 24 days ago

            Thank you Sam. The guidelines were very helpful. I could use the web dev as you suggested.

            I was also able to use classes and modify the styles I wanted in custom.css. I still have a few issues with the styles in the custom.css (mainly in syntax and largely due to my lack of knowledge) but will persevere. Thanks.

            S 1 Reply Last reply 24 days ago Reply Quote 0
            • S Away
              sdetweil @sankum
              last edited by 24 days ago

              @sankum i use this guide for selector clause
              https://www.w3schools.com/cssref/css_selectors.php

              used to be all one page, now in different sections

              you can combine all kinds of elements

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              1 / 1
              • First post
                2/6
                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