mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-03 20:13:02 +00:00
add all albums view
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
--separator: #ffffff46;
|
--separator: #ffffff46;
|
||||||
--green: #4ad168;
|
--green: #4ad168;
|
||||||
}
|
}
|
||||||
|
|
||||||
* {
|
* {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
@@ -36,7 +37,7 @@ a {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.separator {
|
.separator {
|
||||||
border-top: .1em $separator solid;
|
border-top: .1px $separator solid;
|
||||||
color: transparent;
|
color: transparent;
|
||||||
margin: $small 0 $small 0;
|
margin: $small 0 $small 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,19 +1,89 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="albums-view rounded">
|
<div class="albums-view rounded">
|
||||||
<div class="al-header rounded">
|
<div class="al-header">
|
||||||
<div class="heading">ALL ALBUMS</div>
|
<div class="heading">ALL ALBUMS</div>
|
||||||
<div class="search" >
|
<div class="search">
|
||||||
<input type="search" placeholder="Search albums">
|
<input type="search" placeholder="Search albums" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="all-albums">
|
||||||
|
<div class="item rounded" v-for="album in albums" :key="album">
|
||||||
|
<div class="play"></div>
|
||||||
|
<div class="album-art image rounded"></div>
|
||||||
|
<div class="name ellip">{{album.title}}</div>
|
||||||
|
<div class="artist ellip">{{album.artist}}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="all-albums"></div>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
setup() {
|
setup() {
|
||||||
const albums = [
|
const albums = [
|
||||||
|
|
||||||
{
|
{
|
||||||
|
title: "Album 2 af sjf s d kjf saf ",
|
||||||
|
artist: "Artist ad asd f adf d da df d adf ds d fadsf fs dfds sf dadf d",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Album 3",
|
||||||
|
artist: "Artist 3",
|
||||||
|
},{
|
||||||
|
title: "Album 1",
|
||||||
|
artist: "Artist 1",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Album 2",
|
||||||
|
artist: "Artist 2",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Album 3",
|
||||||
|
artist: "Artist 3",
|
||||||
|
},{
|
||||||
|
title: "Album 1",
|
||||||
|
artist: "Artist 1",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Album 2",
|
||||||
|
artist: "Artist 2",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Album 3",
|
||||||
|
artist: "Artist 3",
|
||||||
|
},{
|
||||||
|
title: "Album 1",
|
||||||
|
artist: "Artist 1",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Album 2",
|
||||||
|
artist: "Artist 2",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Album 3",
|
||||||
|
artist: "Artist 3",
|
||||||
|
},{
|
||||||
|
title: "Album 1",
|
||||||
|
artist: "Artist 1",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Album 2",
|
||||||
|
artist: "Artist 2",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Album 3",
|
||||||
|
artist: "Artist 3",
|
||||||
|
},{
|
||||||
|
title: "Album 1",
|
||||||
|
artist: "Artist 1",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Album 2",
|
||||||
|
artist: "Artist 2",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Album 3",
|
||||||
|
artist: "Artist 3",
|
||||||
|
},{
|
||||||
title: "Album 1",
|
title: "Album 1",
|
||||||
artist: "Artist 1",
|
artist: "Artist 1",
|
||||||
},
|
},
|
||||||
@@ -36,24 +106,101 @@ export default {
|
|||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.albums-view {
|
.albums-view {
|
||||||
height: calc(100% - 13rem);
|
height: calc(100% - 14.5rem);
|
||||||
padding: $small;
|
padding: $small;
|
||||||
margin-top: $small;
|
margin-top: $small;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background-color: $card-dark;
|
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: 13rem;
|
||||||
|
padding: $small 0.95rem $small 0.95rem;
|
||||||
|
margin: $smaller;
|
||||||
|
transition: all 0.2s ease-in-out;
|
||||||
|
cursor: pointer;
|
||||||
|
float: left;
|
||||||
|
|
||||||
|
.play {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 3rem;
|
||||||
|
left: $small;
|
||||||
|
height: 3rem;
|
||||||
|
width: 3rem;
|
||||||
|
background: url(../../assets/icons/play.svg) no-repeat center;
|
||||||
|
background-size: 60%;
|
||||||
|
cursor: pointer;
|
||||||
|
opacity: 0;
|
||||||
|
transition: all 0.5s ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: rgb(87, 74, 74);
|
||||||
|
|
||||||
|
.play {
|
||||||
|
transition: 0.5s all ease;
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.album-art {
|
||||||
|
height: 9em;
|
||||||
|
width: 9em;
|
||||||
|
background-image: url(../../assets/images/girl1.jpg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.name {
|
||||||
|
text-align: left;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-top: $small;
|
||||||
|
}
|
||||||
|
|
||||||
|
.artist {
|
||||||
|
font-size: small;
|
||||||
|
font-weight: lighter;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.al-header {
|
.al-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
position: relative;
|
position: relative;
|
||||||
background-color: rgb(48, 43, 43);
|
|
||||||
// border: solid;
|
|
||||||
height: 4em;
|
height: 4em;
|
||||||
// padding: $small;
|
padding: 0 $small 0 $small;
|
||||||
|
|
||||||
.search {
|
.search {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,13 +48,13 @@ export default {
|
|||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.top-albums {
|
.top-albums {
|
||||||
height: 12.5rem;
|
height: 14rem;
|
||||||
border-radius: $small;
|
border-radius: $small;
|
||||||
background-color: rgb(44, 42, 42);
|
background-color: $card-dark;
|
||||||
padding: $small;
|
padding: $small;
|
||||||
|
|
||||||
.heading {
|
.heading {
|
||||||
margin: 0 0 $small;
|
margin: $small 0 1.5em $small;
|
||||||
}
|
}
|
||||||
|
|
||||||
.items {
|
.items {
|
||||||
@@ -73,10 +73,14 @@ export default {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: all 0.2s ease-in-out;
|
transition: all 0.2s ease-in-out;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
transform: translateY(-.5em);
|
||||||
|
}
|
||||||
|
|
||||||
.image {
|
.image {
|
||||||
height: 7rem;
|
height: 7rem;
|
||||||
width: 7rem;
|
width: 7rem;
|
||||||
background-image: url(../../assets/images/tk.jpg);
|
background-image: url(../../assets/images/girl1.jpg);
|
||||||
border-radius: $small;
|
border-radius: $small;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -91,7 +95,7 @@ export default {
|
|||||||
|
|
||||||
.info .top {
|
.info .top {
|
||||||
height: 2.5rem;
|
height: 2.5rem;
|
||||||
background-color: rgb(20, 46, 129);
|
background-color: rgb(51, 129, 20);
|
||||||
border-radius: $small;
|
border-radius: $small;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
display: grid;
|
display: grid;
|
||||||
@@ -102,8 +106,8 @@ export default {
|
|||||||
|
|
||||||
.play-icon {
|
.play-icon {
|
||||||
margin: 0 0 0 $small;
|
margin: 0 0 0 $small;
|
||||||
height: 1.5rem;
|
height: 1.2rem;
|
||||||
width: 1.5rem;
|
width: 1.2rem;
|
||||||
background-image: url(../../assets/icons/play.svg);
|
background-image: url(../../assets/icons/play.svg);
|
||||||
background-size: contain;
|
background-size: contain;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
@@ -116,7 +120,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: rgb(31, 68, 150);
|
background-color: rgb(0, 134, 89);
|
||||||
transition: all 0.2s ease-in-out;
|
transition: all 0.2s ease-in-out;
|
||||||
|
|
||||||
.play-icon {
|
.play-icon {
|
||||||
@@ -130,6 +134,25 @@ export default {
|
|||||||
transition: all 0.1s ease-in-out;
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,6 +63,6 @@ export default {};
|
|||||||
|
|
||||||
.folder-top .fsearch input:focus {
|
.folder-top .fsearch input:focus {
|
||||||
color: rgb(255, 255, 255);
|
color: rgb(255, 255, 255);
|
||||||
outline: 0.1rem solid #fafafa52;
|
outline: 1px solid #fafafa52;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -72,17 +72,23 @@ export default {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style lang="scss">
|
||||||
.table {
|
.table {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
height: calc(100%);
|
||||||
background: transparent;
|
background: transparent;
|
||||||
overflow: hidden;
|
overflow-y: auto;
|
||||||
|
|
||||||
|
&::-webkit-scrollbar {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.folder .table table {
|
.folder .table table {
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
text-transform: capitalize;
|
text-transform: capitalize;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.folder .table table td .album-art {
|
.folder .table table td .album-art {
|
||||||
@@ -111,7 +117,7 @@ th {
|
|||||||
}
|
}
|
||||||
|
|
||||||
th {
|
th {
|
||||||
height: 2em;
|
height: 3rem;
|
||||||
}
|
}
|
||||||
tr:nth-child(even) {
|
tr:nth-child(even) {
|
||||||
background-color: rgba(29, 29, 29, 0.767);
|
background-color: rgba(29, 29, 29, 0.767);
|
||||||
|
|||||||
@@ -0,0 +1,94 @@
|
|||||||
|
<template>
|
||||||
|
<div class="folder" id="p-table">
|
||||||
|
<div class="table rounded" ref="songtitle">
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th>Track</th>
|
||||||
|
<th>Artist</th>
|
||||||
|
<th>Album</th>
|
||||||
|
<th v-if="songTitleWidth > minWidth">Duration</th>
|
||||||
|
</tr>
|
||||||
|
<tr v-for="song in songs" :key="song">
|
||||||
|
<td :style="{ width: songTitleWidth + 'px' }" class="flex">
|
||||||
|
<div class="album-art rounded image"></div>
|
||||||
|
<div>
|
||||||
|
<span class="ellipsis">{{ song.title }}</span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td :style="{ width: songTitleWidth + 'px' }">
|
||||||
|
<span class="artist" v-for="artist in song.artists" :key="artist">{{
|
||||||
|
artist
|
||||||
|
}}</span>
|
||||||
|
</td>
|
||||||
|
<td :style="{ width: songTitleWidth + 'px' }">{{ song.album }}</td>
|
||||||
|
<td
|
||||||
|
:style="{ width: songTitleWidth + 'px' }"
|
||||||
|
v-if="songTitleWidth > minWidth"
|
||||||
|
>
|
||||||
|
{{ song.duration }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { ref } from "@vue/reactivity";
|
||||||
|
import { onMounted, onUnmounted } from "@vue/runtime-core";
|
||||||
|
import Songs from "../../data/songs.js";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
setup() {
|
||||||
|
const songtitle = ref(null);
|
||||||
|
const songTitleWidth = ref(null);
|
||||||
|
|
||||||
|
const minWidth = ref(300);
|
||||||
|
|
||||||
|
const songs = Songs.songs;
|
||||||
|
|
||||||
|
const resizeSongTitleWidth = () => {
|
||||||
|
let a = songtitle.value.clientWidth;
|
||||||
|
|
||||||
|
songTitleWidth.value = a > minWidth.value * 4 ? a / 4 : a / 3;
|
||||||
|
};
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
resizeSongTitleWidth();
|
||||||
|
|
||||||
|
window.addEventListener("resize", () => {
|
||||||
|
resizeSongTitleWidth();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
onUnmounted(() => {
|
||||||
|
window.removeEventListener("resize", () => {
|
||||||
|
resizeSongTitleWidth();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
return { songtitle, songTitleWidth, songs, minWidth };
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
#p-table {
|
||||||
|
height: calc(100% - 0rem) !important;
|
||||||
|
overflow: hidden;
|
||||||
|
padding-bottom: 0rem;
|
||||||
|
|
||||||
|
table {
|
||||||
|
&::-webkit-scrollbar {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
th {
|
||||||
|
position: sticky;
|
||||||
|
background-color: rgb(58, 57, 57);
|
||||||
|
top: 0;
|
||||||
|
z-index: 5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -21,7 +21,5 @@ export default {
|
|||||||
.a-container {
|
.a-container {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
border-radius: $small;
|
border-radius: $small;
|
||||||
// background-color: $card-dark;
|
|
||||||
// padding: $small;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Header from "@/components/PlaylistView/Header.vue";
|
import Header from "@/components/PlaylistView/Header.vue";
|
||||||
import SongList from "@/components/FolderView/SongList.vue";
|
import SongList from "@/components/PlaylistView/SongList.vue";
|
||||||
import FeaturedArtists from "@/components/PlaylistView/FeaturedArtists.vue";
|
import FeaturedArtists from "@/components/PlaylistView/FeaturedArtists.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -46,8 +46,6 @@ export default {
|
|||||||
.p-bg .scrollable {
|
.p-bg .scrollable {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
border-radius: $small;
|
border-radius: $small;
|
||||||
overflow-y: auto;
|
|
||||||
padding-right: $small;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-bg .f-artists {
|
.p-bg .f-artists {
|
||||||
|
|||||||
Reference in New Issue
Block a user