New site for generating "tgckpg.github.io"

This commit is contained in:
斟酌 鵬兄 2016-04-27 23:44:49 +08:00
parent b816d0cd57
commit ebe1745429
10 changed files with 333 additions and 0 deletions

View File

@ -0,0 +1,12 @@
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;
}

View File

@ -0,0 +1,2 @@
// __namespace( "Astro.Penguin.Element.Footer" );
// __import( "Astro.Common.Element.Footer" );

View File

@ -0,0 +1,60 @@
.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;
}

View File

@ -0,0 +1 @@
// __namespace( "Astro.Penguin.Element.Header" );

View File

@ -0,0 +1,2 @@
.mbody { z-index: 1; }
header, footer { z-index: 2; }

View File

@ -0,0 +1 @@
// __namespace( "Astro.Penguin.Element.Layer" );

View File

@ -0,0 +1,105 @@
html, body { height: 100%; }
html { background-color: #222; }
body {
background-color: #F0F0F0;
font-family: custom-sans,Helvetica,Arial,STHeiti,"Microsoft JhengHei","微軟正黑體";
}
pre { font-family: monospace; }
::selection {
color: white;
background: navy;
}
::-moz-selection {
color: white;
background: navy;
}
p { padding: 0.25em 0.5em; }
a {
color: #333;
text-decoration: none;
}
textarea {
font-family: monospace;
}
sup { vertical-align: super; }
a:hover { text-decoration: underline; }
.clearfix {
clear: both;
padding: 0 !important;
margin: 0 !important;
}
.begin-wrapper {
position: relative;
min-height: 100%;
background-color: #EBEAEF;
overflow: hidden;
}
.mbody {
position: relative;
width: 100%;
}
.main-column {
width: 85%;
margin: 0 auto;
}
.right { text-align: right; }
.panel { padding: 0.5em 1.2em 1.2em 1.2em; }
/* transition properties */
div#header, div#mbody, div#contact, div#horizon {
-webkit-transition: all 500ms cubic-bezier(0.770, 0.000, 0.175, 1.000);
-moz-transition: all 500ms cubic-bezier(0.770, 0.000, 0.175, 1.000);
-ms-transition: all 500ms cubic-bezier(0.770, 0.000, 0.175, 1.000);
-o-transition: all 500ms cubic-bezier(0.770, 0.000, 0.175, 1.000);
transition: all 500ms cubic-bezier(0.770, 0.000, 0.175, 1.000); /* easeInOutQuart */
-webkit-transition-timing-function: cubic-bezier(0.770, 0.000, 0.175, 1.000);
-moz-transition-timing-function: cubic-bezier(0.770, 0.000, 0.175, 1.000);
-ms-transition-timing-function: cubic-bezier(0.770, 0.000, 0.175, 1.000);
-o-transition-timing-function: cubic-bezier(0.770, 0.000, 0.175, 1.000);
transition-timing-function: cubic-bezier(0.770, 0.000, 0.175, 1.000); /* easeInOutQuart */
}
@keyframes spin {
0% { transform: rotate( 0deg ); }
25% { transform: rotate( 90deg ); }
50% { transform: rotate( 180deg ); }
75% { transform: rotate( 270deg ); }
100% { transform: rotate( 360deg ); }
}
@keyframes aspin {
0% { transform: rotate( 0deg ); }
25% { transform: rotate( -90deg ); }
50% { transform: rotate( -180deg ); }
75% { transform: rotate( -270deg ); }
100% { transform: rotate( -360deg ); }
}
.spin {
animation-duration: 60s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-name: aspin;
}
.cw { animation-name: spin; }
/* end transition properties */

View File

@ -0,0 +1,140 @@
(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 {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} */
var IDOMObject = __import( "Dandelion.IDOMObject" );
/** @type {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.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;
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" );
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 ) );
}
}
);
};
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 );
})();

View File

@ -0,0 +1,8 @@
.panel {
padding: 0.5em 2em;
display: block;
}
ol {
padding: 0 2em;
}

View File

@ -0,0 +1,2 @@
// __namespace( "Astro.Penguin.Page" );
// __import( "Astro.Penguin.Layout.MainFrame" );