penguin/AstroJS

Javascript framework for my blog

botanjs/src/Astro/Penguin/Layout/MainFrame.js

raw ยท 2074 bytes

(function(){
	var ns = __namespace( "Astro.Penguin.Layout.MainFrame" );

	/** @type {System.Cycle} */
	var Cycle                                         = __import( "System.Cycle" );
	/** @type {System.Cycle.Trigger} */
	var Trigger                                       = __import( "System.Cycle.Trigger" );
	/** @type {typeof System.utils.IKey} */
	var IKey                                          = __import( "System.utils.IKey" );
	/** @type {typeof System.utils.DataKey} */
	var DataKey                                       = __import( "System.utils.DataKey" );
	/** @type {typeof Dandelion} */
	var Dand                                          = __import( "Dandelion" );
	/** @type {Dandelion.IDOMObject} */
	var IDOMObject                                    = __import( "Dandelion.IDOMObject" );
	/** @type {function(...?): Dandelion.IDOMElement} */
	var IDOMElement                                   = __import( "Dandelion.IDOMElement" );
	/** @type {Dandelion.Window} */
	var wsupp                                         = __import( "Dandelion.Window" );
	/** @type {System.Debug} */
	var debug                                         = __import( "System.Debug" );
	/** @type {Astro.Bootstrap} */
	var Bootstrap                                     = __import( "Astro.Bootstrap" );

	// __import( "Dandelion.CSSReset" ); CSS_RESERVATION
	// __import( "Dandelion.CSSAnimations" ); CSS_RESERVATION
	// __import( "Astro.Blog.SharedStyle" ); CSS_RESERVATION
	// __import( "Astro.Starfall.Element.Layer" ); CSS_RESERVATION

	var init = function ()
	{
		initTopButton();
	};

	var topButtons = [];
	var initTopButton = function()
	{
		var fhorizon = Dand.id( "fhorizon" );
		var horizon = Dand.id( "horizon" );

		horizon.style.backgroundColor
			= fhorizon.style.backgroundColor
			= "navy";

		Dand.id( "menu", true ).foreach(
			1, function( e )
			{
				e = IDOMElement( e );
				topButtons.push( e );
				if( e.getDAttribute( "active" ) !== null )
				{
					e.setAttribute( new DataKey( "master", true ) );
				}
			}
		);
	};

	Bootstrap.regInit( init );
})();