From ce6e9eb43e3bf8b83f80a16990ac1d9bdae8d957 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=9F=E9=85=8C=20=E9=B5=AC=E5=85=84?= Date: Wed, 8 Jun 2016 23:02:03 +0800 Subject: [PATCH] Utilizing Starfall --- botanjs/src/Astro/Blog/Layout/MainFrame.js | 1 + botanjs/src/Astro/Penguin/Element/Footer.css | 12 --- botanjs/src/Astro/Penguin/Element/Footer.js | 2 - botanjs/src/Astro/Penguin/Element/Header.css | 60 ------------- botanjs/src/Astro/Penguin/Element/Header.js | 1 - botanjs/src/Astro/Penguin/Element/Layer.css | 2 - botanjs/src/Astro/Penguin/Element/Layer.js | 1 - botanjs/src/Astro/Penguin/Layout/MainFrame.js | 87 +------------------ botanjs/src/Astro/Penguin/Page/_this.css | 6 ++ 9 files changed, 10 insertions(+), 162 deletions(-) delete mode 100644 botanjs/src/Astro/Penguin/Element/Footer.css delete mode 100644 botanjs/src/Astro/Penguin/Element/Footer.js delete mode 100644 botanjs/src/Astro/Penguin/Element/Header.css delete mode 100644 botanjs/src/Astro/Penguin/Element/Header.js delete mode 100644 botanjs/src/Astro/Penguin/Element/Layer.css delete mode 100644 botanjs/src/Astro/Penguin/Element/Layer.js diff --git a/botanjs/src/Astro/Blog/Layout/MainFrame.js b/botanjs/src/Astro/Blog/Layout/MainFrame.js index daa3287..733e0b1 100644 --- a/botanjs/src/Astro/Blog/Layout/MainFrame.js +++ b/botanjs/src/Astro/Blog/Layout/MainFrame.js @@ -49,6 +49,7 @@ var topButtons = []; var initTopButton = function() { + var fhorizon = Dand.id( "fhorizon" ); // init params header = Dand.id( "header" ); horizon = Dand.id( "horizon" ); diff --git a/botanjs/src/Astro/Penguin/Element/Footer.css b/botanjs/src/Astro/Penguin/Element/Footer.css deleted file mode 100644 index 5405ed1..0000000 --- a/botanjs/src/Astro/Penguin/Element/Footer.css +++ /dev/null @@ -1,12 +0,0 @@ -footer { - background-color: #001; - background-image: url(/assets/layout-images/lines.png); - background-repeat: no-repeat; - background-position: right bottom; -} - -#fhorizon { - position: absolute; - top: -7px; -} - diff --git a/botanjs/src/Astro/Penguin/Element/Footer.js b/botanjs/src/Astro/Penguin/Element/Footer.js deleted file mode 100644 index 089470d..0000000 --- a/botanjs/src/Astro/Penguin/Element/Footer.js +++ /dev/null @@ -1,2 +0,0 @@ -// __namespace( "Astro.Penguin.Element.Footer" ); -// __import( "Astro.Common.Element.Footer" ); diff --git a/botanjs/src/Astro/Penguin/Element/Header.css b/botanjs/src/Astro/Penguin/Element/Header.css deleted file mode 100644 index b606dd7..0000000 --- a/botanjs/src/Astro/Penguin/Element/Header.css +++ /dev/null @@ -1,60 +0,0 @@ -.home { - position: relative; - width: 100%; - overflow: hidden; -} - -header { - position: relative; -} - -#menu { - font-size: 1.75em; - text-align: right; -} - -#menu > * { - font-family: custom-sans; - cursor: pointer; - line-height: 1em !important; - - position: relative; - - color: rgba( 0, 0, 0, 0.5 ); - -webkit-filter: blur( 2px ); - filter: blur( 2px ); -} - -#menu > *[data-active] { - -webkit-filter: blur( 0px ); - filter: blur( 0px ); - color: navy; -} - -#menu > *:hover { - color: rgba( 0, 0, 0, 0.75 ); - -webkit-filter: blur( 0px ); - filter: blur( 0px ); - text-decoration: none; -} - -.horizon { - position: relative; - width: 100%; - height: 7px; - background: #76400C; - z-index: 4; -} - -.c-sep { - display: inline-block; - width: 1px; - margin: 0 2em; -} -.c-sep:after { - content: ""; - position: absolute; - height: 100%; - border-left: 1px solid black; - top: 0; -} diff --git a/botanjs/src/Astro/Penguin/Element/Header.js b/botanjs/src/Astro/Penguin/Element/Header.js deleted file mode 100644 index 75baf5c..0000000 --- a/botanjs/src/Astro/Penguin/Element/Header.js +++ /dev/null @@ -1 +0,0 @@ -// __namespace( "Astro.Penguin.Element.Header" ); diff --git a/botanjs/src/Astro/Penguin/Element/Layer.css b/botanjs/src/Astro/Penguin/Element/Layer.css deleted file mode 100644 index 65669fa..0000000 --- a/botanjs/src/Astro/Penguin/Element/Layer.css +++ /dev/null @@ -1,2 +0,0 @@ -.mbody { z-index: 1; } -header, footer { z-index: 2; } diff --git a/botanjs/src/Astro/Penguin/Element/Layer.js b/botanjs/src/Astro/Penguin/Element/Layer.js deleted file mode 100644 index 47522ec..0000000 --- a/botanjs/src/Astro/Penguin/Element/Layer.js +++ /dev/null @@ -1 +0,0 @@ -// __namespace( "Astro.Penguin.Element.Layer" ); diff --git a/botanjs/src/Astro/Penguin/Layout/MainFrame.js b/botanjs/src/Astro/Penguin/Layout/MainFrame.js index df35207..0f31e46 100644 --- a/botanjs/src/Astro/Penguin/Layout/MainFrame.js +++ b/botanjs/src/Astro/Penguin/Layout/MainFrame.js @@ -25,56 +25,18 @@ // __import( "Dandelion.CSSReset" ); CSS_RESERVATION // __import( "Dandelion.CSSAnimations" ); CSS_RESERVATION // __import( "Astro.Blog.SharedStyle" ); CSS_RESERVATION - // __import( "Astro.Blog.Element.Layer" ); CSS_RESERVATION - - var main; - var header; - var main_h; - - // menu and horizon - var horizon; - var contaht_page; - var collapse_panel; - var c_expand = false; - var savedPath; + // __import( "Astro.Starfall.Element.Layer" ); CSS_RESERVATION var init = function () { - // Footer at bottom - var padder = Dand.wrap(); - var begin_wrapper = Dand.id( "begin-wrapper" ); - var content_wrapper = Dand.id( "mbody" ); - var footer = Dand.tag( "footer" ); - var fhorizon = Dand.id( "fhorizon" ); - - if( footer.length ) - { - footer = footer[0]; - var fheight = footer.scrollHeight || footer.offsetHeight; - var hheight = fhorizon.scrollHeight || fhorizon.offsetHeight; - - padder.style.height = ( fheight + hheight ) + "px"; - begin_wrapper.style.marginBottom = "-" + fheight + "px"; - } - - content_wrapper.appendChild( padder ); - - IDOMObject( window ).addEventListener( "Resize", responsify ); - initTopButton(); - navControl(); - responsify( null, true ); }; var topButtons = []; var initTopButton = function() { - // init params - header = Dand.id( "header" ); - horizon = Dand.id( "horizon" ); - main = Dand.id( "mbody" ); - - collapse_panel = Dand.id( "collapse_panel" ); + var fhorizon = Dand.id( "fhorizon" ); + var horizon = Dand.id( "horizon" ); horizon.style.backgroundColor = fhorizon.style.backgroundColor @@ -93,48 +55,5 @@ ); }; - var navControl = function () - { - // Page control - /** @type {Dandelion.IDOMElement} */ - var page_control = Dand.id( "top_control", true ); - var bottom_control = Dand.id( "bottom_control" ); - - if ( page_control && bottom_control ) - { - var appendp = function( elem, self ) - { - var clone = elem.cloneNode( true ); - if( clone.className == "p_navigation" ) - { - IDOMElement( clone ).reverseChild(); - } - bottom_control.appendChild( clone ); - return true; - }; - - page_control.last( document.ELEMENT_NODE, appendp ); - page_control.first( document.ELEMENT_NODE, appendp ); - } - }; - - /** @type {Dandelion.IDOMElement} */ - var rspd_ratio = 0; - var responsify = function( e, override ) - { - // Ratio changes would trigger content - var ratio = wsupp.clientWidth / wsupp.clientHeight; - - // Swap only on ration changes from 1 < x OR x < 1 - 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 ); - - BotanJS.dispatchEvent( new BotanEvent( "Responsive", { "ratio": ratio } ) ); - } - }; - - Bootstrap.regInit( init ); })(); diff --git a/botanjs/src/Astro/Penguin/Page/_this.css b/botanjs/src/Astro/Penguin/Page/_this.css index 911669c..42c7bba 100644 --- a/botanjs/src/Astro/Penguin/Page/_this.css +++ b/botanjs/src/Astro/Penguin/Page/_this.css @@ -1,3 +1,9 @@ +#menu > *[data-active] { + -webkit-filter: blur( 0px ); + filter: blur( 0px ); + color: navy; +} + .panel { padding: 0.5em 2em; display: block;