From dffc0a399199be7c30628701eda9cfa925fb2bd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraj=20Nyi=CC=81ri?= Date: Fri, 11 Jun 2021 14:58:22 +0200 Subject: [PATCH] Add: Gradients inside contentArt bg --- dist/plex-meets-homeassistant.js | 8 ++++++++ src/plex-meets-homeassistant.ts | 11 +++++++++++ 2 files changed, 19 insertions(+) diff --git a/dist/plex-meets-homeassistant.js b/dist/plex-meets-homeassistant.js index eef56ad..3e912c8 100644 --- a/dist/plex-meets-homeassistant.js +++ b/dist/plex-meets-homeassistant.js @@ -20206,6 +20206,12 @@ class PlexMeetsHomeAssistant extends HTMLElement { this.content.appendChild(contentbg); const contentArt = document.createElement('div'); contentArt.className = 'contentArt'; + const contentArtBG1 = document.createElement('div'); + contentArtBG1.className = 'videobg1'; + contentArt.appendChild(contentArtBG1); + const contentArtBG2 = document.createElement('div'); + contentArtBG2.className = 'videobg2'; + contentArt.appendChild(contentArtBG2); this.content.appendChild(contentArt); this.detailElem = document.createElement('div'); this.detailElem.className = 'detail'; @@ -20668,11 +20674,13 @@ class PlexMeetsHomeAssistant extends HTMLElement { } else { const contentArt = this.getElementsByClassName('contentArt')[0]; + const contentbg = this.getElementsByClassName('contentbg')[0]; contentArt.style.width = `${window.innerWidth}px`; contentArt.style.height = `${window.innerHeight}px`; contentArt.style.display = 'block'; contentArt.style.backgroundImage = `url('${art}')`; contentArt.style.top = `${top - 8}px`; + contentbg.classList.add('no-transparency'); } } if (!lodash.isEmpty(seasonsData)) { diff --git a/src/plex-meets-homeassistant.ts b/src/plex-meets-homeassistant.ts index 6d74550..943a485 100644 --- a/src/plex-meets-homeassistant.ts +++ b/src/plex-meets-homeassistant.ts @@ -413,6 +413,15 @@ class PlexMeetsHomeAssistant extends HTMLElement { const contentArt = document.createElement('div'); contentArt.className = 'contentArt'; + + const contentArtBG1 = document.createElement('div'); + contentArtBG1.className = 'videobg1'; + contentArt.appendChild(contentArtBG1); + + const contentArtBG2 = document.createElement('div'); + contentArtBG2.className = 'videobg2'; + contentArt.appendChild(contentArtBG2); + this.content.appendChild(contentArt); this.detailElem = document.createElement('div'); @@ -909,11 +918,13 @@ class PlexMeetsHomeAssistant extends HTMLElement { }); } else { const contentArt = this.getElementsByClassName('contentArt')[0] as HTMLElement; + const contentbg = this.getElementsByClassName('contentbg')[0] as HTMLElement; contentArt.style.width = `${window.innerWidth}px`; contentArt.style.height = `${window.innerHeight}px`; contentArt.style.display = 'block'; contentArt.style.backgroundImage = `url('${art}')`; contentArt.style.top = `${top - 8}px`; + contentbg.classList.add('no-transparency'); } } if (!_.isEmpty(seasonsData)) {