mirror of
https://github.com/tcsenpai/swingmusic.git
synced 2025-07-04 00:30:11 +00:00
redesign the album bio component
This commit is contained in:
parent
4688665156
commit
cdab85912f
@ -58,6 +58,10 @@ a {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.grid {
|
||||||
|
display: grid;
|
||||||
|
}
|
||||||
|
|
||||||
.card-dark {
|
.card-dark {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
@ -1,24 +1,44 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="al-bio rounded border">
|
<div class="al-bio rounded">
|
||||||
<div class="left rounded border">
|
<div class="separator" id="av-sep"></div>
|
||||||
<div class="rect rounded"></div>
|
<div class="grid albumbio">
|
||||||
|
<div class="left rounded">
|
||||||
|
<img
|
||||||
|
class="rect rounded"
|
||||||
|
:src="paths.images.thumb + images.album"
|
||||||
|
alt=""
|
||||||
|
/>
|
||||||
<div class="circle"></div>
|
<div class="circle"></div>
|
||||||
|
<img class="circle" :src="paths.images.artist + images.artist" alt="" />
|
||||||
|
</div>
|
||||||
|
<div class="bio rounded border" v-html="bio" v-if="bio"></div>
|
||||||
|
<div class="bio rounded border" v-else>No bio found</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="bio rounded" v-html="bio"></div>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { paths } from "@/config";
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
bio: string;
|
bio: string;
|
||||||
|
images: {
|
||||||
|
artist: string;
|
||||||
|
album: string;
|
||||||
|
};
|
||||||
}>();
|
}>();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.al-bio {
|
.al-bio {
|
||||||
padding: $small;
|
padding: $small;
|
||||||
|
|
||||||
|
.albumbio {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr 1fr;
|
grid-template-columns: 1fr 1fr;
|
||||||
|
gap: $small;
|
||||||
|
min-height: 15rem;
|
||||||
|
}
|
||||||
|
|
||||||
@include tablet-portrait {
|
@include tablet-portrait {
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
@ -28,17 +48,14 @@ defineProps<{
|
|||||||
grid-template-columns: 1fr auto;
|
grid-template-columns: 1fr auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
gap: $small;
|
|
||||||
min-height: 15rem;
|
|
||||||
|
|
||||||
.left {
|
.left {
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-right: $small;
|
margin-right: $small;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background-image: url("../../assets/images/eggs.jpg");
|
border: solid 1px $gray5;
|
||||||
background-position: center;
|
background-image: linear-gradient(37deg, $gray5 20%, $gray4);
|
||||||
|
|
||||||
@include tablet-portrait {
|
@include tablet-portrait {
|
||||||
display: none;
|
display: none;
|
||||||
@ -52,36 +69,40 @@ defineProps<{
|
|||||||
width: 10rem;
|
width: 10rem;
|
||||||
height: 10rem;
|
height: 10rem;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
background-color: rgb(196, 58, 58);
|
bottom: 0rem;
|
||||||
box-shadow: 0 0 2rem rgb(0, 0, 0);
|
|
||||||
bottom: -10rem;
|
|
||||||
left: 7rem;
|
left: 7rem;
|
||||||
transform: rotate(45deg) translate(-1rem, -9rem);
|
transform: rotate(15deg) translate(-1rem, 1rem);
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
transition: all 0.5s ease-in-out;
|
transition: all 0.5s ease-in-out;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
|
transform: rotate(0deg) translate(-1rem, 0) scale(1.1);
|
||||||
transition: all 0.5s ease-in-out;
|
transition: all 0.5s ease-in-out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.circle {
|
.circle {
|
||||||
|
position: absolute;
|
||||||
width: 7rem;
|
width: 7rem;
|
||||||
height: 7rem;
|
height: 7rem;
|
||||||
position: absolute;
|
left: 15rem;
|
||||||
right: 0;
|
bottom: 0;
|
||||||
background-color: $blue;
|
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
transform: translateX(-11rem) translateY(7rem);
|
|
||||||
box-shadow: 0 0 2rem rgb(0, 0, 0);
|
box-shadow: 0 0 2rem rgb(0, 0, 0);
|
||||||
|
transition: all 0.25s ease-in-out;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
transform: scale(1.5);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.bio {
|
.bio {
|
||||||
|
border: solid 1px $gray5;
|
||||||
padding: $small;
|
padding: $small;
|
||||||
line-height: 1.5rem;
|
line-height: 1.5rem;
|
||||||
|
|
||||||
&::after {
|
&::after {
|
||||||
content: "...";
|
content: " ...";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,7 @@ import useAlbumStore from "@/stores/pages/album";
|
|||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import { playSources } from "../../composables/enums";
|
import { playSources } from "../../composables/enums";
|
||||||
import { formatSeconds } from "../../composables/perks";
|
import { formatSeconds } from "../../composables/perks";
|
||||||
import { paths } from "../../config";
|
import { paths } from "@/config";
|
||||||
import { AlbumInfo } from "../../interfaces";
|
import { AlbumInfo } from "../../interfaces";
|
||||||
import PlayBtnRect from "../shared/PlayBtnRect.vue";
|
import PlayBtnRect from "../shared/PlayBtnRect.vue";
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ function updateQueue(track: Track) {
|
|||||||
|
|
||||||
function getTracks() {
|
function getTracks() {
|
||||||
if (props.on_album_page) {
|
if (props.on_album_page) {
|
||||||
let tracks = props.tracks.map((track, index) => {
|
let tracks = props.tracks.map((track) => {
|
||||||
track.index = track.tracknumber;
|
track.index = track.tracknumber;
|
||||||
return track;
|
return track;
|
||||||
});
|
});
|
||||||
|
@ -18,6 +18,7 @@ const routes = [
|
|||||||
path: "/",
|
path: "/",
|
||||||
name: "Home",
|
name: "Home",
|
||||||
component: Home,
|
component: Home,
|
||||||
|
redirect: '/folder/$home'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/folder/:path",
|
path: "/folder/:path",
|
||||||
|
@ -22,7 +22,7 @@ export default defineStore("album", {
|
|||||||
info: <AlbumInfo>{},
|
info: <AlbumInfo>{},
|
||||||
tracks: <Track[]>[],
|
tracks: <Track[]>[],
|
||||||
artists: <Artist[]>[],
|
artists: <Artist[]>[],
|
||||||
bio: null,
|
bio: "HELLBOY is the fourth & final mixtape by Lil Peep, released on September 25, 2016. The mixtape caught people’s attention, pushing him into the mainstream light. The title HELLBOY is a reference to the animated movie Hellboy Animated: Blood and Iron, as Peep explains in a GQ interview. This album’s title was explained by Smokeasac, who produced many songs on this album: 'I remember when we made “Hellboy”. He explained to me why he chose the name. He explained that it was because he knew that “Hellboy” came off as intimidating and scary to some but it was because he ",
|
||||||
}),
|
}),
|
||||||
actions: {
|
actions: {
|
||||||
/**
|
/**
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="bottom-content">
|
<div class="bottom-content">
|
||||||
<FeaturedArtists :artists="artists" />
|
<FeaturedArtists :artists="artists" />
|
||||||
<div v-if="bio">
|
|
||||||
<div class="separator" id="av-sep"></div>
|
<AlbumBio :bio="bio" :images="{ album: image, artist: artists[0].image }" />
|
||||||
<AlbumBio :bio="bio" />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -16,6 +14,7 @@ import AlbumBio from "@/components/AlbumView/AlbumBio.vue";
|
|||||||
defineProps<{
|
defineProps<{
|
||||||
artists: Artist[];
|
artists: Artist[];
|
||||||
bio: string | null;
|
bio: string | null;
|
||||||
|
image: string;
|
||||||
}>();
|
}>();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -7,14 +7,22 @@
|
|||||||
<Content :tracks="album.tracks" />
|
<Content :tracks="album.tracks" />
|
||||||
</template>
|
</template>
|
||||||
<template #bottom>
|
<template #bottom>
|
||||||
<Bottom :artists="album.artists" :bio="album.bio" />
|
<Bottom
|
||||||
|
:artists="album.artists"
|
||||||
|
:bio="album.bio"
|
||||||
|
:image="album.info.image"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
</Page>
|
</Page>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import useAStore from "@/stores/pages/album";
|
import useAStore from "@/stores/pages/album";
|
||||||
import { onBeforeRouteUpdate, RouteLocationNormalized, RouteParams } from "vue-router";
|
import {
|
||||||
|
onBeforeRouteUpdate,
|
||||||
|
RouteLocationNormalized,
|
||||||
|
RouteParams,
|
||||||
|
} from "vue-router";
|
||||||
|
|
||||||
import Page from "@/layouts/HeaderContentBottom.vue";
|
import Page from "@/layouts/HeaderContentBottom.vue";
|
||||||
import Bottom from "./Bottom.vue";
|
import Bottom from "./Bottom.vue";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user