Improved mobile detail pages
This commit is contained in:
1 parent
8f6f9ef78e
commit
cb6fa29e4b
2 files changed
+73
-2
No files matched your search
@@ -17,12 +17,14 @@ useHead({ title: computed(() => albumData.value ? `${albumData.value.name} - Alb
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<section class="info" v-if="albumData">
|
<section class="info" v-if="albumData">
|
||||||
|
<div class="album-art">
|
||||||
<NuxtImg
|
<NuxtImg
|
||||||
:src="GET_FILE(albumData.file)"
|
:src="GET_FILE(albumData.file)"
|
||||||
width="300"
|
width="300"
|
||||||
height="300"
|
height="300"
|
||||||
placeholder
|
placeholder
|
||||||
/>
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="details">
|
<div class="details">
|
||||||
<h1>{{ albumData.name }}</h1>
|
<h1>{{ albumData.name }}</h1>
|
||||||
@@ -31,13 +33,15 @@ useHead({ title: computed(() => albumData.value ? `${albumData.value.name} - Alb
|
|||||||
<div class="buttons">
|
<div class="buttons">
|
||||||
<Button
|
<Button
|
||||||
icon-name="lucide:play"
|
icon-name="lucide:play"
|
||||||
|
:aria-label="`Play ${albumData.name}`"
|
||||||
@click="() => playAlbum(tracks)"
|
@click="() => playAlbum(tracks)"
|
||||||
>Play</Button
|
><span class="button-label">Play</span></Button
|
||||||
>
|
>
|
||||||
<Button
|
<Button
|
||||||
icon-name="lucide:shuffle"
|
icon-name="lucide:shuffle"
|
||||||
|
:aria-label="`Shuffle ${albumData.name}`"
|
||||||
@click="() => playShuffledAlbum(tracks)"
|
@click="() => playShuffledAlbum(tracks)"
|
||||||
>Shuffle</Button
|
><span class="button-label">Shuffle</span></Button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -97,4 +101,57 @@ useHead({ title: computed(() => albumData.value ? `${albumData.value.name} - Alb
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 0.4rem;
|
gap: 0.4rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 767px) {
|
||||||
|
.info {
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: stretch;
|
||||||
|
gap: 0.25rem;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
|
||||||
|
.album-art {
|
||||||
|
padding: 0.5rem;
|
||||||
|
|
||||||
|
img {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.info .details {
|
||||||
|
align-items: center;
|
||||||
|
padding-top: 0;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
margin: 0;
|
||||||
|
@include util.fontSize(26px);
|
||||||
|
line-height: 1.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.artist {
|
||||||
|
@include util.fontSize(16px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.buttons {
|
||||||
|
margin-top: 0.375rem;
|
||||||
|
gap: 0.75rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.details .buttons :deep(.button) {
|
||||||
|
padding: 0.75rem;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.details .buttons :deep(.icon-wrapper) {
|
||||||
|
font-size: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.details .buttons :deep(.button-label) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -21,6 +21,7 @@ useHead({ title: "Artist Songs" })
|
|||||||
:track="track"
|
:track="track"
|
||||||
:index="i"
|
:index="i"
|
||||||
show-image
|
show-image
|
||||||
|
touch-friendly
|
||||||
@play-album-at-index="() => playAlbumAtIndex(tracks, i)"
|
@play-album-at-index="() => playAlbumAtIndex(tracks, i)"
|
||||||
/>
|
/>
|
||||||
</section>
|
</section>
|
||||||
@@ -41,4 +42,17 @@ useHead({ title: "Artist Songs" })
|
|||||||
|
|
||||||
margin-bottom: 1.5rem;
|
margin-bottom: 1.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 767px) {
|
||||||
|
.title {
|
||||||
|
@include fontSize(26px);
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tracks :deep(.track.image) {
|
||||||
|
grid-template-columns: 40px minmax(0, 1fr) auto auto;
|
||||||
|
gap: 0.5rem;
|
||||||
|
padding-inline: 0.5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
Reference in new issue
Block a user