forked from DebaucheryLibrarian/traxxx
Showing movie cover as banner background.
This commit is contained in:
parent
696eb9a9d0
commit
1e43c0e4c3
|
@ -6,7 +6,7 @@
|
||||||
<Scroll
|
<Scroll
|
||||||
v-slot="slotProps"
|
v-slot="slotProps"
|
||||||
class="scroll-light banner"
|
class="scroll-light banner"
|
||||||
:style="{ 'background-image': release.poster && `url(/media/${release.poster.thumbnail})` }"
|
:style="{ 'background-image': bannerBackground }"
|
||||||
:expandable="false"
|
:expandable="false"
|
||||||
>
|
>
|
||||||
<Banner
|
<Banner
|
||||||
|
@ -219,6 +219,11 @@ async function fetchRelease() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function bannerBackground() {
|
||||||
|
return (this.release.poster && `url(/media/${this.release.poster.thumbnail})`)
|
||||||
|
|| (this.release.covers.length > 0 && `url(/media/${this.release.covers[0].thumbnail})`);
|
||||||
|
}
|
||||||
|
|
||||||
function pageTitle() {
|
function pageTitle() {
|
||||||
return this.release
|
return this.release
|
||||||
&& (this.release.title
|
&& (this.release.title
|
||||||
|
@ -244,6 +249,7 @@ export default {
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
pageTitle,
|
pageTitle,
|
||||||
|
bannerBackground,
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
$route: fetchRelease,
|
$route: fetchRelease,
|
||||||
|
|
Loading…
Reference in New Issue