forked from Botanical/BotanJS
Style changes
Removed margin for code blocks Reduce the resouces usage Sync color across browsers Using sans-serif font for chinese Fixed the box-sizing for mbody
This commit is contained in:
parent
32804d23fb
commit
9638054956
@ -99,7 +99,3 @@
|
||||
font-size: 1em;
|
||||
color: #76400C;
|
||||
}
|
||||
|
||||
.highlighter-wrapper {
|
||||
margin: 0 1em;
|
||||
}
|
||||
|
@ -40,6 +40,7 @@ div#header, div#mbody, div#contact, div#horizon {
|
||||
|
||||
.mbody {
|
||||
padding: 0 0.25em;
|
||||
box-sizing: border-box;
|
||||
background-color: rgba( 255, 255, 255, 0.5 );
|
||||
}
|
||||
|
||||
@ -49,9 +50,7 @@ div#header, div#mbody, div#contact, div#horizon {
|
||||
}
|
||||
|
||||
.begin-wrapper {
|
||||
background-image: url(/assets/layout-images/home.png);
|
||||
background-position: 50% 0%;
|
||||
background-repeat: no-repeat;
|
||||
background-attachment: fixed;
|
||||
background-size: cover;
|
||||
background-image: linear-gradient( #e2e2e2 .1em, transparent .1em );
|
||||
background-image: -moz-linear-gradient( #eee .1em, transparent .1em );
|
||||
background-size: 100% 1.2em;
|
||||
}
|
||||
|
@ -363,17 +363,8 @@
|
||||
Parallax.attach( window, wsupp, 0.5 );
|
||||
|
||||
var cp = 0;
|
||||
var pp = 0;
|
||||
var bWrapper = Dand.id( "begin-wrapper" );
|
||||
Cycle.perma(
|
||||
"MainBackground"
|
||||
, function()
|
||||
{
|
||||
var p = wsupp.scrollTop / ( wsupp.scrollHeight - wsupp.clientHeight );
|
||||
cp = 0.75 * cp + 0.25 * p;
|
||||
bWrapper.style.backgroundPosition = "50% " + ( cp * 100 ).toFixed( 2 ) + "%";
|
||||
}
|
||||
, 15
|
||||
);
|
||||
};
|
||||
|
||||
Bootstrap.regInit( init );
|
||||
|
@ -25,11 +25,11 @@
|
||||
}
|
||||
|
||||
.flsf {
|
||||
font-family: custom-sans;
|
||||
font-family: custom-sans,Helvetica,Arial,STHeiti,"Microsoft JhengHei","微軟正黑體";
|
||||
}
|
||||
|
||||
.fls {
|
||||
font-family: custom-serif;
|
||||
font-family: custom-serif,Helvetica,Arial,STHeiti,"Microsoft JhengHei","微軟正黑體";
|
||||
}
|
||||
|
||||
.fsf {
|
||||
|
@ -65,22 +65,28 @@
|
||||
}
|
||||
|
||||
var cp = 0;
|
||||
var pp = 0;
|
||||
Cycle.perma(
|
||||
"PARALLAXSCR"
|
||||
, function()
|
||||
{
|
||||
var p = sSupplier.scrollTop/(sSupplier.scrollHeight - sSupplier.clientHeight);
|
||||
cp = 0.85 * cp + p * 0.15;
|
||||
cp = 0.0001 * Math.round( cp * 10000 );
|
||||
|
||||
for(var i = 0; i < l; i ++)
|
||||
if ( pp == cp ) return;
|
||||
|
||||
for( var i = 0; i < l; i ++ )
|
||||
{
|
||||
s = Parallax["s" + i];
|
||||
for(var j = 0, k; j < s.length; j ++)
|
||||
for( var j = 0, k; j < s.length; j ++ )
|
||||
{
|
||||
k = s[j];
|
||||
k.element.style.top = ( -k.verticalRange * ( ( j + 1 ) * cp ) ).toFixed( 2 ) + "%";
|
||||
}
|
||||
}
|
||||
|
||||
pp = cp;
|
||||
}
|
||||
, 15
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user