From 24e36e6d405b637ba8ea29377e4e7b6980328d40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Rynning-T=C3=B8nnesen?= Date: Fri, 30 Jan 2015 23:04:59 +0100 Subject: [PATCH] Added hardware acceleration to main --- index.php | 3 +-- js/playercontrols.js | 8 ++++++-- js/search.js | 5 +++++ static/controlstyle.css | 6 ++++++ static/style.css | 6 +++++- 5 files changed, 23 insertions(+), 5 deletions(-) diff --git a/index.php b/index.php index fe6ce857..13daf660 100755 --- a/index.php +++ b/index.php @@ -35,9 +35,8 @@ -
- +
diff --git a/js/playercontrols.js b/js/playercontrols.js index e84b3a02..585eb40c 100755 --- a/js/playercontrols.js +++ b/js/playercontrols.js @@ -64,8 +64,12 @@ function initControls() function fitToScreen() { - document.getElementById("controls").style.top = document.getElementById("player").offsetTop + $("#player").height() + "px"; - document.getElementById("controls").style.left = document.getElementById("player").offsetLeft + "px"; + //document.getElementById("controls").style.top = document.getElementById("player").offsetTop + $("#player").height() + "px"; + document.getElementById("controls").style.top = $("#player").position()["top"] + $("#player").height() + "px"; + //document.getElementById("controls").style.left = document.getElementById("player").offsetLeft + "px"; + document.getElementById("controls").style.left = $("#player").position()["left"] + "px"; + //document.getElementById("controls").style.left = "10px"; + $("#controls").width($("#player").width()); } function initSlider() diff --git a/js/search.js b/js/search.js index 6563471e..4c02eb06 100755 --- a/js/search.js +++ b/js/search.js @@ -82,7 +82,11 @@ function search(search_input){ //console.log(wrapper); //$("#results").append(wrapper).show("slow"); if(wrapper.length > 0) + { $(".main").addClass("blurT"); + //$("#controls").addClass("blurT"); + } + $("
"+wrapper+"
").appendTo('#results').slideDown('slow'); } @@ -92,6 +96,7 @@ function search(search_input){ }); }else{ $(".main").removeClass("blurT"); + $("#controls").removeClass("blurT"); } } diff --git a/static/controlstyle.css b/static/controlstyle.css index 23d2ffab..5aef4b13 100755 --- a/static/controlstyle.css +++ b/static/controlstyle.css @@ -5,6 +5,12 @@ background-color:rgba(255, 255, 255, 0.25); position:absolute; width:54%; + transition: 0.75s -webkit-filter linear; +-webkit-transform: translate3d(0,0,0); +-moz-transform: translate3d(0,0,0); +-ms-transform: translate3d(0,0,0); +-o-transform: translate3d(0,0,0); +transform: translate3d(0,0,0); } #q, #fullscreen, #playpause diff --git a/static/style.css b/static/style.css index 96510099..60377a82 100755 --- a/static/style.css +++ b/static/style.css @@ -51,7 +51,11 @@ body{background:#000; margin:0; } .result_info{color:#D7D7D7; font-size: 12px; /* float:right; */padding-top: 6px;} .thumb{height: 55px; border-radius:3px; float: left; margin: 7px 0px 7px 15px;} -.main{width:90%; margin: 0 auto 0 auto;transition: 0.75s -webkit-filter linear;} +.main{width:90%; margin: 0 auto 0 auto;transition: 0.75s -webkit-filter linear; -webkit-transform: translate3d(0,0,0); + -moz-transform: translate3d(0,0,0); + -ms-transform: translate3d(0,0,0); + -o-transform: translate3d(0,0,0); + transform: translate3d(0,0,0);} .playlist{width:37%; margin-left: 0px; display: inline-block; font-size: 14px; border-radius: 3px; vertical-align: top; height: calc(87% - 183px);} .lresult{padding:10px 0 10px 5px; height: 70px; border-top: none; cursor: default; border-bottom: solid 1px rgba(255,255,255,0.2); } .lthumb{height: 70px; margin:0;margin-right: 10px; display: inline; width: 109px; border-radius: 3px; box-shadow: 0 8px 11px -4px black;}