From c4e45462bdf97df5fd285e1b09ed2bb26eb83c4b Mon Sep 17 00:00:00 2001 From: RemixDev Date: Sat, 25 Apr 2020 11:01:30 +0200 Subject: [PATCH] Added track preview funciton --- public/css/modules/track-preview.css | 22 +++++++ public/css/style.css | 1 + public/index.html | 37 ++++++----- public/js/app.js | 2 + public/js/modules/main-search.js | 4 ++ public/js/modules/tabs.js | 3 + public/js/modules/track-preview.js | 91 ++++++++++++++++++++++++++++ public/js/modules/tracklist-tab.js | 2 + 8 files changed, 146 insertions(+), 16 deletions(-) create mode 100644 public/css/modules/track-preview.css create mode 100644 public/js/modules/track-preview.js diff --git a/public/css/modules/track-preview.css b/public/css/modules/track-preview.css new file mode 100644 index 0000000..31f7e0e --- /dev/null +++ b/public/css/modules/track-preview.css @@ -0,0 +1,22 @@ +.preview_controls { + opacity: 0; + display: block; + background: rgba(0, 0, 0, .5); + width: 56px; + height: 56px; + text-align: center; + line-height: 56px; + position: absolute; + border-radius: 5px; + top: 0; + right: 0; +} +.preview_playlist_controls{ + cursor:pointer; +} + +a.single-cover { + position: relative; + display: inline-block; + color: white; +} diff --git a/public/css/style.css b/public/css/style.css index e42799e..91f8148 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -14,3 +14,4 @@ @import './modules/settings.css'; @import './modules/main-search.css'; @import './modules/download-tab.css'; +@import './modules/track-preview.css'; diff --git a/public/index.html b/public/index.html index 63940f1..7374805 100644 --- a/public/index.html +++ b/public/index.html @@ -16,19 +16,19 @@
@@ -159,8 +159,9 @@

No Tracks found

- + + play_arrow + {{track.title + (track.title_version ? ' '+track.title_version : '')}} {{track.artist.name}} @@ -533,11 +534,10 @@

{{ metadata }} - play_arrow + play_arrow {{ track.track_position }} explicit{{ track.title }} {{track.title_version}} + class="material-icons">explicit{{ track.title + (track.title_version && track.title.indexOf(track.title_version) == -1 ? ' '+track.title_version : '') }} {{ track.artist.name }} @@ -578,7 +578,12 @@

{{ metadata }}

-