Fabrizz / MMM-LiveLyrics

A lyrics module for MM2. It uses Genius data and MMM-OnSpotify to overlay the song lyrics
GNU General Public License v3.0
7 stars 3 forks source link

Landscape Mode #8

Open SynMaki opened 1 year ago

SynMaki commented 1 year ago

Hey, Is there any change to get a Mode for Horizontal Screens which will place the Lyrics in the whole middle section?

I have some modules to the left and right, but nothing in the middle. Therefore it would be nice to have the Lyrics in the complete middle section (from top to bottom) since it will not overlap the oder modules on the side.

Also, a hideStrategy when no lyrics are found would be awesome :)

Thank you!

Fabrizz commented 1 year ago

Hey, can you send a screenshot so I can view better what you mean? Maybe a mode were you just put the horizontal px and centers it to a vertical lyrics "socket", as making it change automatically maybe difficult to do

Originally I had a hideStrategy for no-lyrics, but it was difficult to take into account refresh times, genius scrapping time, user defined polling time in mmm-onsp, etc

SynMaki commented 1 year ago

Sure, thats how i tought: MM

ah gotcha, so unfortunately no solution for that atm. Thanks!

Fabrizz commented 1 year ago

That would look good, when I get some free time Im going to do it, abt the other thing if I remember correctly there is a class pair that is applied only on no lyrics or connection error, you could just use display: none or opacity: 0 in the CSS

SynMaki commented 1 year ago

Thats awesome! Thank you so much! i will also try te CSS configuration, thanks for your Input!

Fabrizz commented 1 year ago

Hey @SynMaki it actually simpler than I though, just use lyricsFillType: "container" and add this to your css/custom.css:

  :root {
      --LILY-SYNMAKI-LR-PADDING: 480px; /* <-- Change here to match your display */

      /* Overrides default gap calc sizes from MM2 (only on module) */
      --LILY-VIEW-MARGIN-L: var(--LILY-SYNMAKI-LR-PADDING) !important;
      --LILY-VIEW-MARGIN-R: var(--LILY-SYNMAKI-LR-PADDING) !important;
  }

This allows you to manually override the LR spacing, as the module uses calc() to do the math for everything else