diff --git a/static/controls.js b/static/controls.js index 9748f64..7d373d2 100644 --- a/static/controls.js +++ b/static/controls.js @@ -21,6 +21,45 @@ const control_volume_down = document.getElementById("control-volume-down"); const queue_table = document.querySelector("#queue tbody"); const control_track = document.getElementById("control-track"); const control_time = document.getElementById("control-time"); +const tabs = document.getElementById("tabs"); +const tab_browser = document.getElementById("tab-browser"); +const tab_search = document.getElementById("tab-search"); +const tab_playlists = document.getElementById("tab-playlists"); + +// UI controls + +tab_browser.addEventListener("click", e => { + if (!tab_browser.classList.contains("active")) { + tab_browser.classList.add("active"); + tab_search.classList.remove("active") + tab_playlists.classList.remove("active") + document.getElementById("file-browser").style.display = "block"; + document.getElementById("search").style.display = "none"; + document.getElementById("playlist-browser").style.display = "none"; + } +}); + +tab_search.addEventListener("click", e => { + if (!tab_search.classList.contains("active")) { + tab_browser.classList.remove("active"); + tab_search.classList.add("active") + tab_playlists.classList.remove("active") + document.getElementById("file-browser").style.display = "none"; + document.getElementById("search").style.display = "block"; + document.getElementById("playlist-browser").style.display = "none"; + } +}); + +tab_playlists.addEventListener("click", e => { + if (!tab_playlists.classList.contains("active")) { + tab_browser.classList.remove("active"); + tab_search.classList.remove("active") + tab_playlists.classList.add("active") + document.getElementById("file-browser").style.display = "none"; + document.getElementById("search").style.display = "none"; + document.getElementById("playlist-browser").style.display = "block"; + } +}); // Add API calls to controls diff --git a/static/index.html b/static/index.html index 2387fb9..c923696 100644 --- a/static/index.html +++ b/static/index.html @@ -79,8 +79,53 @@ -
browser
-
result
+
+
+ File Browser + Search + Playlists +
+
+
+ file browser +
+
+ actions +
+
+ + +
+
+ + + + + + + + + + + +
ArtistTitleAlbumGenreTime
+
diff --git a/static/style.css b/static/style.css index 9e16773..ccad8a0 100644 --- a/static/style.css +++ b/static/style.css @@ -16,7 +16,7 @@ main { display: grid; grid-auto-columns: 1fr; grid-template-columns: 1fr 2fr; - grid-template-rows: 150px 1fr 1fr; + grid-template-rows: 100px 1fr 1fr; gap: 0 0; grid-template-areas: "nav nav" "queue queue" "browser result" "footer footer"; } @@ -191,6 +191,15 @@ input[type=text] { border-bottom-color: #545454; } +#nav { + padding: 5px; + background: linear-gradient(0deg, rgba(3,7,11,1) 0%, rgba(14,27,43,1) 4%, rgba(41,55,74,1) 6%, rgba(18,35,56,1) 94%, rgba(40,68,104,1) 96%, rgba(168,182,200,1) 100%); +} + +#nav > div { + border-right: 1px solid black; +} + thead { background: rgb(15,29,47); background: linear-gradient(0deg, rgba(15,29,47,1) 0%, rgba(15,29,47,1) 50%, rgba(7,14,23,1) 100%); @@ -260,6 +269,37 @@ table tr:hover td { background-color: #354158 !important; /* TODO: remove !important */ } +#tabs { + display: flex; +} + +#tabs a { + width: 50%; + padding: 3pt; + display: inline-block; + text-align: center; + background-color: #28374a; + color: #bbb; + border: 1px solid #545454; + border-top-left-radius: 5pt; + border-top-right-radius: 5pt; +} + +#tabs a.active { + background-color: #1a1a1a; + color: #bbb; + border-bottom: none; + /*border-top-color: #1a1a1a;*/ + /*border-right-color: #545454;*/ + /*border-bottom-color: #545454;*/ + /*border-left-color: #1a1a1a;*/ +} + +#browser { + background-color: #171812; + border-right: 4px ridge #3a506b; +} + footer svg { color: white; width: 12pt;