mirror of
https://github.com/koel/koel
synced 2024-11-24 13:13:05 +00:00
refactor: simplify cards
This commit is contained in:
parent
200a73ee41
commit
f9f21ce654
5 changed files with 7 additions and 19 deletions
|
@ -11,9 +11,7 @@
|
|||
@dragstart="dragStart"
|
||||
@contextmenu.prevent="requestContextMenu"
|
||||
>
|
||||
<span class="thumbnail-wrapper" :style="{ backgroundImage: `url(${defaultCover})` }">
|
||||
<AlbumThumbnail :entity="album"/>
|
||||
</span>
|
||||
<AlbumThumbnail :entity="album"/>
|
||||
|
||||
<footer>
|
||||
<a :href="`#!/album/${album.id}`" class="name" data-testid="name">{{ album.name }}</a>
|
||||
|
@ -58,7 +56,7 @@
|
|||
<script lang="ts" setup>
|
||||
import { faDownload, faRandom } from '@fortawesome/free-solid-svg-icons'
|
||||
import { computed, toRef, toRefs } from 'vue'
|
||||
import { defaultCover, eventBus, pluralize, secondsToHis, startDragging } from '@/utils'
|
||||
import { eventBus, pluralize, secondsToHis, startDragging } from '@/utils'
|
||||
import { albumStore, artistStore, commonStore, songStore } from '@/stores'
|
||||
import { downloadService, playbackService } from '@/services'
|
||||
|
||||
|
|
|
@ -11,9 +11,7 @@
|
|||
@dragstart="dragStart"
|
||||
@contextmenu.prevent="requestContextMenu"
|
||||
>
|
||||
<span class="thumbnail-wrapper">
|
||||
<ArtistThumbnail :entity="artist"/>
|
||||
</span>
|
||||
<ArtistThumbnail :entity="artist"/>
|
||||
|
||||
<footer>
|
||||
<div class="info">
|
||||
|
|
|
@ -101,8 +101,8 @@ article {
|
|||
}
|
||||
|
||||
.cover {
|
||||
flex: 0 0 48px;
|
||||
height: 48px;
|
||||
width: 48px;
|
||||
aspect-ratio: 1/1;
|
||||
background-size: cover;
|
||||
position: relative;
|
||||
border-radius: 4px;
|
||||
|
|
|
@ -122,6 +122,7 @@ const onDrop = async (event: DragEvent) => {
|
|||
.cover {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
aspect-ratio: 1/1;
|
||||
display: block;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
|
|
|
@ -36,15 +36,6 @@
|
|||
flex-direction: column;
|
||||
gap: 1.5rem;
|
||||
|
||||
.thumbnail-wrapper {
|
||||
overflow: hidden;
|
||||
border-radius: 8px;
|
||||
display: block;
|
||||
background-position: center;
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 768px) {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
@ -65,7 +56,7 @@
|
|||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
|
||||
.thumbnail-wrapper {
|
||||
.cover {
|
||||
width: 80px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue