From 532927a3c48918e0b059dbf46bd2096e67db12c6 Mon Sep 17 00:00:00 2001 From: ines Date: Wed, 17 May 2017 17:35:53 +0200 Subject: [PATCH] Update quickstart --- website/assets/css/_components/_quickstart.sass | 10 +++++++--- website/assets/js/quickstart.js | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/website/assets/css/_components/_quickstart.sass b/website/assets/css/_components/_quickstart.sass index f9972db70..4065940bc 100644 --- a/website/assets/css/_components/_quickstart.sass +++ b/website/assets/css/_components/_quickstart.sass @@ -10,7 +10,10 @@ padding: 2rem 3rem .c-quickstart__input - display: none + @include size(0) + opacity: 0 + position: absolute + left: -9999px .c-quickstart__label cursor: pointer @@ -25,6 +28,9 @@ &:hover background: lighten($color-theme-light, 5) + .c-quickstart__input:focus + & + border: 1px solid $color-theme + .c-quickstart__input--radio:checked + & color: $color-back border-color: $color-theme @@ -36,8 +42,6 @@ display: inline-block width: 20px height: 20px - position: relative - bottom: 0.2rem border: 1px solid $color-subtle vertical-align: middle margin-right: 1rem diff --git a/website/assets/js/quickstart.js b/website/assets/js/quickstart.js index a5a61661a..5212c46fb 100644 --- a/website/assets/js/quickstart.js +++ b/website/assets/js/quickstart.js @@ -4,4 +4,4 @@ * @author Ines Montani * @version 0.0.1 * @license MIT - */'use strict';var _createClass=function(){function a(b,c){for(var e,d=0;d['+this.dpfx+'-'+c+']'+e+' {display: none}';this._$('['+this.dpfx+'-style="'+c+'"]').textContent=g}},{key:'updateContainer',value:function updateContainer(){if(!this._$('['+this.dpfx+'-results]')){var b=this.childNodes(this.container,'pre'),c=b?b[0]:this._c('pre',this.pfx+'-code'),d=this.childNodes(c,'code')||this.childNodes(this.container,'code'),e=d?d[0]:this._c('code',this.pfx+'-results');e.setAttribute(this.dpfx+'-results','');var f=this.childNodes(e,'span')||this.childNodes(c,'span')||this.childNodes(this.container,'span');f&&f.forEach(function(g){return e.appendChild(g)}),c.appendChild(e),this.container.appendChild(c)}}},{key:'createGroup',value:function createGroup(b){var d=this,c=this._c('div',this.pfx+'-group');c.setAttribute(this.dpfx+'-group',b.id),c.innerHTML=this.createStyles(b.id).outerHTML,c.innerHTML+='
'+b.title+'
',c.innerHTML+='
'+b.options.map(function(e){var f=b.multiple?'checkbox':'radio';return''}).join('')+'
',this.container.insertBefore(c,this.container.firstChild),this.initGroup(c,b.id)}},{key:'createStyles',value:function createStyles(b){var c=this._c('style');return c.setAttribute(this.dpfx+'-style',b),c.textContent='['+this.dpfx+'-results]>['+this.dpfx+'-'+b+'] {display: none}',c}},{key:'childNodes',value:function childNodes(b,c){var d=c.toUpperCase();if(!b.hasChildNodes)return!1;var e=[].concat(_toConsumableArray(b.childNodes)).filter(function(f){return f.nodeName===d});return!!e.length&&e}},{key:'_$',value:function _$(b){return document.querySelector(b)}},{key:'_$$',value:function _$$(b){return[].concat(_toConsumableArray(document.querySelectorAll(b)))}},{key:'_c',value:function _c(b,c){var d=document.createElement(b);return c&&(d.className=c),d}}]),a}(); + */'use strict';var _createClass=function(){function a(b,c){for(var e,d=0;d['+this.dpfx+'-'+c+']'+e+' {display: none}';this._$('['+this.dpfx+'-style="'+c+'"]').textContent=g}},{key:'updateContainer',value:function updateContainer(){if(!this._$('['+this.dpfx+'-results]')){var b=this.childNodes(this.container,'pre'),c=b?b[0]:this._c('pre',this.pfx+'-code'),d=this.childNodes(c,'code')||this.childNodes(this.container,'code'),e=d?d[0]:this._c('code',this.pfx+'-results');e.setAttribute(this.dpfx+'-results','');var f=this.childNodes(e,'span')||this.childNodes(c,'span')||this.childNodes(this.container,'span');f&&f.forEach(function(g){return e.appendChild(g)}),c.appendChild(e),this.container.appendChild(c)}}},{key:'createGroup',value:function createGroup(b){var d=this,c=this._c('fieldset',this.pfx+'-group');c.setAttribute(this.dpfx+'-group',b.id),c.innerHTML=this.createStyles(b.id).outerHTML,c.innerHTML+=''+b.title+'',c.innerHTML+=b.options.map(function(e){var f=b.multiple?'checkbox':'radio';return''}).join(''),this.container.insertBefore(c,this.container.firstChild),this.initGroup(c,b.id)}},{key:'createStyles',value:function createStyles(b){var c=this._c('style');return c.setAttribute(this.dpfx+'-style',b),c.textContent='['+this.dpfx+'-results]>['+this.dpfx+'-'+b+'] {display: none}',c}},{key:'childNodes',value:function childNodes(b,c){var d=c.toUpperCase();if(!b.hasChildNodes)return!1;var e=[].concat(_toConsumableArray(b.childNodes)).filter(function(f){return f.nodeName===d});return!!e.length&&e}},{key:'_$',value:function _$(b){return document.querySelector(b)}},{key:'_$$',value:function _$$(b){return[].concat(_toConsumableArray(document.querySelectorAll(b)))}},{key:'_c',value:function _c(b,c){var d=document.createElement(b);return c&&(d.className=c),d}}]),a}();