From a6cf4389387966b6c1656b8283511b95722e7a4e Mon Sep 17 00:00:00 2001 From: Saivann Date: Wed, 29 Oct 2014 23:50:56 -0400 Subject: [PATCH] Only display wallets for selected platform --- _less/screen.less | 47 ++++++++----- _templates/choose-your-wallet.html | 3 +- js/main.js | 108 ++++++++++++++++++----------- 3 files changed, 100 insertions(+), 58 deletions(-) diff --git a/_less/screen.less b/_less/screen.less index 4a0b64b4..89d01045 100644 --- a/_less/screen.less +++ b/_less/screen.less @@ -1266,17 +1266,46 @@ table td,table th{ .wallets{ width:605px; + height:250px; text-align:left; position:relative; margin:auto; padding:40px 0 20px 0; font-size:0; + opacity:1; + -moz-transition:opacity 400ms ease-out; + -webkit-transition:opacity 400ms ease-out; + transition:opacity 400ms ease-out; +} +.wallets.disabled{ + opacity:0; } .wallets>div{ - display:inline-block; + display:none; vertical-align:top; font-size:16px; } +.wallets>div:nth-child(1n){ + display:inline-block; +} +.wallets>div:nth-child(1n+13){ + display:none; +} +.wallets>div:first-child, +.wallets>div:first-child+div, +.wallets>div:first-child+div+div, +.wallets>div:first-child+div+div+div, +.wallets>div:first-child+div+div+div+div, +.wallets>div:first-child+div+div+div+div+div, +.wallets>div:first-child+div+div+div+div+div+div, +.wallets>div:first-child+div+div+div+div+div+div+div, +.wallets>div:first-child+div+div+div+div+div+div+div+div, +.wallets>div:first-child+div+div+div+div+div+div+div+div+div, +.wallets>div:first-child+div+div+div+div+div+div+div+div+div+div, +.wallets>div:first-child+div+div+div+div+div+div+div+div+div+div+div{ + /*IE8 Support*/ + display:inline-block; +} .wallets>div>a, .wallets>div>a:visited, .wallets>div>a:link, @@ -1296,18 +1325,6 @@ table td,table th{ -webkit-transition:opacity 400ms ease-out; transition:opacity 400ms ease-out; } -.wallets>div.disabled>a{ - cursor:default; - -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=20)"; - opacity:0.2; - -webkit-filter:grayscale(100%); - -moz-filter:grayscale(100%); - -ms-filter:grayscale(100%); - -o-filter:grayscale(100%); - filter:grayscale(100%); - filter:url("data:image/svg+xml;utf8,#grayscale"); - filter:alpha(opacity=20), gray; -} .wallets>div>a>span{ display:none; position:absolute; @@ -2345,9 +2362,7 @@ h2 .rssicon{ } .wallets{ width:auto; - } - .wallets>div.disabled{ - display:none; + height:auto; } .wallets>div:hover>span{ display:none; diff --git a/_templates/choose-your-wallet.html b/_templates/choose-your-wallet.html index 1b40d3a1..bb72f418 100755 --- a/_templates/choose-your-wallet.html +++ b/_templates/choose-your-wallet.html @@ -701,7 +701,7 @@ wallets: -
+
{% for wallet in page.wallets %}{% for wallet in wallet %}{% if wallet[1].platform.mobile %}{% assign platform = wallet[1].platform.mobile %}{% elsif wallet[1].platform.desktop %}{% assign platform = wallet[1].platform.desktop %}{% elsif wallet[1].platform.hardware %}{% assign platform = wallet[1].platform.hardware %}{% else %}{% assign platform = wallet[1].platform.web %}{% endif %}
@@ -764,7 +764,6 @@ wallets:
-

warning{% translate educate %}

diff --git a/js/main.js b/js/main.js index 20a09b1c..01863835 100644 --- a/js/main.js +++ b/js/main.js @@ -138,6 +138,19 @@ document.body.setAttribute('data-scrollstatus',setInterval(function(){ },10)); } +function supportCSS(id){ +//Return true if the browser supports given CSS feature. +var x=domPrefixes='Webkit Moz ms O'.split(' '); +var nd=document.createElement('DIV'); +id=id.toLowerCase(); +if(nd.style[id]!==undefined)return true; +idc=id.charAt(0).toUpperCase()+id.substr(1); +for(var i=0,n=domPrefixes.length;i