Improved mobile artist carousels
This commit is contained in:
1 parent
f202f07585
commit
1fce02ad84
4 files changed
+95
-9
No files matched your search
@@ -4,13 +4,14 @@ import type { Album } from "@/utils/types"
|
||||
type AlbumProps = Omit<Omit<Album, "genre">, "artists"> & {
|
||||
artists: Array<Omit<Artist, "file">>
|
||||
genre?: Genre
|
||||
carousel?: boolean
|
||||
}
|
||||
|
||||
const props = defineProps<AlbumProps>()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<article class="card">
|
||||
<article class="card" :class="{ carousel: props.carousel }">
|
||||
<NuxtLink :to="`/album/${props._id}`">
|
||||
<NuxtImg
|
||||
:src="props.file"
|
||||
@@ -48,4 +49,16 @@ const props = defineProps<AlbumProps>()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.card.carousel {
|
||||
min-width: 0;
|
||||
max-width: none;
|
||||
flex: 0 0 calc(45.455% - 9.091px);
|
||||
|
||||
& > a > img {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user