• 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 background image to analog clock.

Scheduled Pinned Locked Moved Solved Troubleshooting
10 Posts 3 Posters 462 Views 3 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.
  • C Offline
    ChrisLeduex @sdetweil
    last edited by Nov 13, 2024, 5:58 PM

    @sdetweil Larger numbers sit on top of smaller numbers. In this case I wanted to make sure the svg image was always underneath the clock face/hands (z-index: 0) and the clock hands were always on top (z-index: 99). I could have used ‘z-index: 0’ and ‘z-index: 1’ instead but picked a larger number just to be sure the clock is always on top of anything else that might get added.

    I’m still working on it because I’d like to have a solution that doesn’t require any code changes to the module files. I’d like something that only requires using the custom.css file.

    20241113_07h50m20s_grim.png

    S 1 Reply Last reply Nov 13, 2024, 6:10 PM Reply Quote 0
    • S Away
      sdetweil @ChrisLeduex
      last edited by Nov 13, 2024, 6:10 PM

      @ChrisLeduex cool, it was just a question of implementation checking… good work

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • C Offline
        ChrisLeduex @sdetweil
        last edited by Nov 14, 2024, 5:12 AM

        Sorry @sdetweil, this is my first MM project and I have no idea what I’m doing. So I didn’t understand that “fullscreen_above” was a position option for modules.

        In the screen shot below I left my clock the same as before with ‘z-index: 0’ on the apple and ‘z-index: 99’ on all the other classes of the clock. I then set my calendar module to “fullscreen_above” to see what would happen.

        Not easy to see in the screen shot but all of the components of the clock that have a z-index are on top of the calendar and the date which doesn’t have any z-index values is underneath the calendar. So it would appear that any z-index value, even 0, puts those components on top of “fullscreen_above”. So yes, it should be used carefully because it will peek through.

        {
        	module: "clock",
        	position: "top_left",
        	config: {
        		displayType: "analog",
        		displaySeconds: false,
        	}
        },
        {
        	module: "calendar",
        	header: "US Holidays",
        	position: "fullscreen_above",
        	config: {
        		calendars: [
        			{
        

        20241113_20h57m47s_grim.png

        1 Reply Last reply Reply Quote 0
        • J Offline
          JohnGalt @ChrisLeduex
          last edited by Nov 18, 2024, 9:11 PM

          @ChrisLeduex – Interesting exercise. Where did you put the .svg image[s]? In with the clock faces in the module folder? In the module folder root? Other?

          C 1 Reply Last reply Nov 19, 2024, 9:20 PM Reply Quote 0
          • S sdetweil has marked this topic as solved on Nov 19, 2024, 1:25 PM
          • C Offline
            ChrisLeduex @JohnGalt
            last edited by Nov 19, 2024, 9:20 PM

            @JohnGalt I just put them directly in the CSS folder with the custom.css file while I was testing everything. But they can certainly go wherever you like based on how you organize stuff.

            J 1 Reply Last reply Nov 20, 2024, 1:09 AM Reply Quote 0
            • J Offline
              JohnGalt @ChrisLeduex
              last edited by Nov 20, 2024, 1:09 AM

              @ChrisLeduex – OK, thanks. I wasn’t sure that the url path went anywhere in particular.

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