responsive buttons
authorAndrew Karpow <andy@ndyk.de>
Sun, 19 Jan 2014 01:08:56 +0000 (02:08 +0100)
committerAndrew Karpow <andy@ndyk.de>
Sun, 19 Jan 2014 01:08:56 +0000 (02:08 +0100)
htdocs/css/mpd.css
htdocs/index.html
src/http_server.c

index ae19e13..ee1f809 100644 (file)
@@ -43,6 +43,14 @@ body {
   border-color: #adadad;
 }
 
+@media (max-width: 1199px) {
+#btn-responsive-block > .btn {
+  padding: 6px 12px;
+  font-size: 14px;
+  border-radius: 4px;
+  }
+}
+
 #salamisandwich td:nth-child(3), th:nth-child(3) {
   text-align: right;
 }
index 57e5835..8f40d8f 100644 (file)
             </button>
           </div>
 
-          <div class="btn-group-vertical btn-block btn-group-lg">
+          <div id="btn-responsive-block" class="btn-group-vertical btn-block btn-group-lg">
             <button type="button" class="btn btn-default" onclick="updateDB();">
               <span class="glyphicon glyphicon-refresh"></span> Update DB
             </button>
             </button>
           </div>
 
-             <div class="btn-group-vertical btn-block btn-group-lg" data-toggle="buttons">
-               <button type="button" class="btn btn-default" id="btnnotify">
-                    <span class="glyphicon glyphicon-comment"></span> Notifications
-               </button>
-             </div>
-
+             <div id="btn-responsive-block" class="btn-group-vertical btn-block btn-group-lg" data-toggle="buttons">
+               <button type="button" class="btn btn-default" id="btnnotify">
+                    <span class="glyphicon glyphicon-comment"></span> Notifications
+               </button>
+             </div>
         </div>
       </div><!-- /.col-md-2 -->
     </div><!-- /.row -->
index 27ac414..3b7e6c6 100644 (file)
@@ -147,7 +147,7 @@ int callback_http(struct libwebsocket_context *context,
                             LIBMPDCLIENT_PATCH_VERSION);
 
                 /* Copy size to content-length field */
-                sprintf(buf, "%6lu", response_size);
+                sprintf(buf, "%6zu", response_size);
                 memcpy(p + sizeof(http_header) - 11, buf, 6);
 
                 n = libwebsocket_write(wsi, (unsigned char *)p,