From 0e43a33c4a2f0aa1d9196096e788ac52d6276f0c Mon Sep 17 00:00:00 2001 From: Ondrej Zara Date: Mon, 25 Mar 2019 15:49:23 +0100 Subject: [PATCH] features --- app/app.css | 31 ++++++++++++-- app/css/app.less | 9 ++-- app/css/component.less | 5 +++ app/css/library.less | 14 +++++++ app/css/main.less | 3 +- app/css/queue.less | 4 ++ app/index.html | 15 ++++++- app/js/app.js | 7 ++-- app/js/fs.js | 65 +++++++++++++++++++++++++++++ app/js/lib/art.js | 15 +------ app/js/lib/mpd.js | 68 +++++++++++++++++++++++++++++- app/js/lib/parser.js | 38 ++++++++++++++++- app/js/lib/ui.js | 47 +++++++++++++++++++++ app/js/library.js | 93 ++++++++++++++++++++++++++++++++++++++++++ app/js/queue.js | 5 +-- 15 files changed, 385 insertions(+), 34 deletions(-) create mode 100644 app/css/component.less create mode 100644 app/css/library.less create mode 100644 app/js/fs.js create mode 100644 app/js/lib/ui.js create mode 100644 app/js/library.js diff --git a/app/app.css b/app/app.css index f535a1b..a946b97 100644 --- a/app/app.css +++ b/app/app.css @@ -4,14 +4,13 @@ body { flex-direction: column; height: 100vh; } -header, -footer { +body > header, +body > footer { box-shadow: 0 0 3px #000; } main { flex-grow: 1; - overflow-x: hidden; - overflow-y: auto; + overflow: hidden; } nav ul { margin: 0; @@ -51,7 +50,19 @@ nav ul li.active { #player:not([data-flags~=repeat]) .repeat { opacity: 0.5; } +.component { + height: 100%; + display: flex; + flex-direction: column; +} +#queue { + height: 100%; + display: flex; + flex-direction: column; +} #queue ul { + flex-grow: 1; + overflow: auto; list-style: none; margin: 0; padding: 0; @@ -69,3 +80,15 @@ nav ul li.active { #queue .current { font-weight: bold; } +#library { + height: 100%; + display: flex; + flex-direction: column; +} +#library ul { + flex-grow: 1; + overflow: auto; + list-style: none; + margin: 0; + padding: 0; +} diff --git a/app/css/app.less b/app/css/app.less index 31f162c..ae523e4 100644 --- a/app/css/app.less +++ b/app/css/app.less @@ -3,13 +3,16 @@ body { display: flex; flex-direction: column; height: 100vh; + + > header, > footer { + box-shadow: 0 0 3px #000; + } } -header, footer { - box-shadow: 0 0 3px #000; -} @import "main.less"; @import "nav.less"; @import "player.less"; +@import "component.less"; @import "queue.less"; +@import "library.less"; diff --git a/app/css/component.less b/app/css/component.less new file mode 100644 index 0000000..798a0c4 --- /dev/null +++ b/app/css/component.less @@ -0,0 +1,5 @@ +.component { + height: 100%; + display: flex; + flex-direction: column; +} \ No newline at end of file diff --git a/app/css/library.less b/app/css/library.less new file mode 100644 index 0000000..85b6727 --- /dev/null +++ b/app/css/library.less @@ -0,0 +1,14 @@ +#library { + .component; + + ul { + flex-grow: 1; + overflow: auto; + list-style: none; + margin: 0; + padding: 0; + } + + li { + } +} diff --git a/app/css/main.less b/app/css/main.less index ce5e90f..394f547 100644 --- a/app/css/main.less +++ b/app/css/main.less @@ -1,5 +1,4 @@ main { flex-grow: 1; - overflow-x: hidden; - overflow-y: auto; + overflow: hidden; } diff --git a/app/css/queue.less b/app/css/queue.less index 6fecff0..46e051a 100644 --- a/app/css/queue.less +++ b/app/css/queue.less @@ -1,5 +1,9 @@ #queue { + .component; + ul { + flex-grow: 1; + overflow: auto; list-style: none; margin: 0; padding: 0; diff --git a/app/index.html b/app/index.html index 19b44ae..8cf6767 100644 --- a/app/index.html +++ b/app/index.html @@ -24,9 +24,19 @@
-
+
+
+
    +
    -
    +
    +
    +
      +
      +
      +
      +
        +