Enable volume slider again
authorSuperBFG7 <daniel@despite.ch>
Thu, 17 Jun 2021 07:55:45 +0000 (09:55 +0200)
committerSuperBFG7 <daniel@despite.ch>
Thu, 17 Jun 2021 07:55:45 +0000 (09:55 +0200)
Add volume number
Move love button to song info box

htdocs/css/mpd.css
htdocs/index.html
htdocs/js/mpd.js

index a510ecf..1987ce2 100644 (file)
@@ -9,6 +9,7 @@ body {
 
 #volumeslider {
   width: 150px;
+  float: left;
 }
 
 #volumeslider .progress {
@@ -25,6 +26,20 @@ button {
   margin-top: 2px;
 }
 
+#volume-number {
+  float: right;
+  margin-top: 2px;
+  margin-left: 10px;
+}
+
+#love {
+  float: right;
+}
+
+#love > button > span {
+  color: red;
+}
+
 #breadcrump {
   display: block;
   overflow: auto;
@@ -169,5 +184,6 @@ button {
   .sticky {
     position: sticky;
     top: 55px;
+       z-index: 99;
   }
 }
index 0fed0d4..4c5e951 100644 (file)
                 <span class="glyphicon glyphicon-forward"></span>
               </button>
             </div>
-            <div class="btn-group">
-              <button
-                id="btnlove"
-                type="button"
-                class="btn btn-default"
-                onclick="clickLove();"
-              >
-                <span class="glyphicon glyphicon-heart"></span>
-              </button>
-            </div>
-            <!--          
-          <div class="btn-group">
-            <div class="btn btn-toolbar btn-default">
-              <span id="volume-icon" class="glyphicon glyphicon-volume-up"></span>
-              <div id="volumeslider"></div>
-            </div>
-          </div>
--->
             <div class="btn-group" role="group">
               <button
                 type="button"
                 ></span>
               </button>
             </div>
+            <div class="btn-group" role="group">
+              <div class="btn btn-toolbar btn-default">
+                <span
+                  id="volume-icon"
+                  class="glyphicon glyphicon-volume-up"
+                ></span>
+                <div id="volumeslider"></div>
+                <span id="volume-number"></span>
+              </div>
+            </div>
           </div>
 
           <form id="search" class="navbar-form navbar-right" role="search">
                   class="glyphicon glyphicon-play"
                 ></span>
                 <span id="currenttrack"></span>
+                <span id="love">
+                  <button
+                    id="btnlove"
+                    type="button"
+                    class="btn btn-default"
+                    onclick="clickLove();"
+                  >
+                    <span class="glyphicon glyphicon-heart"></span></button
+                ></span>
               </h1>
               <h4>
                 <span id="artist" class="text"></span>
index 83c5374..e77e888 100644 (file)
@@ -736,6 +736,7 @@ function webSocketConnect() {
                         obj.data.elapsedTime - elapsed_minutes * 60;
 
                     $('#volumeslider').slider(obj.data.volume);
+                    $('#volume-number').text(obj.data.volume + '%');
                     var progress = Math.floor(
                         (100 * obj.data.elapsedTime) / obj.data.totalTime
                     );