added shadow property to mediaitem-artwork, enabled artwork shadow in artist page
This commit is contained in:
parent
0f5460aa3c
commit
830ca93768
2 changed files with 25 additions and 3 deletions
|
@ -1,12 +1,12 @@
|
||||||
<script type="text/x-template" id="mediaitem-artwork">
|
<script type="text/x-template" id="mediaitem-artwork">
|
||||||
<template v-if="type == 'artists'">
|
<template v-if="type == 'artists'">
|
||||||
<div class="mediaitem-artwork rounded">
|
<div class="mediaitem-artwork rounded" :style="{'box-shadow': shadow ? 'var(--mediaItemShadow-Shadow)' : ''}">
|
||||||
<img :src="app.getMediaItemArtwork(url, size)"
|
<img :src="app.getMediaItemArtwork(url, size)"
|
||||||
class="mediaitem-artwork--img">
|
class="mediaitem-artwork--img">
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<div class="mediaitem-artwork"
|
<div class="mediaitem-artwork" :style="{'box-shadow': shadow ? 'var(--mediaItemShadow-Shadow)' : ''}"
|
||||||
v-observe-visibility="{callback: visibilityChanged}">
|
v-observe-visibility="{callback: visibilityChanged}">
|
||||||
<img :src="app.getMediaItemArtwork(url, size)" v-if="isVisible"
|
<img :src="app.getMediaItemArtwork(url, size)" v-if="isVisible"
|
||||||
class="mediaitem-artwork--img">
|
class="mediaitem-artwork--img">
|
||||||
|
@ -20,7 +20,28 @@
|
||||||
<script>
|
<script>
|
||||||
Vue.component('mediaitem-artwork', {
|
Vue.component('mediaitem-artwork', {
|
||||||
template: '#mediaitem-artwork',
|
template: '#mediaitem-artwork',
|
||||||
props: ['size', 'url', 'type', 'video'],
|
props: {
|
||||||
|
size: {
|
||||||
|
type: String,
|
||||||
|
default: '120'
|
||||||
|
},
|
||||||
|
url: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
video: {
|
||||||
|
type: String,
|
||||||
|
required: false
|
||||||
|
},
|
||||||
|
shadow: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
},
|
||||||
data: function () {
|
data: function () {
|
||||||
return {
|
return {
|
||||||
isVisible: false
|
isVisible: false
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
<div class="col-sm" style="width: auto;">
|
<div class="col-sm" style="width: auto;">
|
||||||
<div class="artist-image">
|
<div class="artist-image">
|
||||||
<mediaitem-artwork
|
<mediaitem-artwork
|
||||||
|
:shadow="true"
|
||||||
v-if="!(data.attributes.editorialVideo && (data.attributes.editorialVideo.motionArtistWide16x9 || data.attributes.editorialVideo.motionArtistFullscreen16x9))"
|
v-if="!(data.attributes.editorialVideo && (data.attributes.editorialVideo.motionArtistWide16x9 || data.attributes.editorialVideo.motionArtistFullscreen16x9))"
|
||||||
:url="data.attributes.artwork ? data.attributes.artwork.url : ''"
|
:url="data.attributes.artwork ? data.attributes.artwork.url : ''"
|
||||||
size="220" type="artists"></mediaitem-artwork>
|
size="220" type="artists"></mediaitem-artwork>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue