60 lines
No EOL
3.7 KiB
Text
60 lines
No EOL
3.7 KiB
Text
<script type="text/x-template" id="mediaitem-square-sp">
|
|
<template>
|
|
<div style="position: relative; display: inline-flex;">
|
|
<div @click.self='app.routeView(item)'
|
|
class="cd-mediaitem-square-sp" :style="{'--spcolor' : (item.attributes.artwork.bgColor != null) ? ('#'+item.attributes.artwork.bgColor) : `black`}">
|
|
<div class="artwork">
|
|
<mediaitem-artwork
|
|
:url="item.attributes.artwork ? item.attributes.artwork.url : ''"
|
|
size="300"
|
|
:video="(item.attributes != null && item.attributes.editorialVideo != null) ? (item.attributes.editorialVideo.motionDetailSquare ? item.attributes.editorialVideo.motionDetailSquare.video : (item.attributes.editorialVideo.motionSquareVideo1x1 ? item.attributes.editorialVideo.motionSquareVideo1x1.video : '')) : '' "
|
|
:type="item.type"></mediaitem-artwork>
|
|
</div>
|
|
<div class="cd-mediaitem-square-large-overlay" @click.self='app.routeView(item)'>
|
|
<div class="button" style="
|
|
border-radius: 50%;
|
|
background: rgba(50,50,50,0.7);"
|
|
:style="[(!(item.attributes.playParams ? (item.attributes.playParams.kind ?? (item.type ?? '')): (item.type ?? '')).includes('radioStation') && !(item.attributes.playParams ? (item.attributes.playParams.kind ?? (item.type ?? '')): (item.type ?? '')).includes('song')) ? {'margin': '140px',
|
|
width: '40px',
|
|
height: '40px',} :
|
|
{margin: '35px',
|
|
width: '120px',
|
|
height: '120px',}]" @click="app.playMediaItem(item)">
|
|
<%- include("../svg/play.svg") %>
|
|
</div>
|
|
</div>
|
|
<div class="title text-overflow-elipsis"
|
|
:style="{'color' : (item.attributes.artwork.textColor1 != null) ? ('#'+item.attributes.artwork.textColor1) : `#eee`}" style="font-weight: 600">
|
|
{{ item.attributes.name }}
|
|
</div>
|
|
<div class="subtitle text-overflow-elipsis"
|
|
:style="{'color' : (item.attributes.artwork.textColor1 != null) ? ('#'+item.attributes.artwork.textColor1) : `#eee`}" style="padding-left: 4px;padding-right: 4px; display: -webkit-box;-webkit-box-orient: vertical; -webkit-line-clamp: 2;white-space: normal;">
|
|
{{ (item.attributes.editorialNotes != null) ? item.attributes.editorialNotes.short
|
|
:(item.attributes.artistName ?? '') }}
|
|
</div>
|
|
|
|
</div>
|
|
<div class="cd-mediaitem-square-large-overlay" @click.self='app.routeView(item)' tabindex="0">
|
|
<div class="button" style="
|
|
border-radius: 50%;
|
|
background: rgba(50,50,50,0.7);"
|
|
:style="[(!(item.attributes.playParams ? (item.attributes.playParams.kind ?? (item.type ?? '')): (item.type ?? '')).includes('radioStation') && !(item.attributes.playParams ? (item.attributes.playParams.kind ?? (item.type ?? '')): (item.type ?? '')).includes('song')) ? {'margin': '140px',
|
|
width: '40px',
|
|
height: '40px',} :
|
|
{margin: '35px',
|
|
width: '120px',
|
|
height: '120px',}]" @click="app.playMediaItem(item)">
|
|
<%- include("../svg/play.svg") %>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</script>
|
|
|
|
<script>
|
|
Vue.component('mediaitem-square-sp', {
|
|
template: '#mediaitem-square-sp',
|
|
props: ['item'],
|
|
methods: {}
|
|
});
|
|
</script> |