From 7d0f38755b934b28058230d00d3ec226fb0c9b97 Mon Sep 17 00:00:00 2001 From: geoffrey45 Date: Sun, 12 Dec 2021 02:49:42 +0300 Subject: [PATCH] add albums from the same artist to album view --- src/assets/css/global.scss | 46 ++++ src/components/AlbumView/AlbumBio.vue | 55 ++++ .../AlbumView/FromTheSameArtist.vue | 253 ++++++++++++++++++ src/components/AlbumView/SongList.vue | 94 ------- .../PlaylistView/FeaturedArtists.vue | 14 +- src/composables/scrolls.js | 17 ++ src/views/AlbumView.vue | 17 +- 7 files changed, 388 insertions(+), 108 deletions(-) create mode 100644 src/components/AlbumView/AlbumBio.vue create mode 100644 src/components/AlbumView/FromTheSameArtist.vue delete mode 100644 src/components/AlbumView/SongList.vue create mode 100644 src/composables/scrolls.js diff --git a/src/assets/css/global.scss b/src/assets/css/global.scss index db66e1ef..9ddc01e6 100644 --- a/src/assets/css/global.scss +++ b/src/assets/css/global.scss @@ -175,3 +175,49 @@ a { ::-webkit-scrollbar-thumb:hover { background: rgb(163, 163, 163); } + + +@-webkit-keyframes similarAlbums { + 0% { + background-position: 0% 38%; + } + 50% { + background-position: 100% 63%; + } + 100% { + background-position: 0% 38%; + } +} +@-moz-keyframes similarAlbums { + 0% { + background-position: 0% 38%; + } + 50% { + background-position: 100% 63%; + } + 100% { + background-position: 0% 38%; + } +} +@-o-keyframes similarAlbums { + 0% { + background-position: 0% 38%; + } + 50% { + background-position: 100% 63%; + } + 100% { + background-position: 0% 38%; + } +} +@keyframes similarAlbums { + 0% { + background-position: 0% 38%; + } + 50% { + background-position: 100% 63%; + } + 100% { + background-position: 0% 38%; + } +} \ No newline at end of file diff --git a/src/components/AlbumView/AlbumBio.vue b/src/components/AlbumView/AlbumBio.vue new file mode 100644 index 00000000..1e515a38 --- /dev/null +++ b/src/components/AlbumView/AlbumBio.vue @@ -0,0 +1,55 @@ + + + + + \ No newline at end of file diff --git a/src/components/AlbumView/FromTheSameArtist.vue b/src/components/AlbumView/FromTheSameArtist.vue new file mode 100644 index 00000000..64e65a5a --- /dev/null +++ b/src/components/AlbumView/FromTheSameArtist.vue @@ -0,0 +1,253 @@ + + + + \ No newline at end of file diff --git a/src/components/AlbumView/SongList.vue b/src/components/AlbumView/SongList.vue deleted file mode 100644 index ebf97eab..00000000 --- a/src/components/AlbumView/SongList.vue +++ /dev/null @@ -1,94 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/components/PlaylistView/FeaturedArtists.vue b/src/components/PlaylistView/FeaturedArtists.vue index 76fbb763..876c24fd 100644 --- a/src/components/PlaylistView/FeaturedArtists.vue +++ b/src/components/PlaylistView/FeaturedArtists.vue @@ -98,7 +98,7 @@ export default { width: 5rem; height: 2rem; position: absolute; - top: -.2rem; + top: -0.2rem; right: 0rem; display: flex; justify-content: space-between; @@ -193,7 +193,7 @@ export default { width: 10em; } &:hover { - transform: translateY(-.5em); + transform: translateY(-0.5em); transition: all 0.5s ease-in-out; } } @@ -223,18 +223,18 @@ export default { color: #ffffff; } - .blur { + .blur { position: absolute; width: 100%; height: 100%; background: rgba(0, 0, 0, 0); - backdrop-filter: blur(100px); - -webkit-backdrop-filter: blur(100px); - -moz-backdrop-filter: blur(100px); + backdrop-filter: blur(40px); + -webkit-backdrop-filter: blur(40px); + -moz-backdrop-filter: blur(40px); border-radius: $small; } - .s2 { + .s2 { position: absolute; left: -2em; bottom: -4em; diff --git a/src/composables/scrolls.js b/src/composables/scrolls.js new file mode 100644 index 00000000..f8960f25 --- /dev/null +++ b/src/composables/scrolls.js @@ -0,0 +1,17 @@ +const scrollLeftX = (artists_dom) => { + const dom = artists_dom.value; + dom.scrollBy({ + left: -700, + behavior: "smooth", + }); +}; + +const scrollRightX = (artists_dom) => { + const dom = artists_dom.value; + dom.scrollBy({ + left: 700, + behavior: "smooth", + }); +}; + +export { scrollLeftX, scrollRightX, }; \ No newline at end of file diff --git a/src/views/AlbumView.vue b/src/views/AlbumView.vue index 2b915960..9ed72195 100644 --- a/src/views/AlbumView.vue +++ b/src/views/AlbumView.vue @@ -1,5 +1,5 @@