Improved mobile detail pages
This commit is contained in:
1 parent
8f6f9ef78e
commit
cb6fa29e4b
2 files changed
+79
-8
No files matched your search
@@ -17,12 +17,14 @@ useHead({ title: computed(() => albumData.value ? `${albumData.value.name} - Alb
|
||||
|
||||
<template>
|
||||
<section class="info" v-if="albumData">
|
||||
<NuxtImg
|
||||
:src="GET_FILE(albumData.file)"
|
||||
width="300"
|
||||
height="300"
|
||||
placeholder
|
||||
/>
|
||||
<div class="album-art">
|
||||
<NuxtImg
|
||||
:src="GET_FILE(albumData.file)"
|
||||
width="300"
|
||||
height="300"
|
||||
placeholder
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="details">
|
||||
<h1>{{ albumData.name }}</h1>
|
||||
@@ -31,13 +33,15 @@ useHead({ title: computed(() => albumData.value ? `${albumData.value.name} - Alb
|
||||
<div class="buttons">
|
||||
<Button
|
||||
icon-name="lucide:play"
|
||||
:aria-label="`Play ${albumData.name}`"
|
||||
@click="() => playAlbum(tracks)"
|
||||
>Play</Button
|
||||
><span class="button-label">Play</span></Button
|
||||
>
|
||||
<Button
|
||||
icon-name="lucide:shuffle"
|
||||
:aria-label="`Shuffle ${albumData.name}`"
|
||||
@click="() => playShuffledAlbum(tracks)"
|
||||
>Shuffle</Button
|
||||
><span class="button-label">Shuffle</span></Button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
@@ -97,4 +101,57 @@ useHead({ title: computed(() => albumData.value ? `${albumData.value.name} - Alb
|
||||
flex-direction: column;
|
||||
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>
|
||||
Reference in new issue
Block a user