minor changes to the albums explorer

This commit is contained in:
geoffrey45
2021-12-11 23:32:11 +03:00
parent 24741640ea
commit 9caeab9626
7 changed files with 330 additions and 2 deletions
+1
View File
@@ -4,6 +4,7 @@
}
* {
user-select: none;
box-sizing: border-box;
}
+1 -1
View File
@@ -111,7 +111,7 @@ export default {
height: 1.2rem;
width: 1.2rem;
background-image: url(../../assets/icons/play.svg);
background-size: contain;
background-size: 96%;
background-repeat: no-repeat;
background-position: center;
transition: all 0.2s ease-in-out;
@@ -0,0 +1,135 @@
<template>
<div class="artists-view rounded">
<div class="al-header">
<div class="heading">ALL ARTISTS</div>
<div class="search">
<input type="search" placeholder="Search artists" />
</div>
</div>
<div class="all-albums">
<div class="item rounded" v-for="artist in artists" :key="artist">
<div class="album-art image rounded"></div>
<div class="name ellip">{{ artist.name }}</div>
</div>
</div>
</div>
</template>
<script>
export default {
setup() {
const artists = [
{
name: "Juice Wrld",
},
{
name: "Eminem",
},
{
name: "Sting",
},
{
name: "Juice Wrld",
},
{
name: "Eminem",
},
{
name: "Sting",
},
{
name: "Juice Wrld",
},
];
return {
artists,
};
},
};
</script>
<style lang="scss">
.artists-view {
height: calc(100% - 14.5rem);
padding: $small;
margin-top: $small;
overflow: hidden;
background-color: $card-dark;
.all-albums {
height: calc(100% - 4rem);
border-top: 1px solid $separator;
padding: $small 0 0 0;
overflow-y: auto;
.item {
position: relative;
width: 10.9rem;
height: 12rem;
padding: $small 0.95rem $small 0.95rem;
margin: $smaller;
transition: all 0.2s ease-in-out;
cursor: pointer;
float: left;
&:hover {
background-color: rgb(74, 84, 87);
// border: solid
}
.album-art {
height: 9em;
width: 9em;
border-radius: 50%;
background-image: url(../../assets/images/girl1.jpg);
}
.name {
text-align: center;
margin-top: $small;
}
.artist {
font-size: small;
font-weight: lighter;
text-align: center;
color: rgba(255, 255, 255, 0.699);
}
}
}
.al-header {
display: flex;
align-items: center;
position: relative;
height: 4em;
padding: 0 $small 0 $small;
.search {
position: absolute;
right: 0;
padding-right: $small;
input {
width: 30rem;
border: none;
border-radius: 2rem;
padding-left: 1rem;
background-color: #4645456c;
color: rgba(255, 255, 255, 0.521);
font-size: 1rem;
line-height: 3rem;
outline: none;
}
input::-webkit-search-cancel-button {
position: relative;
right: 20px;
cursor: pointer;
width: 50px;
height: 50px;
}
}
}
}
</style>
@@ -0,0 +1,161 @@
<template>
<div class="top-artists">
<div class="heading">TOP ARTISTS</div>
<div class="items">
<div class="item rounded" v-for="artist in artists" :key="artist">
<div class="image"></div>
<div class="info">
<div class="name ellip">{{ artist.name }}</div>
<div class="artist ellip">{{ artist.album_count }} Albums</div>
<div class="separator"></div>
<div class="top">
<div class="play-icon"></div>
<div class="text ellip">{{ artist.top_track }}</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
setup() {
const artists = [
{
name: "Sting",
album_count: "12",
top_track: "Alien in Newyork",
},
{
name: "Juice Wrld",
album_count: "4",
top_track: "Girl Of My Dreams",
},
{
name: "Lil Peep",
album_count: "6",
top_track: "Haunt U",
},
];
return {
artists,
};
},
};
</script>
<style lang="scss">
.top-artists {
height: 14rem;
border-radius: $small;
background-color: $card-dark;
padding: $small;
.heading {
margin: $small 0 1.5em $small;
}
.items {
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-gap: $small;
.item {
height: 10rem;
width: 100%;
max-width: 25rem;
background-color: rgb(7, 6, 6);
display: grid;
align-items: center;
grid-template-columns: 7.5rem 1fr;
padding: $small;
cursor: pointer;
transition: all 0.2s ease-in-out;
&:hover {
transform: translateY(-.5em);
}
.image {
height: 7rem;
width: 7rem;
background-image: url(../../assets/images/girl1.jpg);
border-radius: 50%;
}
.info .name {
font-size: 1.5rem;
font-weight: bold;
}
.info .artist {
font-size: small;
color: rgba(255, 255, 255, 0.699);
}
.info .top {
height: 2.5rem;
background-color: rgb(51, 129, 20);
border-radius: $small;
margin-left: auto;
display: grid;
grid-template-columns: 2.5rem 1fr;
align-items: center;
transition: all 0.2s ease-in-out;
user-select: none;
.play-icon {
margin: 0 0 0 $small;
height: 1.2rem;
width: 1.2rem;
background-image: url(../../assets/icons/play.svg);
background-size: 96%;
background-repeat: no-repeat;
background-position: center;
transition: all 0.2s ease-in-out;
}
.text {
color: white;
}
&:hover {
background-color: rgb(0, 134, 89);
transition: all 0.2s ease-in-out;
.play-icon {
transform: scale(1.2);
transition: all 0.2s ease-in-out;
}
}
&:active {
transform: scale(0.95);
transition: all 0.1s ease-in-out;
}
}
&:first-child {
background-color: rgb(177, 116, 2);
.image {
background-image: url(../../assets/images/girl2.jpg);
}
}
&:nth-child(2){
background-color: rgb(0, 74, 117);
.image {
background-image: url(../../assets/images/girl3.jpg);
}
}
&:nth-child(3){
background-color: rgb(161, 106, 106);
}
}
}
}
</style>
+1 -1
View File
@@ -18,7 +18,7 @@
</div>
</router-link>
<hr />
<router-link :to="{ name: 'Home' }">
<router-link :to="{ name: 'ArtistsExplorer' }">
<div class="nav-button" id="artists-button">
<div class="in">
<div class="nav-icon image" id="artists-icon"></div>
+6
View File
@@ -3,6 +3,7 @@ import Home from "../views/Home.vue";
import FolderView from "../views/FolderView.vue";
import PlaylistView from "../views/PlaylistView.vue";
import AlbumsExplorer from "../views/AlbumsExplorer.vue";
import ArtistsExplorer from "../views/ArtistsExplorer.vue";
const routes = [
{
@@ -24,6 +25,11 @@ const routes = [
path: "/albums",
name: "AlbumsExplorer",
component: AlbumsExplorer,
},
{
path: "/artists",
name: "ArtistsExplorer",
component: ArtistsExplorer,
}
];
+25
View File
@@ -0,0 +1,25 @@
<template>
<div class="a-container">
<TopArtists />
<Artists />
</div>
</template>
<script>
import TopArtists from "../components/ArtistsExplorer/TopArtists.vue";
import Artists from "../components/ArtistsExplorer/ArtistsList.vue";
export default {
components: {
TopArtists,
Artists
},
};
</script>
<style lang="scss">
.a-container {
height: 100%;
border-radius: $small;
}
</style>