LukeSkywalker92 / MMM-Globe

Earth globe for MagicMirror2
MIT License
69 stars 16 forks source link

Background? #4

Open DanielWeeber opened 5 years ago

DanielWeeber commented 5 years ago

Is there any way you can replace the default black background with this? With a bit of opacity so the text is still readable?

TATUMTOT commented 4 years ago

Try using position fullscreen_below. I’m not sure if this will work but that is how i have been getting stuff to work in the background.

buconero commented 4 years ago

It works as a background if setup as stated before. Unfortunately the image is displayed in the top left region then. Does anyone have an idea on how to get it in center after setting it as fullscreen_below?

princemaxwell commented 3 years ago

You have to put the following code into custom.css:

.MMM-Globe-image { -webkit-clip-path: circle(50% at 50% 50%); clip-path: circle(50% at 50% 50%); opacity: 0.4; position: absolute; top: 30%; left: 50%; transform: translate(-50%, -50%); height: 587px; object-fit: cover; object-position: 0 0; }

You have to edit the height, if you have "europeDiscNat" as style and your config.js has "imageSize" <> 600. You have to calulate: (imageSize * 0,98) - 1. Otherwise you see a the white stripe from the original image on the bottom of image.

You can edit the opacity if you want.

buconero commented 3 years ago

Thanks for your reply! Unfortunately it did not work out for me. So I started playing around with the regions and modules and tested the globe into several regions. For me, as I wanted it to be in the middle, it worked to set the region.upper.third { top: 40%; in main.css (as I am not having a custom.css for some reason). Now it does not interfer with other modules I use and almost works pretty well as background/centered object.