feat: apply new layout for some special playlists

This commit is contained in:
qier222 2020-11-16 23:45:41 +08:00
parent 6a47e0cb40
commit 379ff6ac64
4 changed files with 334 additions and 8 deletions

View file

@ -1,6 +1,9 @@
<template>
<div v-show="show">
<div class="playlist-info" v-if="!isLikeSongsPage">
<div
class="playlist-info"
v-if="specialPlaylistInfo === undefined && !isLikeSongsPage"
>
<Cover
:url="playlist.coverImgUrl | resizeImage(1024)"
:showPlayButton="true"
@ -50,10 +53,11 @@
</ButtonTwoTone>
<ButtonTwoTone
v-if="accountLogin && playlist.creator.userId !== data.user.userId"
shape="round"
:iconClass="playlist.subscribed ? 'heart-solid' : 'heart'"
:iconButton="true"
:horizontalPadding="0"
color="grey"
:textColor="playlist.subscribed ? '#335eea' : ''"
@click.native="likePlaylist"
>
</ButtonTwoTone>
@ -61,7 +65,38 @@
</div>
</div>
<div class="user-info" v-else>
<div class="special-playlist" v-if="specialPlaylistInfo !== undefined">
<div class="title" :class="specialPlaylistInfo.gradient">
<!-- <img :src="playlist.coverImgUrl | resizeImage" /> -->
{{ specialPlaylistInfo.name }}
</div>
<div class="subtitle"
>{{ playlist.englishTitle }} · {{ playlist.updateFrequency }}
</div>
<div class="buttons" v-if="accountLogin">
<ButtonTwoTone
class="play-button"
@click.native="playPlaylistByID()"
iconClass="play"
color="grey"
>
{{ $t("play") }}
</ButtonTwoTone>
<ButtonTwoTone
v-if="accountLogin && playlist.creator.userId !== data.user.userId"
:iconClass="playlist.subscribed ? 'heart-solid' : 'heart'"
:iconButton="true"
:horizontalPadding="0"
color="grey"
:textColor="playlist.subscribed ? '#335eea' : ''"
@click.native="likePlaylist"
>
</ButtonTwoTone>
</div>
</div>
<div class="user-info" v-if="isLikeSongsPage">
<h1>
<img class="avatar" :src="data.user.avatarUrl | resizeImage" />{{
data.user.nickname
@ -100,6 +135,93 @@ import ButtonTwoTone from "@/components/ButtonTwoTone.vue";
import TrackList from "@/components/TrackList.vue";
import Cover from "@/components/Cover.vue";
const specialPlaylist = {
2829816518: {
name: "欧美私人订制",
gradient: "gradient-pink-purple-blue",
},
2890490211: {
name: "助眠鸟鸣声",
gradient: "gradient-green",
},
5089855855: {
name: "夜的胡思乱想",
gradient: "gradient-moonstone-blue",
},
2888212971: {
name: "全球百大DJ",
gradient: "gradient-orange-red",
},
2829733864: {
name: "睡眠伴侣",
gradient: "gradient-midnight-blue",
},
2829844572: {
name: "洗澡时听的歌",
gradient: "gradient-yellow",
},
2920647537: {
name: "还是会想你",
gradient: "gradient-dark-blue-midnight-blue",
},
2890501416: {
name: "助眠白噪声",
gradient: "gradient-sky-blue",
},
5217150082: {
name: "摇滚唱片行",
gradient: "gradient-yellow-red",
},
2829961453: {
name: "古风音乐大赏",
gradient: "gradient-fog",
},
4923261701: {
name: "Trance",
gradient: "gradient-light-red-light-blue ",
},
5212729721: {
name: "欧美点唱机",
gradient: "gradient-indigo-pink-yellow",
},
3103434282: {
name: "甜蜜少女心",
gradient: "gradient-pink",
},
2829896389: {
name: "日系私人订制",
gradient: "gradient-yellow-pink",
},
2829779628: {
name: "运动随身听",
gradient: "gradient-orange-red",
},
2860654884: {
name: "独立女声精选",
gradient: "gradient-sharp-blue",
},
898150: {
name: "浪漫婚礼专用",
gradient: "gradient-pink",
},
2638104052: {
name: "牛奶泡泡浴",
gradient: "gradient-fog",
},
5317236517: {
name: "后朋克精选",
gradient: "gradient-pink-purple-blue",
},
2821115454: {
name: "一周原创发现",
gradient: "gradient-blue-purple",
},
3136952023: {
name: "私人雷达",
gradient: "gradient-radar",
},
};
export default {
name: "Playlist",
components: {
@ -141,6 +263,9 @@ export default {
accountLogin() {
return isAccountLoggedIn();
},
specialPlaylistInfo() {
return specialPlaylist[this.playlist.id];
},
},
methods: {
...mapMutations(["appendTrackToPlayerList"]),
@ -221,7 +346,6 @@ export default {
<style lang="scss" scoped>
.playlist-info {
display: flex;
width: 78vw;
margin-bottom: 72px;
.info {
display: flex;
@ -316,6 +440,193 @@ export default {
}
}
.special-playlist {
margin-top: 192px;
margin-bottom: 128px;
border-radius: 1.25em;
text-align: center;
@keyframes letterSpacing4 {
from {
letter-spacing: 0px;
}
to {
letter-spacing: 4px;
}
}
@keyframes letterSpacing1 {
from {
letter-spacing: 0px;
}
to {
letter-spacing: 1px;
}
}
.title {
font-size: 84px;
line-height: 1.05;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 4px;
animation-duration: 0.8s;
animation-name: letterSpacing4;
-webkit-text-fill-color: transparent;
background-clip: text;
// background-image: linear-gradient(
// 225deg,
// var(--color-primary),
// var(--color-primary)
// );
img {
height: 78px;
border-radius: 0.125em;
margin-right: 24px;
}
}
.subtitle {
font-size: 18px;
letter-spacing: 1px;
margin: 28px 0 54px 0;
animation-duration: 0.8s;
animation-name: letterSpacing1;
text-transform: uppercase;
color: var(--color-text);
}
.buttons {
margin-top: 32px;
display: flex;
justify-content: center;
button {
margin-right: 16px;
}
}
}
.gradient-test {
background-image: linear-gradient(to left, #92fe9d 0%, #00c9ff 100%);
}
[data-theme="dark"] {
.gradient-radar {
background-image: linear-gradient(to left, #92fe9d 0%, #00c9ff 100%);
}
}
.gradient-radar {
background-image: linear-gradient(to left, #0ba360 0%, #3cba92 100%);
}
.gradient-blue-purple {
background-image: linear-gradient(
45deg,
#89c4f5 0%,
#6284ff 42%,
#ff0000 100%
);
}
.gradient-sharp-blue {
background-image: linear-gradient(45deg, #00c6fb 0%, #005bea 100%);
}
.gradient-yellow-pink {
background-image: linear-gradient(45deg, #f6d365 0%, #fda085 100%);
}
.gradient-pink {
background-image: linear-gradient(45deg, #ee9ca7 0%, #ffdde1 100%);
}
.gradient-indigo-pink-yellow {
background-image: linear-gradient(
43deg,
#4158d0 0%,
#c850c0 46%,
#ffcc70 100%
);
}
.gradient-light-red-light-blue {
background-image: linear-gradient(
225deg,
hsl(190, 30%, 50%) 0%,
#081abb 38%,
#ec3841 58%,
hsl(13, 99%, 49%) 100%
);
}
.gradient-fog {
background: linear-gradient(-180deg, #bcc5ce 0%, #929ead 98%),
radial-gradient(
at top left,
rgba(255, 255, 255, 0.3) 0%,
rgba(0, 0, 0, 0.3) 100%
);
background-blend-mode: screen;
}
.gradient-red {
background-image: linear-gradient(213deg, #ff0844 0%, #ffb199 100%);
}
.gradient-sky-blue {
background-image: linear-gradient(147deg, #48c6ef 0%, #6f86d6 100%);
}
.gradient-dark-blue-midnight-blue {
background-image: linear-gradient(213deg, #09203f 0%, #537895 100%);
}
.gradient-yellow-red {
background: linear-gradient(147deg, #fec867 0%, #f72c61 100%);
}
.gradient-yellow {
background: linear-gradient(147deg, #fceb02 0%, #fec401 100%);
}
.gradient-midnight-blue {
background-image: linear-gradient(-20deg, #2b5876 0%, #4e4376 100%);
}
.gradient-orange-red {
background-image: linear-gradient(147deg, #ffe53b 0%, #ff2525 74%);
}
.gradient-moonstone-blue {
background-image: linear-gradient(
147deg,
hsl(200, 34%, 8%) 0%,
hsl(204, 35%, 38%) 50%,
hsl(200, 34%, 18%) 100%
);
}
.gradient-pink-purple-blue {
background-image: linear-gradient(
to right,
#ff3cac 0%,
#784ba0 50%,
#2b86c5 100%
) !important;
}
.gradient-green {
background-image: linear-gradient(
90deg,
#c6f6d5,
#68d391,
#38b2ac
) !important;
}
.user-info {
h1 {
font-size: 42px;