Merge branch 'jsexpandbox'

This commit is contained in:
Saivann 2015-06-29 11:54:39 -04:00
commit 19cc8863c2
No known key found for this signature in database
GPG key ID: 5780F5D31B5577B0
4 changed files with 144 additions and 107 deletions

View file

@ -12,6 +12,7 @@
{% capture metadescription %}{% translate metadescription %}{% endcapture %}{% if metadescription != '' %}<meta name="description" content="{{ metadescription }}">{% endif %} {% capture metadescription %}{% translate metadescription %}{% endcapture %}{% if metadescription != '' %}<meta name="description" content="{{ metadescription }}">{% endif %}
{% lesscss main.less %} {% lesscss main.less %}
<!--[if lt IE 8]>{% lesscss ie.css %}<script type="text/javascript" src="/js/ie.js"></script><![endif]--> <!--[if lt IE 8]>{% lesscss ie.css %}<script type="text/javascript" src="/js/ie.js"></script><![endif]-->
<!--[if IE 8]>{% lesscss ie8.less %}<![endif]-->
{% if page.lang == 'ar' or page.lang == 'fa' %}{% lesscss rtl.less %}{% endif %} {% if page.lang == 'ar' or page.lang == 'fa' %}{% lesscss rtl.less %}{% endif %}
{% if page.lang == 'bg' or page.lang == 'el' or page.lang == 'ko' or page.lang == 'hi' or page.lang == 'pl' or page.lang == 'sl' or page.lang == 'ro' or page.lang == 'ru' or page.lang == 'tr' or page.lang == 'uk' or page.lang == 'zh_CN' or page.lang == 'zh_TW' %}{% lesscss sans.less %}{% endif %} {% if page.lang == 'bg' or page.lang == 'el' or page.lang == 'ko' or page.lang == 'hi' or page.lang == 'pl' or page.lang == 'sl' or page.lang == 'ro' or page.lang == 'ru' or page.lang == 'tr' or page.lang == 'uk' or page.lang == 'zh_CN' or page.lang == 'zh_TW' %}{% lesscss sans.less %}{% endif %}
<script type="text/javascript" src="/js/base.js"></script> <script type="text/javascript" src="/js/base.js"></script>

82
_less/ie8.less Normal file
View file

@ -0,0 +1,82 @@
/*
This file is licensed under the MIT License (MIT) available on
http://opensource.org/licenses/MIT.
*/
.wallets>div{
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{
display:inline-block;
}
.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,
.wallets>div:first-child+div+div+div+div+div+div+div+div+div+div+div>div,
.wallets>div:first-child+div+div+div+div+div+div>span,
.wallets>div:first-child+div+div+div+div+div+div+div>span,
.wallets>div:first-child+div+div+div+div+div+div+div+div>span,
.wallets>div:first-child+div+div+div+div+div+div+div+div+div>span,
.wallets>div:first-child+div+div+div+div+div+div+div+div+div+div>span,
.wallets>div:first-child+div+div+div+div+div+div+div+div+div+div+div>span{
top:-222px;
}
.wallets>div:first-child+div+div+div+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+div+div>div,
.wallets>div:first-child+div+div+div+div+div+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+div+div+div+div>div,
.wallets>div:first-child+div+div+div+div+div+div+div+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+div+div+div+div+div+div>div,
.wallets>div:first-child+div+div+div+div+div+div+div+div+div+div+div+div>span,
.wallets>div:first-child+div+div+div+div+div+div+div+div+div+div+div+div+div>span,
.wallets>div:first-child+div+div+div+div+div+div+div+div+div+div+div+div+div+div>span,
.wallets>div:first-child+div+div+div+div+div+div+div+div+div+div+div+div+div+div+div>span,
.wallets>div:first-child+div+div+div+div+div+div+div+div+div+div+div+div+div+div+div+div>span,
.wallets>div:first-child+div+div+div+div+div+div+div+div+div+div+div+div+div+div+div+div+div>span{
top:-92px;
}
.press-quotes p{
display:none;
}
.press-quotes p:first-child,
.press-quotes p:first-child+p,
.press-quotes p:first-child+p+p,
.press-quotes p:first-child+p+p+p,
.press-quotes p:first-child+p+p+p+p,
.press-quotes p:first-child+p+p+p+p+p,
.press-quotes p:first-child+p+p+p+p+p+p,
.press-quotes p:first-child+p+p+p+p+p+p+p{
display:inline-block;
}
.press-quotes.expanded p{
display:inline-block;
}
.devprojectlist li{
display:none;
}
.devprojectlist li:first-child,
.devprojectlist li:first-child+li,
.devprojectlist li:first-child+li+li,
.devprojectlist li:first-child+li+li+li{
display:list-item;
}
.devprojectlist.expanded li{
display:list-item;
}

View file

@ -1053,6 +1053,9 @@ div.post {
} }
.boxexpand{ .boxexpand{
overflow:hidden; overflow:hidden;
-moz-transition:height 400ms ease-out;
-webkit-transition:height 400ms ease-out;
transition:height 400ms ease-out;
} }
.boxexpand>*{ .boxexpand>*{
display:none; display:none;
@ -1066,6 +1069,9 @@ div.post {
.boxexpand>h3:first-child a:active{ .boxexpand>h3:first-child a:active{
text-decoration:none; text-decoration:none;
} }
.boxexpand.expanded>*{
display:block;
}
.titlelight{ .titlelight{
color:#8c8c8c; color:#8c8c8c;
@ -1246,20 +1252,25 @@ div.post {
.devprojectlist{ .devprojectlist{
overflow:hidden; overflow:hidden;
margin:-10px 0; margin:-10px 0;
-moz-transition:height 400ms ease-out;
-webkit-transition:height 400ms ease-out;
transition:height 400ms ease-out;
} }
.devprojectlist li{ .devprojectlist li{
display:none;
margin:10px 0; margin:10px 0;
} }
.devprojectlist li:first-child, .devprojectlist li:nth-child(1n+4){
.devprojectlist li:first-child+li, display:none;
.devprojectlist li:first-child+li+li, }
.devprojectlist li:first-child+li+li+li{ .devprojectlist.expanded li:nth-child(1n+4){
display:list-item; display:list-item;
} }
.devprojectlist li.more{ .devprojectlist li.more{
display:block; display:block;
} }
.devprojectlist.expanded li.more{
display:none;
}
.devprojectlist a{ .devprojectlist a{
display:inline-block; display:inline-block;
margin-top:5px; margin-top:5px;
@ -1408,31 +1419,13 @@ div.post {
opacity:0; opacity:0;
} }
.wallets>div{ .wallets>div{
display:none; display:inline-block;
vertical-align:top; vertical-align:top;
font-size:16px; font-size:16px;
} }
.wallets>div:nth-child(1n){
display:inline-block;
}
.wallets>div:nth-child(1n+13){ .wallets>div:nth-child(1n+13){
display:none; 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,
.wallets>div>a:visited, .wallets>div>a:visited,
.wallets>div>a:link, .wallets>div>a:link,
@ -1523,40 +1516,10 @@ div.post {
.wallets>div:nth-child(1n+7)>span{ .wallets>div:nth-child(1n+7)>span{
top:-222px; top:-222px;
} }
.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,
.wallets>div:first-child+div+div+div+div+div+div+div+div+div+div+div>div,
.wallets>div:first-child+div+div+div+div+div+div>span,
.wallets>div:first-child+div+div+div+div+div+div+div>span,
.wallets>div:first-child+div+div+div+div+div+div+div+div>span,
.wallets>div:first-child+div+div+div+div+div+div+div+div+div>span,
.wallets>div:first-child+div+div+div+div+div+div+div+div+div+div>span,
.wallets>div:first-child+div+div+div+div+div+div+div+div+div+div+div>span{
/*IE8 Support*/
top:-222px;
}
.wallets>div:nth-child(1n+13)>div, .wallets>div:nth-child(1n+13)>div,
.wallets>div:nth-child(1n+13)>span{ .wallets>div:nth-child(1n+13)>span{
top:-92px; top:-92px;
} }
.wallets>div:first-child+div+div+div+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+div+div>div,
.wallets>div:first-child+div+div+div+div+div+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+div+div+div+div>div,
.wallets>div:first-child+div+div+div+div+div+div+div+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+div+div+div+div+div+div>div,
.wallets>div:first-child+div+div+div+div+div+div+div+div+div+div+div+div>span,
.wallets>div:first-child+div+div+div+div+div+div+div+div+div+div+div+div+div>span,
.wallets>div:first-child+div+div+div+div+div+div+div+div+div+div+div+div+div+div>span,
.wallets>div:first-child+div+div+div+div+div+div+div+div+div+div+div+div+div+div+div>span,
.wallets>div:first-child+div+div+div+div+div+div+div+div+div+div+div+div+div+div+div+div>span,
.wallets>div:first-child+div+div+div+div+div+div+div+div+div+div+div+div+div+div+div+div+div>span{
/*IE8 Support*/
top:-92px;
}
.wallets>div>div>h2{ .wallets>div>div>h2{
margin:0; margin:0;
text-align:left; text-align:left;
@ -2034,6 +1997,9 @@ h2 .rssicon{
-webkit-transition:height 400ms ease-out; -webkit-transition:height 400ms ease-out;
transition:height 400ms ease-out; transition:height 400ms ease-out;
} }
.press-faq>div>div.expanded{
height:auto;
}
.press-faq li{ .press-faq li{
line-height:1.5em; line-height:1.5em;
} }
@ -2093,16 +2059,18 @@ h2 .rssicon{
.press-quotes{ .press-quotes{
margin-bottom:40px; margin-bottom:40px;
overflow:hidden;
-moz-transition:height 400ms ease-out;
-webkit-transition:height 400ms ease-out;
transition:height 400ms ease-out;
}
.press-quotes.expanded{
height:auto;
} }
.press-quotes div{ .press-quotes div{
position:relative; position:relative;
left:-20px; left:-20px;
text-align:left; text-align:left;
height:350px;
overflow:hidden;
-moz-transition:height 400ms ease-out;
-webkit-transition:height 400ms ease-out;
transition:height 400ms ease-out;
} }
.press-quotes p{ .press-quotes p{
display:inline-block; display:inline-block;
@ -2110,11 +2078,20 @@ h2 .rssicon{
width:400px; width:400px;
margin:0 0 20px 20px; margin:0 0 20px 20px;
} }
.press-quotes p:nth-child(1n+9){
display:none;
}
.press-quotes.expanded p:nth-child(1n+9){
display:inline-block;
}
.press-quotes>a{ .press-quotes>a{
display:inline-block; display:inline-block;
padding-top:10px; padding-top:10px;
font-weight:bold; font-weight:bold;
} }
.press-quotes.expanded>a{
display:none;
}
.press-quotes span:first-child{ .press-quotes span:first-child{
font-weight:bold; font-weight:bold;
display:block; display:block;

View file

@ -128,54 +128,43 @@ t.appendChild(nd);
t.onclick = ''; t.onclick = '';
} }
function expandBox(t) {
// Expand or shrink box.
var phe = getHeight(t);
t.style.transition = t.style.MozTransition = t.style.WebkitTransition = 'all 0s ease 0s';
if (t.className.indexOf('expanded') === -1) addClass(t, 'expanded');
else removeClass(t, 'expanded');
t.style.height = '';
var nhe = getHeight(t);
t.style.height = phe + 'px';
// Async call to prevent transition from applying on last style.height statement.
setTimeout(function() {
t.style.transition = t.style.MozTransition = t.style.WebkitTransition = '';
t.style.height = nhe + 'px';
}, 20);
}
function boxShow(e) { function boxShow(e) {
// Display the box content when the user click a box on the "Secure your wallet" page. // Display the box content when the user click a box on the "Secure your wallet" page.
var p = t = getEventTarget(e); var t = getEventTarget(e);
while (p.nodeName != 'DIV') p = p.parentNode; while (t.nodeName != 'DIV') t = t.parentNode;
var sh = getHeight(p); expandBox(t);
for (var i = 0, nds = p.childNodes, n = nds.length; i < n; i++)
if (nds[i].nodeType == 1) nds[i].style.display = 'block';
t.removeAttribute('href');
t.onclick = '';
var dh = getHeight(p);
p.style.height = sh + 'px';
setTimeout(function() {
p.style.transition = 'height 400ms ease-out';
p.style.MozTransition = 'height 400ms ease-out';
p.style.WebkitTransition = 'height 400ms ease-out';
setTimeout(function() {
p.style.height = dh + 'px';
}, 20);
}, 20);
cancelEvent(e); cancelEvent(e);
} }
function faqShow(e) { function faqShow(e) {
// Display the content of a question in the FAQ at user request. // Display the content of a question in the FAQ at user request.
var p = t = getEventTarget(e); var t = getEventTarget(e);
while (p.nodeType != 1 || p.nodeName != 'DIV') p = p.nextSibling; while (t.nodeType != 1 || t.nodeName != 'DIV') t = t.nextSibling;
var pp = p.cloneNode(true); expandBox(t);
pp.style.visibility = 'hidden';
pp.style.height = 'auto';
p.parentNode.appendChild(pp);
var nhe = getHeight(pp);
pp.parentNode.removeChild(pp);
p.style.height = (p.style.height != '0px' && p.style.height != '') ? '0px' : nhe + 'px';
cancelEvent(e); cancelEvent(e);
} }
function materialShow(e) { function materialShow(e) {
// Display more materials on the "Press center" page at user request. // Display more materials on the "Press center" page at user request.
var p = t = getEventTarget(e); var p = t = getEventTarget(e);
while (p.nodeType != 1 || p.nodeName != 'DIV') p = p.previousSibling; while (p.nodeType != 1 || p.nodeName != 'DIV') p = p.parentNode;
var pp = p.cloneNode(true); expandBox(p);
pp.style.visibility = 'hidden';
pp.style.height = 'auto';
p.parentNode.appendChild(pp);
var nhe = getHeight(pp);
pp.parentNode.removeChild(pp);
p.style.height = (p.style.height != '0px' && p.style.height != '') ? '0px' : nhe + 'px';
t.style.display = 'none';
cancelEvent(e); cancelEvent(e);
} }
@ -183,19 +172,7 @@ function librariesShow(e) {
// Display more open source projects on the "Development" page at user request. // Display more open source projects on the "Development" page at user request.
var p = t = getEventTarget(e); var p = t = getEventTarget(e);
while (p.nodeType != 1 || p.nodeName != 'UL') p = p.parentNode; while (p.nodeType != 1 || p.nodeName != 'UL') p = p.parentNode;
var sh = getHeight(p); expandBox(p);
for (var i = 0, nds = p.getElementsByTagName('LI'), n = nds.length; i < n; i++) nds[i].style.display = 'list-item';
t.parentNode.parentNode.removeChild(t.parentNode);
var dh = getHeight(p);
p.style.height = sh + 'px';
setTimeout(function() {
p.style.transition = 'height 400ms ease-out';
p.style.MozTransition = 'height 400ms ease-out';
p.style.WebkitTransition = 'height 400ms ease-out';
setTimeout(function() {
p.style.height = dh + 'px';
}, 20);
}, 20);
cancelEvent(e); cancelEvent(e);
} }