mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 13:03:02 +00:00
redesign playlist card
This commit is contained in:
@@ -2,10 +2,14 @@
|
|||||||
<router-link
|
<router-link
|
||||||
:to="{ name: 'PlaylistView', params: { pid: props.playlist.playlistid } }"
|
:to="{ name: 'PlaylistView', params: { pid: props.playlist.playlistid } }"
|
||||||
:playlist="props.playlist"
|
:playlist="props.playlist"
|
||||||
class="p-card rounded"
|
class="p-card rounded noscroll"
|
||||||
>
|
>
|
||||||
<img :src="imguri + props.playlist.thumb"/>
|
<img :src="imguri + props.playlist.thumb" />
|
||||||
<div class="bottom">
|
<div class="overlay pad-lg">
|
||||||
|
<div class="p-name">{{ playlist.name }}</div>
|
||||||
|
<div class="p-count">{{ playlist.count }} Tracks</div>
|
||||||
|
</div>
|
||||||
|
<!-- <div class="bottom">
|
||||||
<div class="name ellip">{{ props.playlist.name }}</div>
|
<div class="name ellip">{{ props.playlist.name }}</div>
|
||||||
<div class="count">
|
<div class="count">
|
||||||
<span v-if="props.playlist.count == 0">No Tracks</span>
|
<span v-if="props.playlist.count == 0">No Tracks</span>
|
||||||
@@ -14,11 +18,12 @@
|
|||||||
>
|
>
|
||||||
<span v-else>{{ props.playlist.count }} Tracks</span>
|
<span v-else>{{ props.playlist.count }} Tracks</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> -->
|
||||||
</router-link>
|
</router-link>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import play from "@/composables/usePlayFrom";
|
||||||
import { paths } from "../../config";
|
import { paths } from "../../config";
|
||||||
import { Playlist } from "../../interfaces";
|
import { Playlist } from "../../interfaces";
|
||||||
|
|
||||||
@@ -31,19 +36,39 @@ const props = defineProps<{
|
|||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.p-card {
|
.p-card {
|
||||||
width: 100%;
|
|
||||||
padding: $medium;
|
|
||||||
transition: all 0.25s ease;
|
transition: all 0.25s ease;
|
||||||
position: relative;
|
position: relative;
|
||||||
background-color: $playlist-card-bg;
|
background-color: $playlist-card-bg;
|
||||||
|
height: 10rem;
|
||||||
|
|
||||||
img {
|
img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
aspect-ratio: 1;
|
height: 100%;
|
||||||
|
aspect-ratio: 1/1.2;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
border-radius: $medium;
|
border-radius: $medium;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.overlay {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
background-image: linear-gradient(
|
||||||
|
to top,
|
||||||
|
rgba(22, 22, 22, 0.507),
|
||||||
|
transparent 50%
|
||||||
|
);
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: flex-end;
|
||||||
|
|
||||||
|
.p-count {
|
||||||
|
opacity: 0.75;
|
||||||
|
font-size: 0.75rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: $darkestblue;
|
background-color: $darkestblue;
|
||||||
}
|
}
|
||||||
@@ -57,7 +82,7 @@ const props = defineProps<{
|
|||||||
|
|
||||||
.count {
|
.count {
|
||||||
font-size: $medium;
|
font-size: $medium;
|
||||||
opacity: .5;
|
opacity: 0.5;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="p-view">
|
<div id="p-view">
|
||||||
<div class="grid">
|
<div class="grid">
|
||||||
<NewPlaylistCard />
|
<!-- <NewPlaylistCard /> -->
|
||||||
<PlaylistCard
|
<PlaylistCard
|
||||||
v-for="p in pStore.playlists"
|
v-for="p in pStore.playlists"
|
||||||
:key="p.playlistid"
|
:key="p.playlistid"
|
||||||
@@ -25,16 +25,16 @@ const pStore = usePStore();
|
|||||||
scrollbar-color: $gray2 transparent;
|
scrollbar-color: $gray2 transparent;
|
||||||
|
|
||||||
.grid {
|
.grid {
|
||||||
grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
|
grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
|
|
||||||
@include for-desktop-down {
|
// @include for-desktop-down {
|
||||||
grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
|
// grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
|
||||||
|
|
||||||
.name {
|
// .name {
|
||||||
font-size: 0.9rem;
|
// font-size: 0.9rem;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user