Add: Fade in for contentArt

pull/16/head
Juraj Nyíri 4 years ago
parent dffc0a3991
commit 12cba398b4

@ -19691,6 +19691,11 @@ style.textContent = css `
top: 0; top: 0;
background-size: cover; background-size: cover;
display: none; display: none;
-webkit-animation: fadein 0.5s; /* Safari, Chrome and Opera > 12.1 */
-moz-animation: fadein 0.5s; /* Firefox < 16 */
-ms-animation: fadein 0.5s; /* Internet Explorer */
-o-animation: fadein 0.5s; /* Opera < 12.1 */
animation: fadein 0.5s;
} }
.yearElem { .yearElem {
color: hsla(0, 0%, 100%, 0.45); color: hsla(0, 0%, 100%, 0.45);
@ -19719,6 +19724,54 @@ style.textContent = css `
top: -14px; top: -14px;
transform: rotate(45deg); transform: rotate(45deg);
} }
@keyframes fadein {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
/* Firefox < 16 */
@-moz-keyframes fadein {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
/* Safari, Chrome and Opera > 12.1 */
@-webkit-keyframes fadein {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
/* Internet Explorer */
@-ms-keyframes fadein {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
/* Opera < 12.1 */
@-o-keyframes fadein {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.toViewSeason { .toViewSeason {
position: relative; position: relative;
top: 5px; top: 5px;
@ -20672,14 +20725,15 @@ class PlexMeetsHomeAssistant extends HTMLElement {
} }
}); });
} }
else { else if (!lodash.isEmpty(art)) {
const contentArt = this.getElementsByClassName('contentArt')[0]; const contentArt = this.getElementsByClassName('contentArt')[0];
const contentbg = this.getElementsByClassName('contentbg')[0]; const contentbg = this.getElementsByClassName('contentbg')[0];
contentArt.style.width = `${window.innerWidth}px`; contentArt.style.width = `${window.innerWidth}px`;
contentArt.style.height = `${window.innerHeight}px`; contentArt.style.height = `${window.innerHeight}px`;
contentArt.style.display = 'block';
contentArt.style.backgroundImage = `url('${art}')`; contentArt.style.backgroundImage = `url('${art}')`;
contentArt.style.top = `${top - 8}px`; contentArt.style.top = `${top - 8}px`;
contentArt.style.transition = '0.5s';
contentArt.style.display = 'block';
contentbg.classList.add('no-transparency'); contentbg.classList.add('no-transparency');
} }
} }

@ -190,6 +190,11 @@ style.textContent = css`
top: 0; top: 0;
background-size: cover; background-size: cover;
display: none; display: none;
-webkit-animation: fadein 0.5s; /* Safari, Chrome and Opera > 12.1 */
-moz-animation: fadein 0.5s; /* Firefox < 16 */
-ms-animation: fadein 0.5s; /* Internet Explorer */
-o-animation: fadein 0.5s; /* Opera < 12.1 */
animation: fadein 0.5s;
} }
.yearElem { .yearElem {
color: hsla(0, 0%, 100%, 0.45); color: hsla(0, 0%, 100%, 0.45);
@ -218,6 +223,54 @@ style.textContent = css`
top: -14px; top: -14px;
transform: rotate(45deg); transform: rotate(45deg);
} }
@keyframes fadein {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
/* Firefox < 16 */
@-moz-keyframes fadein {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
/* Safari, Chrome and Opera > 12.1 */
@-webkit-keyframes fadein {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
/* Internet Explorer */
@-ms-keyframes fadein {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
/* Opera < 12.1 */
@-o-keyframes fadein {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.toViewSeason { .toViewSeason {
position: relative; position: relative;
top: 5px; top: 5px;

@ -916,14 +916,16 @@ class PlexMeetsHomeAssistant extends HTMLElement {
this.videoElem.style.top = `${top}px`; this.videoElem.style.top = `${top}px`;
} }
}); });
} else { } else if (!_.isEmpty(art)) {
const contentArt = this.getElementsByClassName('contentArt')[0] as HTMLElement; const contentArt = this.getElementsByClassName('contentArt')[0] as HTMLElement;
const contentbg = this.getElementsByClassName('contentbg')[0] as HTMLElement; const contentbg = this.getElementsByClassName('contentbg')[0] as HTMLElement;
contentArt.style.width = `${window.innerWidth}px`; contentArt.style.width = `${window.innerWidth}px`;
contentArt.style.height = `${window.innerHeight}px`; contentArt.style.height = `${window.innerHeight}px`;
contentArt.style.display = 'block';
contentArt.style.backgroundImage = `url('${art}')`; contentArt.style.backgroundImage = `url('${art}')`;
contentArt.style.top = `${top - 8}px`; contentArt.style.top = `${top - 8}px`;
contentArt.style.transition = '0.5s';
contentArt.style.display = 'block';
contentbg.classList.add('no-transparency'); contentbg.classList.add('no-transparency');
} }
} }

Loading…
Cancel
Save