From b9707fe37b6f7ee4109a06330ff36b119017f8a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Rynning-T=C3=B8nnesen?= Date: Fri, 19 Jun 2015 18:18:38 +0200 Subject: [PATCH] Added doctype in all php files, and adjusted heights and css styling accordingly to the 'new' boxmodel --- .htaccess | 4 ++-- index.php | 19 ++++++++-------- php/controller.php | 9 ++++---- server/server.js | 2 +- static/css/style.css | 42 +++++++++++++++++++++++++---------- static/js/chat.js | 4 ++-- static/js/remotecontroller.js | 2 +- static/js/youtube.js | 2 -- 8 files changed, 51 insertions(+), 33 deletions(-) diff --git a/.htaccess b/.htaccess index 105d8c48..fbb84555 100755 --- a/.htaccess +++ b/.htaccess @@ -5,8 +5,8 @@ RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L] #Comment out the two folling lines when running server locally to fix issues with localhost -RewriteCond %{HTTPS} !=on -RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] +#RewriteCond %{HTTPS} !=on +#RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] RewriteRule ^remote/(.*) php/controller.php?id=$1 [L] diff --git a/index.php b/index.php index c179b07e..ac41f50b 100755 --- a/index.php +++ b/index.php @@ -1,3 +1,4 @@ + - + @@ -134,25 +135,25 @@
-
+
  • -
      -
    • +
        +
      • -
        -
          -
          +
          +
            +
            -
              -
                +
                  +
                  diff --git a/php/controller.php b/php/controller.php index 09b408cc..f4555071 100755 --- a/php/controller.php +++ b/php/controller.php @@ -1,3 +1,4 @@ + Zöff Remote @@ -12,10 +13,10 @@
                  diff --git a/server/server.js b/server/server.js index 0f6f285f..34e75692 100755 --- a/server/server.js +++ b/server/server.js @@ -4,7 +4,7 @@ var server; This if for the localhost running ******/ -localhost = false; +localhost = true; //https server if(localhost) diff --git a/static/css/style.css b/static/css/style.css index dda3d457..2851214d 100755 --- a/static/css/style.css +++ b/static/css/style.css @@ -30,6 +30,7 @@ } + body { display: flex; min-height: 100vh; @@ -37,6 +38,14 @@ body { overflow-x: hidden; } +.main, #main-row, .video-container, #playlist{ + height: calc(100vh - 64px) !important; +} + +footer{ + margin-top:0px !important; +} + /* global colors */ footer.page-footer, nav, .tabs .tab a, @@ -57,7 +66,7 @@ input[type=text]:focus:not([readonly]) + label, input[type=password]:focus:not([ span.badge.new, .progress .determinate, .progress .indeterminate, -.switch label input[type=checkbox]:checked + .lever:after, +.switch label input[type=checkbox]:checked + .lever:after { background-color: #2D2D2D; } @@ -72,6 +81,7 @@ input[type=text]:focus:not([readonly]), input[type=password]:focus:not([readonly nav .brand-logo{ padding-left: 20px; position: relative; + height:100%; } #fp-nav { @@ -86,7 +96,7 @@ nav .brand-logo{ .footer-copyright a:hover{color:#6699FF} main { - flex: 1 0 auto; + flex: auto; } nav .zbrand{ @@ -120,7 +130,7 @@ display: inline; .auto-margin{ margin-left: auto !important; margin-right: auto !important; - float: center !important; + } .clickable, .modal-trigger{cursor:pointer;} @@ -162,8 +172,7 @@ display: inline; .card-action #del { color:white; } - -.card-action #del:hover { +.card-action #del:hover{ color:grey; } @@ -232,6 +241,10 @@ hide mdi-action-visibility mdi-action-visibility-off /*------------------- Channel page ---------------------------------------------------------------------------- */ +#main-row{ + margin-bottom:-64px; +} + @media only screen and (min-width: 993px){ .toast { float: left; @@ -256,15 +269,19 @@ hide mdi-action-visibility mdi-action-visibility-off background-color:black !important; } +#channelchat, #all_chat{ + height: calc(100vh - 193px); +} + #chatchannel, #chatall { - height: calc(100% - 49px); + height: inherit; overflow-y:scroll; text-align:left; word-wrap:break-word; } #chat { - height: calc(100% - 121px); + /*height: calc(100% - 121px);*/ text-align:left; word-wrap:break-word; } @@ -331,7 +348,6 @@ ul #chat-log{ } .main{ - height: 100%; width: 100%; max-width:99%; margin: 0px; @@ -340,9 +356,6 @@ ul #chat-log{ #nav{ background-color:rgba(255,255,255, 0.1); } -.video-container{ - height: calc(100% - 64px); -} .control-list{ position: fixed; @@ -583,7 +596,8 @@ ul #chat-log{ height:32px; background-color:rgba(255, 255, 255, 0.1); width:100%; - color:white; + color:white; + margin-top:-6px; } #playpause, #duration, #volume-button @@ -855,6 +869,10 @@ ul #chat-log{ display: none; } +.search_input{ + height:50% !important; +} + #search::-webkit-input-placeholder { /* WebKit browsers */ color: #FFF; } diff --git a/static/js/chat.js b/static/js/chat.js index b3712a68..add48bdc 100755 --- a/static/js/chat.js +++ b/static/js/chat.js @@ -50,7 +50,7 @@ socket.on("chat.all", function(inp) unseen = true; } var color = intToARGB(hashCode(inp[0])).substring(0,6); - $("#chatall").append("
                • "+inp[0]+"
                • "); + $("#chatall").append("
                • "+inp[0]+"
                • "); var in_text = document.createTextNode(inp[1]); $("#chatall li:last")[0].appendChild(in_text); document.getElementById("chatall").scrollTop = document.getElementById("chatall").scrollHeight @@ -82,7 +82,7 @@ function setup_chat_listener(channel) } } var color = intToARGB(hashCode(data[0])).substring(0,6); - $("#chatchannel").append("
                • "+data[0]+"
                • "); + $("#chatchannel").append("
                • "+data[0]+"
                • "); var in_text = document.createTextNode(data[1]); $("#chatchannel li:last")[0].appendChild(in_text); document.getElementById("chatchannel").scrollTop = document.getElementById("chatchannel").scrollHeight diff --git a/static/js/remotecontroller.js b/static/js/remotecontroller.js index 068be5f7..358177c2 100755 --- a/static/js/remotecontroller.js +++ b/static/js/remotecontroller.js @@ -3,7 +3,7 @@ var id; //var socket; $(document).ready(function (){ - setTimeout(function(){$("#code-input").focus();},500); + setTimeout(function(){$("#search").focus();},500); socket = io.connect('//'+window.location.hostname+':3000'); id = window.location.pathname.split("/")[2]; if(id) diff --git a/static/js/youtube.js b/static/js/youtube.js index a17ae122..c685a2b3 100755 --- a/static/js/youtube.js +++ b/static/js/youtube.js @@ -172,8 +172,6 @@ function msieversion() { function onYouTubeIframeAPIReady() { ytplayer = new YT.Player('player', { - height: window.height*0.75, - width: window.width*0.6, videoId: video_id, playerVars: { rel:"0", wmode:"transparent", controls: "0" , iv_load_policy: "3", theme:"light", color:"white"}, events: {