diff --git a/botanjs/src/Astro/Blog/Element/Header.css b/botanjs/src/Astro/Blog/Element/Header.css index a87e5e6..1f04978 100644 --- a/botanjs/src/Astro/Blog/Element/Header.css +++ b/botanjs/src/Astro/Blog/Element/Header.css @@ -25,7 +25,7 @@ header { filter: blur( 2px ); } -#menu > *[active] { +#menu > *[data-active] { -webkit-filter: blur( 0px ); filter: blur( 0px ); color: rgba( 128, 0, 128, 1 ); diff --git a/botanjs/src/Astro/Blog/Layout/MainFrame.js b/botanjs/src/Astro/Blog/Layout/MainFrame.js index b181203..10aba98 100644 --- a/botanjs/src/Astro/Blog/Layout/MainFrame.js +++ b/botanjs/src/Astro/Blog/Layout/MainFrame.js @@ -7,6 +7,8 @@ var Trigger = __import( "System.Cycle.Trigger" ); /** @type {System.utils.IKey} */ var IKey = __import( "System.utils.IKey" ); + /** @type {System.utils.DataKey} */ + var DataKey = __import( "System.utils.DataKey" ); /** @type {Dandelion} */ var Dand = __import( "Dandelion" ); /** @type {Dandelion.IDOMObject} */ @@ -93,10 +95,11 @@ Dand.id( "menu", true ).foreach( 1, function( e ) { + e = IDOMElement( e ); topButtons.push( e ); - if( e.getAttribute( "active" ) !== null ) + if( e.getDAttribute( "active" ) !== null ) { - e.setAttribute( "master", true ); + e.setAttribute( new DataKey( "master", true ) ); } } ); @@ -153,7 +156,7 @@ var ratio = wsupp.clientWidth / wsupp.clientHeight; // Swap only on ration changes from 1 < x OR x < 1 - if( ( ratio < 1 && 1 < rspd_ratio ) || ( 1 < ratio && rspd_ratio < 1 ) || override ) + if( ( ratio < 1.2 && 1.2 < rspd_ratio ) || ( 1.2 < ratio && rspd_ratio < 1.2 ) || override ) { rspd_ratio = ratio; debug.Info( "Responsive Event: R = " + ratio ); @@ -182,8 +185,8 @@ horizon.style.backgroundColor = "dimgray"; - for( var i in topButtons ) topButtons[i].removeAttribute( "active" ); - contact.setAttribute( "active", "" ); + for( var i in topButtons ) topButtons[i].removeAttribute( "data-active" ); + contact.setAttribute( new DataKey( "active" ) ); c_expand = true; }; @@ -211,13 +214,13 @@ for( var i in topButtons ) { - if( topButtons[i].getAttribute( "master" ) ) + if( topButtons[i].getDAttribute( "master" ) ) { - topButtons[i].setAttribute( "active", "" ); + topButtons[i].setAttribute( new DataKey( "active" ) ); } else { - topButtons[i].removeAttribute( "active" ); + topButtons[i].removeAttribute( "data-active" ); } } diff --git a/botanjs/src/Astro/Blog/Layout/TwoColumn.js b/botanjs/src/Astro/Blog/Layout/TwoColumn.js index 74f64f8..4bffede 100644 --- a/botanjs/src/Astro/Blog/Layout/TwoColumn.js +++ b/botanjs/src/Astro/Blog/Layout/TwoColumn.js @@ -16,7 +16,7 @@ , function( e ) { rspd.foreach( document.ELEMENT_NODE - , e.data.ratio < 1 + , e.data.ratio < 1.2 ? function( elem ) { elem.style.width = "100%"; } : function( elem ) { elem.style.width = ""; } );