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:
斟酌 鵬兄 2016-10-14 10:51:59 +08:00
parent 32804d23fb
commit 9638054956
5 changed files with 15 additions and 23 deletions

View File

@ -99,7 +99,3 @@
font-size: 1em;
color: #76400C;
}
.highlighter-wrapper {
margin: 0 1em;
}

View File

@ -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;
}

View File

@ -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 );

View File

@ -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 {

View File

@ -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
);