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

Adding new region positions top_center1 and top_center2

Scheduled Pinned Locked Moved Development
5 Posts 3 Posters 4.4k Views 5 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
    sindbad6
    last edited by Mar 22, 2017, 8:58 PM

    I use my magic mirror in landscape format. And I two place four modules side by side. My idea was to divide the top_center position in two.

    Therefore I added new region definitions in the custom.css:

    .region.top.center1 {
      left: 33%;
      -moz-transform: translateX(-33%);
      -o-transform: translateX(-33%);
      -webkit-transform: translateX(-33%);
      -ms-transform: translateX(-33%);
      transform: translateX(-33%);
    }
    
    .region.top.center2 {
      left: 60%;
      -moz-transform: translateX(-33%);
      -o-transform: translateX(-33%);
      -webkit-transform: translateX(-33%);
      -ms-transform: translateX(-33%);
      transform: translateX(-33%);
    }
    
    .region.top.center1,
    .region.top.center2 {
      top: 100%;
    }
    

    And use in the config.js

    module: 'MMM-Fuel',
    position: 'top_center1', 
    config: {
    

    Of course, this doesn’t work. I read something, about a region class definition. But I didn’t found, what else I have to do. Any ideas what is missing?

    1 Reply Last reply Reply Quote 1
    • Y Offline
      yawns Moderator
      last edited by Mar 22, 2017, 9:01 PM

      I never tried, but I guess you need to edit index.html located in MagicMirror root folder to define the new regions

      S 1 Reply Last reply Mar 22, 2017, 9:11 PM Reply Quote 2
      • S Offline
        sindbad6 @yawns
        last edited by Mar 22, 2017, 9:11 PM

        @yawns : Thanks a lot, that’s it. Now it works.

        Z 1 Reply Last reply May 3, 2017, 12:32 PM Reply Quote 0
        • Z Offline
          zeular @sindbad6
          last edited by zeular May 3, 2017, 1:30 PM May 3, 2017, 12:32 PM

          @sindbad6 said in Adding new region positions top_center1 and top_center2:

          @yawns : Thanks a lot, that’s it. Now it works.

          Hi
          I can’t get it to work, what did you do in the index.html? My modules shows up and then dissapears…

          EDIT: Got it! If someone else want to know:

          		div class="region top center"><div class="container"></div></div>
          		div class="region top center1"><div class="container"></div></div>
          		div class="region top center2"><div class="container"></div></div>
          		div class="region top right"><div class="container"></div></div>
          
          
          S 1 Reply Last reply May 3, 2017, 3:19 PM Reply Quote 3
          • S Offline
            sindbad6 @zeular
            last edited by May 3, 2017, 3:19 PM

            @zeular Yeah, that’s the way I did it too.

            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 Sam, technical setup by Karsten.
            This forum is using NodeBB as its core | Contributors
            Contact | Privacy Policy