From fd485a702e5afc9c900b25b16871b549b189e7ae Mon Sep 17 00:00:00 2001 From: Ruud Date: Sat, 11 Feb 2012 03:34:29 +0100 Subject: [PATCH] CSS3 Prefix via JS --- .../core/plugins/movie/static/movie.css | 14 ----- .../core/plugins/movie/static/search.css | 10 ---- .../core/plugins/wizard/static/wizard.css | 3 - .../static/scripts/block/navigation.js | 4 +- .../static/scripts/library/prefix_free.js | 2 + couchpotato/static/style/main.css | 55 +------------------ couchpotato/static/style/page/settings.css | 22 -------- couchpotato/static/style/uniform.generic.css | 10 ---- couchpotato/templates/_desktop.html | 1 + 9 files changed, 7 insertions(+), 114 deletions(-) create mode 100644 couchpotato/static/scripts/library/prefix_free.js diff --git a/couchpotato/core/plugins/movie/static/movie.css b/couchpotato/core/plugins/movie/static/movie.css index 4f75cc0c..7d06d709 100644 --- a/couchpotato/core/plugins/movie/static/movie.css +++ b/couchpotato/core/plugins/movie/static/movie.css @@ -10,10 +10,7 @@ .movies .movie { position: relative; - border-radius: 4px; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; margin: 10px 0; overflow: hidden; @@ -39,10 +36,7 @@ line-height: 0; overflow: hidden; height: 180px; - border-radius: 4px 0 0 4px; - -moz-border-radius: 4px 0 0 4px; - -webkit-border-radius: 4px 0 0 4px; } .movies .poster img, .options .poster img { @@ -172,7 +166,6 @@ min-height: 24px; white-space: nowrap; text-overflow: ellipsis; - -moz-text-overflow: ellipsis; text-align: center; vertical-align: top; border-left: 1px solid rgba(255, 255, 255, 0.1); @@ -229,14 +222,7 @@ padding: 0 0 1px; margin: 0; float: left; - - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - -o-user-select: none; user-select: none; - } .movies .alph_nav li { diff --git a/couchpotato/core/plugins/movie/static/search.css b/couchpotato/core/plugins/movie/static/search.css index 6bd388ea..6d34c72c 100644 --- a/couchpotato/core/plugins/movie/static/search.css +++ b/couchpotato/core/plugins/movie/static/search.css @@ -39,8 +39,6 @@ -moz-border-radius: 3px; box-shadow: 0 0 50px rgba(0,0,0,0.55); - -moz-box-shadow: 0 0 50px rgba(0,0,0,0.55); - -webkit-box-shadow: 0 0 50px rgba(0,0,0,0.55); } .search_form .spinner { background: rgba(0,0,0,0.8) url('../images/spinner.gif') no-repeat center 70px; @@ -73,11 +71,7 @@ border: 1px solid transparent; border-width: 1px 0; border-radius: 0; - -webkit-border-radius: 0; - -moz-border-radius: 0; box-shadow: inset 0 1px 8px rgba(0,0,0,0.25); - -moz-box-shadow: inset 0 1px 8px rgba(0,0,0,0.25); - -webkit-box-shadow: inset 0 1px 8px rgba(0,0,0,0.25); } .movie_result .options > div { @@ -139,11 +133,7 @@ vertical-align: top; border-radius: 3px; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; box-shadow: 0 0 3px rgba(0,0,0,0.35); - -moz-box-shadow: 0 0 3px rgba(0,0,0,0.35); - -webkit-box-shadow: 0 0 3px rgba(0,0,0,0.35); } .movie_result .info { diff --git a/couchpotato/core/plugins/wizard/static/wizard.css b/couchpotato/core/plugins/wizard/static/wizard.css index 0ac59336..8197b58a 100644 --- a/couchpotato/core/plugins/wizard/static/wizard.css +++ b/couchpotato/core/plugins/wizard/static/wizard.css @@ -24,10 +24,7 @@ width: 100%; left: 0; z-index: 2; - box-shadow: 0 0 50px rgba(0,0,0,0.55); - -moz-box-shadow: 0 0 50px rgba(0,0,0,0.55); - -webkit-box-shadow: 0 0 50px rgba(0,0,0,0.55); } .page.wizard .tab_wrapper .tabs { diff --git a/couchpotato/static/scripts/block/navigation.js b/couchpotato/static/scripts/block/navigation.js index d659cfd8..b0674b25 100644 --- a/couchpotato/static/scripts/block/navigation.js +++ b/couchpotato/static/scripts/block/navigation.js @@ -19,7 +19,7 @@ Block.Navigation = new Class({ } }) ) - + new ScrollSpy({ min: 400, onLeave: function(){ @@ -29,7 +29,7 @@ Block.Navigation = new Class({ self.backtotop.fade('in') } }) - + }, addTab: function(tab){ diff --git a/couchpotato/static/scripts/library/prefix_free.js b/couchpotato/static/scripts/library/prefix_free.js new file mode 100644 index 00000000..96ed40e4 --- /dev/null +++ b/couchpotato/static/scripts/library/prefix_free.js @@ -0,0 +1,2 @@ +// StyleFix 1.0.1 & PrefixFree 1.0.4 / by Lea Verou / MIT license +(function(){function b(a,b){return[].slice.call((b||document).querySelectorAll(a))}if(!window.addEventListener)return;var a=window.StyleFix={link:function(b){try{if(b.rel!=="stylesheet"||!b.sheet.cssRules||b.hasAttribute("data-noprefix"))return}catch(c){return}var d=b.href||b.getAttribute("data-href"),e=d.replace(/[^\/]+$/,""),f=b.parentNode,g=new XMLHttpRequest;g.open("GET",d),g.onreadystatechange=function(){if(g.readyState===4){var c=g.responseText;if(c&&b.parentNode){c=a.fix(c,!0,b),e&&(c=c.replace(/url\((?:'|")?(.+?)(?:'|")?\)/gi,function(a,b){return/^([a-z]{3,10}:|\/|#)/i.test(b)?a:'url("'+e+b+'")'}),c=c.replace(RegExp("\\b(behavior:\\s*?url\\('?\"?)"+e,"gi"),"$1"));var d=document.createElement("style");d.textContent=c,d.media=b.media,d.disabled=b.disabled,d.setAttribute("data-href",b.getAttribute("href")),f.insertBefore(d,b),f.removeChild(b)}}},g.send(null),b.setAttribute("data-inprogress","")},styleElement:function(b){var c=b.disabled;b.textContent=a.fix(b.textContent,!0,b),b.disabled=c},styleAttribute:function(b){var c=b.getAttribute("style");c=a.fix(c,!1,b),b.setAttribute("style",c)},process:function(){b('link[rel="stylesheet"]:not([data-inprogress])').forEach(StyleFix.link),b("style").forEach(StyleFix.styleElement),b("[style]").forEach(StyleFix.styleAttribute)},register:function(b,c){(a.fixers=a.fixers||[]).splice(c===undefined?a.fixers.length:c,0,b)},fix:function(b,c){for(var d=0;d3){d.pop();var f=d.join("-");h(f)&&b.indexOf(f)===-1&&b.push(f)}}},h=function(a){return StyleFix.camelCase(a)in f};if(e.length>0)for(var i=0;i .spinner, .mask{ text-decoration: none; font-weight: bold; line-height: 1; - border-radius: 5px; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - - box-shadow: 0 1px 3px rgba(0,0,0,0.5); - -moz-box-shadow: 0 1px 3px rgba(0,0,0,0.5); - -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.5); box-shadow: 0 1px 3px rgba(0,0,0,0.5); text-shadow: 0 -1px 1px rgba(0,0,0,0.25); border-bottom: 1px solid rgba(0,0,0,0.25); @@ -162,9 +151,6 @@ body > .spinner, .mask{ background: #4e5969; padding:10px; height: 60px; - box-shadow: 0 0 30px rgba(0,0,0,0.1); - -moz-box-shadow: 0 0 30px rgba(0,0,0,0.1); - -webkit-box-shadow: 0 0 30px rgba(0,0,0,0.1); position: fixed; width: 99%; z-index: 2; @@ -236,10 +222,7 @@ body > .spinner, .mask{ margin: -10px 0 0 -40px; background: #4e5969; padding: 5px 0; - border-radius: 0 0 5px 5px; - -moz-border-radius: 0 0 5px 5px; - -webkit-border-radius: 0 0 5px 5px; color: rgba(255,255,255,.4); text-shadow: none; font-weight: normal; @@ -253,14 +236,8 @@ body > .spinner, .mask{ padding: 15px 0 20px; background: #ff6134; font-size: 26px; - border-radius: 0 0 5px 5px; - -moz-border-radius: 0 0 5px 5px; - -webkit-border-radius: 0 0 5px 5px; - box-shadow: 0 2px 1px rgba(0,0,0, 0.3); - -moz-box-shadow: 0 2px 1px rgba(0,0,0, 0.3); - -webkit-box-shadow: 0 2px 1px rgba(0,0,0, 0.3); } .header .message a { @@ -293,14 +270,9 @@ body > .spinner, .mask{ .select .selection { display: inline-block; padding: 0 30px 0 20px; - border-radius:30px; - -moz-border-radius: 30px; - -webkit-border-radius: 30px; box-shadow: 0 1px 1px rgba(0,0,0,0.35), inset 0 1px 0px rgba(255,255,255,0.20); - -moz-box-shadow: 0 1px 1px rgba(0,0,0,0.35), inset 0 1px 0px rgba(255,255,255,0.20); - -webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.35), inset 0 1px 0px rgba(255,255,255,0.20); background: url('../images/checks.png') no-repeat 94% -53px, -webkit-gradient( linear, @@ -322,8 +294,6 @@ body > .spinner, .mask{ border-right: 1px solid rgba(0,0,0,0.2); box-shadow: 1px 0 0 rgba(255,255,255,0.15); - -moz-box-shadow: 1px 0 0 rgba(255,255,255,0.15); - -webkit-box-shadow: 1px 0 0 rgba(255,255,255,0.15); } .select .menu { @@ -338,12 +308,7 @@ body > .spinner, .mask{ position: absolute; margin: 25px 0 0 0; box-shadow: 0 1px 2px rgba(0,0,0,0.4); - -moz-box-shadow: 0 1px 2px rgba(0,0,0,0.4); - -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.4); border-radius:3px; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; - z-index: 3; } .select.active .list { @@ -371,20 +336,14 @@ body > .spinner, .mask{ color: #fff; border: 0; border-radius:3px; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; background: #282d34; box-shadow: inset 0 1px 8px rgba(0,0,0,0.25), 0 1px 0px rgba(255,255,255,0.25); - -moz-box-shadow: inset 0 1px 8px rgba(0,0,0,0.25), 0 1px 0px rgba(255,255,255,0.25); - -webkit-box-shadow: inset 0 1px 8px rgba(0,0,0,0.25), 0 1px 0px rgba(255,255,255,0.25); } .inlay.light { background: #47515f; outline: none; box-shadow: inset 0 1px 8px rgba(0,0,0,0.05), 0 1px 0px rgba(255,255,255,0.15); - -moz-box-shadow: inset 0 1px 8px rgba(0,0,0,0.05), 0 1px 0px rgba(255,255,255,0.15); - -webkit-box-shadow: inset 0 1px 8px rgba(0,0,0,0.05), 0 1px 0px rgba(255,255,255,0.15); } .inlay:focus { @@ -394,12 +353,8 @@ body > .spinner, .mask{ .onlay, .inlay .selected, .inlay > li:hover, .inlay > li.active { border-radius:3px; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; border: 1px solid #252930; box-shadow: inset 0 1px 0px rgba(255,255,255,0.20), 0 0 3px rgba(0,0,0, 0.2); - -moz-box-shadow: inset 0 1px 0px rgba(255,255,255,0.20), 0 0 3px rgba(0,0,0, 0.2); - -webkit-box-shadow: inset 0 1px 0px rgba(255,255,255,0.20), 0 0 3px rgba(0,0,0, 0.2); background-image: -webkit-gradient( linear, left bottom, @@ -423,14 +378,8 @@ body > .spinner, .mask{ z-index:101; text-align: center; background: #5c697b; - border-radius: 3px; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - box-shadow: 0 0 50px rgba(0,0,0,0.55); - -moz-box-shadow: 0 0 50px rgba(0,0,0,0.55); - -webkit-box-shadow: 0 0 50px rgba(0,0,0,0.55); } .question h3 { diff --git a/couchpotato/static/style/page/settings.css b/couchpotato/static/style/page/settings.css index f6fc174c..9077f2b6 100644 --- a/couchpotato/static/style/page/settings.css +++ b/couchpotato/static/style/page/settings.css @@ -73,10 +73,7 @@ padding: 0 9px 10px 30px; margin: 0; border-bottom: 1px solid #333; - box-shadow: 0 1px 0px rgba(255,255,255, 0.15); - -moz-box-shadow: 0 1px 0px rgba(255,255,255, 0.15); - -webkit-box-shadow: 0 1px 0px rgba(255,255,255, 0.15); } .page fieldset h2 .hint { font-size: 12px; @@ -159,10 +156,7 @@ padding: 5px 3px; margin: 0; width: 30%; - border-radius: 3px; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; } .page .input.xsmall { width: 5% } .page .input.small { width: 10% } @@ -209,11 +203,7 @@ margin: 28px 0 20px -4px; background: #5c697b; border-radius: 3px; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; box-shadow: 0 0 50px rgba(0,0,0,0.55); - -moz-box-shadow: 0 0 50px rgba(0,0,0,0.55); - -webkit-box-shadow: 0 0 50px rgba(0,0,0,0.55); } .page .directory_list .pointer { @@ -323,8 +313,6 @@ .page .tag_input .selection { border-radius: 0 10px 10px 0; - -moz-border-radius: 0 10px 10px 0; - -webkit-border-radius: 0 10px 10px 0; height: 26px; } @@ -337,8 +325,6 @@ line-height: 20px; padding: 3px 0; border-radius: 3px; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; cursor: text; width: 31%; margin: 0 !important; @@ -346,8 +332,6 @@ .page .tag_input:hover > ul { width: 50%; border-radius: 3px 0 0 3px; - -moz-border-radius: 3px 0 0 3px; - -webkit-border-radius: 3px 0 0 3px; } .page .tag_input:hover .formHint { display: none; } @@ -368,8 +352,6 @@ cursor: grab; padding: 0; border-radius: 2px; - -moz-border-radius: 2px; - -webkit-border-radius: 2px; } .page .tag_input > ul:hover > li.choice { background: url('../images/checks.png') no-repeat 94% -53px, -webkit-gradient( @@ -431,8 +413,6 @@ position: absolute; margin: -9px 0 0 -16px; border-radius: 30px 30px 0 0; - -webkit-border-radius: 30px 30px 0 0; - -moz-border-radius: 30px 30px 0 0; cursor: pointer; background: url('../../images/icon.delete.png') no-repeat center 2px, -webkit-gradient( linear, @@ -527,8 +507,6 @@ margin: 20px 0 0; border-left: 1px solid #333; box-shadow: -1px 0 0 rgba(255,255,255, 0.15); - -moz-box-shadow: -1px 0 0 rgba(255,255,255, 0.15); - -webkit-box-shadow: -1px 0 0 rgba(255,255,255, 0.15); } .page .tab_about .donate form { padding: 10px 0 0; diff --git a/couchpotato/static/style/uniform.generic.css b/couchpotato/static/style/uniform.generic.css index 179ab3a7..a532dbf1 100644 --- a/couchpotato/static/style/uniform.generic.css +++ b/couchpotato/static/style/uniform.generic.css @@ -41,21 +41,11 @@ .uniForm .buttonHolder{ background: #efefef; text-align: right; margin: 1.5em 0 0 0; padding: 1.5em; /* CSS3 */ border-radius: 4px; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - -o-border-radius: 4px; - -khtml-border-radius: 4px; } .uniForm .buttonHolder .primaryAction{ padding: 10px 22px; line-height: 1; background: #254a86; border: 1px solid #163362; font-size: 12px; font-weight: bold; color: #fff; /* CSS3 */ border-radius: 4px; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - -o-border-radius: 4px; - -khtml-border-radius: 4px; box-shadow: 1px 1px 0 #fff; - -webkit-box-shadow: 1px 1px 0 #fff; - -moz-box-shadow: 1px 1px 0 #fff; text-shadow: -1px -1px 0 rgba(0,0,0,.25); } .uniForm .buttonHolder .primaryAction:active{ position: relative; top: 1px; } diff --git a/couchpotato/templates/_desktop.html b/couchpotato/templates/_desktop.html index e459d957..28beaa10 100644 --- a/couchpotato/templates/_desktop.html +++ b/couchpotato/templates/_desktop.html @@ -10,6 +10,7 @@ +