koel/resources/assets/js/remote/components/SongDetails.vue

32 lines
997 B
Vue
Raw Normal View History

2024-04-04 22:20:42 +00:00
<template>
<article class="flex-1 flex flex-col items-center justify-around">
<div
:style="{ backgroundImage: `url(${song.album_cover || defaultCover})` }"
class="cover my-0 mx-auto w-[calc(70vw_+_4px)] aspect-square rounded-full border-2 border-solid
border-k-text-primary bg-center bg-cover bg-k-bg-secondary"
/>
<div class="w-full flex flex-col justify-around">
<div>
<p class="text-[6vmin] font-bold mx-auto mb-4">{{ song.title }}</p>
<p class="text-[5vmin] mb-2 opacity-50">{{ song.artist_name }}</p>
<p class="text-[4vmin] opacity-50">{{ song.album_name }}</p>
</div>
</div>
</article>
</template>
2024-04-23 21:01:27 +00:00
<script lang="ts" setup>
2024-04-04 22:20:42 +00:00
import { toRefs } from 'vue'
import { defaultCover } from '@/utils'
const props = defineProps<{ song: Song }>()
const { song } = toRefs(props)
</script>
2024-04-23 21:01:27 +00:00
<style lang="postcss" scoped>
2024-04-04 22:20:42 +00:00
p {
@apply max-w-[90%] mx-auto overflow-hidden text-ellipsis whitespace-nowrap leading-[1.3];
}
</style>