Astro Classes

This commit is contained in:
2015-08-14 21:06:23 +08:00
parent d3f924adf3
commit 0a25f87965
157 changed files with 11676 additions and 2 deletions

View File

@@ -0,0 +1,24 @@
.build-list > a {
font-family: monospace;
padding: 0.25em 0.25em;
margin: 0.25em 0;
display: block;
}
.build-list > a[data-status^="-"] > .newsha {
color: red;
}
.build-list > a > .newsha {
color: green;
}
.newsha {
color: white;
}
.build-list > a * {
padding: 0.25em 0.5em;
margin: 0.25em 0;
}

View File

@@ -0,0 +1 @@
// __namespace( "Astro.Build.Components.BuildList" );

View File

@@ -0,0 +1,67 @@
.build-report > pre {
padding: 2em;
border-width: 1px;
color: #C2C5C9;
background-color: #0C121B;
word-wrap: break-word;
}
.build-report > pre.ok {
}
.build-status {
color: #888;
padding-left: 2em;
margin-bottom: 0.5em;
}
.build-status > * .ok { color: green; }
.build-status > * .failed { color: darkred; }
.build-commit-message {
font-family: monospace;
padding: 0.2em 0;
}
#commit-sha { color: #666; }
#commit-sha.ok { color: royalblue; }
#commit-sha.failed { color: orangered; }
.section {
position: relative;
margin: 1em -2em;
padding: 2em;
background-color: black;
color: #909396;
}
.section:hover {
color: inherit;
}
.section:before {
content: attr(data-name);
right: 0.2em;
bottom: 0;
font-family: custom-sans;
font-size: 2em;
color: #C2C5C9;
position: absolute;
}
.section:hover:before {
color: #909396;
}
.status.failed { color: orangered; }
.status.ok { color: yellowgreen; }

View File

@@ -0,0 +1,55 @@
(function(){
var ns = __namespace( "Astro.Build.Components.BuildReport" );
/** @type {System.utils.IKey} */
var IKey = __import( "System.utils.IKey" );
/** @type {Dandelion} */
var Dand = __import( "Dandelion" );
/** @type {Astro.Bootstrap} */
var Bootstrap = __import( "Astro.Bootstrap" );
/** @type {System.Debug} */
var debug = __import( "System.Debug" );
var getData = __import( "System.Net.getData" );
var init = function()
{
var commit = Dand.id( "commit-sha", true );
var putCommitMessage = function( e )
{
Dand.id( "commit-message" ).innerHTML = e || "Failed to load message";
commit.setAttribute( new IKey( "class", e ? "ok" : "failed" ) )
};
sanitizeReport();
getData( "/" + commit.getDAttribute( "project" ) + "/commit-message/" + commit.getDAttribute( "sha" ), putCommitMessage, putCommitMessage );
};
var sanitizeReport = function()
{
var buildMessage = Dand.id( "build-message" );
var message = buildMessage.innerHTML.replace( );
var sRegEx = /[\r\n]*{CI_SECTION_START}[\r\n\s]*(.*)[\r\n]*/g;
var eRegEx = /[\r\n]*{CI_SECTION_END}[\r\n]*/g;
var sCount = ( message.match( sRegEx ) || [] ).length;
if( !sCount ) return;
if( sCount != ( message.match( eRegEx ) || [] ).length )
{
debug.Error( new Error( "Section Flag count mismatch" ) );
return;
}
buildMessage.innerHTML = message
.replace( sRegEx, "<pre class=\"section\" data-name=\"$1\">" )
.replace( eRegEx, "</pre>" )
.replace( /: (failed|ok)\n/g, ": <span class=\"status $1\">$1</span>\n" )
;
};
Bootstrap.regInit( init );
})();

View File

@@ -0,0 +1,59 @@
div.project-list > a * {
-webkit-transition: all .25s;
-moz-transition: all .25s;
-o-transition: all .25s;
transition: all .25s;
}
div.project-list > a {
width: 100%;
height: 50px;
color: #909396;
background-color: #48494A;
font-size: 4em;
text-align: right;
display: block;
overflow: hidden;
position: relative;
margin: 0.2em 0;
-webkit-transition: all .5s;
-moz-transition: all .5s;
-o-transition: all .5s;
transition: all .5s;
box-sizing: border-box;
}
div.project-list > a:after {
content: attr(data-desc);
color: #C2C5C9;
font-size: 0.25em;
padding: 0.25em 0.5em;
top: 0;
display: block;
position: absolute;
-webkit-transition: all .5s;
-moz-transition: all .5s;
-o-transition: all .5s;
transition: all .5s;
}
div.project-list > a:hover {
padding-right: 0.25em;
}
div.project-list > a:hover:after {
padding-left: 1em;
}

View File

@@ -0,0 +1 @@
// __namespace( "Astro.Build.Components.ItemList" );

View File

@@ -0,0 +1,12 @@
footer:before {
content: '';
width: 100%;
height: 0.5em;
background-color: #3A68B2;
display: block;
}
.footer_bg { width: 75%; }

View File

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

View File

@@ -0,0 +1,87 @@
header {
position: relative;
border-bottom: 0.5em solid #3A68B2;
}
header:before {
content: '';
width: 100%;
bottom: 0;
display: block;
position: absolute;
}
.left, .right {
width: 50%;
display: block;
}
.right {
position: absolute;
top: 0;
right: 0;
}
nav {
width: 75%;
margin: 0 auto;
}
nav div ul {
list-style: none;
font-size: 1.5em;
}
nav div ul:after {
content: "";
clear: both;
display: block;
}
nav div ul ul {
top: 100%;
left: 0;
min-width: 5em;
display: none;
position: absolute;
}
nav div ul li {
padding: 0.25em 0.5em 0 0.25em;
float: right;
position: relative;
}
nav div ul li:hover {
}
nav div ul li a {
color: #C2C5C9;
}
nav div.right ul { float: right; }
nav div ul li:hover > ul {
display: block;
}
svg.banner-deco {
float: right;
width: 68em;
height: 10em;
}
nav sup {
font-size: 50%;
vertical-align: top;
}
.header-padder {
clear: both;
}

View File

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

View File

@@ -0,0 +1,86 @@
html, body { height: 100%; }
html { background-color: #222; }
body {
font-family: custom-sans;
}
header, footer { background-color: #0C121B; }
.content-wrapper {
position: relative;
margin: 0 auto;
padding: 2em;
width: 75%;
background-color: rgba( 255, 255, 255, 0.6 );
}
.begin-wrapper {
position: relative;
min-height: 100%;
color: #0C121B;
background-color: white; /*#C2C5C9*/
overflow: hidden;
}
.block_deco {
position: absolute;
width: 100%;
height: 400px;
bottom: 1000%;;
right: -27px;
background: url("http://file.astropenguin.net/blog/layout-images/build - blockdeco.png") no-repeat right bottom;
}
* html .begin-wrapper { height: 100%; }
.working-in-progress {
width: 100%;
height: 2em;
color: white;
background-color: black;
background-image: repeating-linear-gradient(-35deg, transparent, transparent 35px, yellow 35px, yellow 70px);
position: relative;
display: block;
}
a {
color: #3A68B2;/*#48494A;*/
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
h1, h2, h3, h4 { font-family: custom-serif; }
h1 { font-size: 2em; }
h2 { font-size: 1.5em; }
h3 { font-size: 1.2em; }
ul.breadcrumb > li {
display: inline-block;
}
ul.breadcrumb > li:first-child:before {
content: "";
position: absolute;
}
ul.breadcrumb > li:before {
content: ">";
color: rgba( 0, 0, 0, 0.2 );
}
.greyed { color: #C2C5C9; }

View File

@@ -0,0 +1,88 @@
(function(){
var ns = __namespace( "Astro.Build.Layout.MainFrame" );
var Dand = __import( "Dandelion" );
/** @type {Astro.Bootstrap} */
var Bootstrap = __import( "Astro.Bootstrap" );
/** @type {Dandelion.IDOMElement} */
var IDOMElement = __import( "Dandelion.IDOMElement" );
/** @type {Astro.Mechanism.CharacterCloud} */
var CharacterCloud = __import( "Astro.Mechanism.CharacterCloud" );
/** @type {Astro.Mechanism.Parallax} */
var Parallax = __import( "Astro.Mechanism.Parallax" );
/** @type {Dandelion.Window} */
var wsupp = __import( "Dandelion.Window" );
// __import( "Dandelion.CSSReset" ); CSS_RESERVATION
// __import( "Dandelion.CSSAnimations" ); CSS_RESERVATION
var init = function ()
{
var padder = Dand.id( "padder" );
var wrapper = Dand.id( "wrapper" );
var footer = Dand.tag( "footer" );
var fheight = 0;
if( footer.length )
{
footer = footer[0];
fheight = ( footer.scrollHeight || footer.offsetHeight );
padder.style.height = fheight + "px";
wrapper.style.marginBottom = "-" + padder.style.height;
}
block_deco.style.bottom = ( fheight - 72 ) + "px";
initBackgroundParallax();
};
var initBackgroundParallax = function ()
{
var bg = Dand.id("main_background")
// far from observer
, slide_1 = { lowerLimit: 70, upperLimit: 100 }
// bottom cloud, concentrated
, slide_2a = { lowerLimit: 0, upperLimit: 200 }
, slide_2b = { lowerLimit: 0, upperLimit: 200 }
, slide_2c = { lowerLimit: 0, upperLimit: 200 }
, slide_3 = { lowerLimit: 20, upperLimit: 100 }
, slide_4 = { lowerLimit: 70, upperLimit: 100 }
, cloudRange_1 = { lowerLimit: 0, upperLimit: 100, leftLimit: -10, rightLimit: 110 }
, cloudRange_2a = { lowerLimit: 0, upperLimit: 200, leftLimit: -10, rightLimit: 110 }
, cloudRange_2b = { lowerLimit: 0, upperLimit: 300, leftLimit: -10, rightLimit: 110 }
, cloudRange_2c = { lowerLimit: 0, upperLimit: 400, leftLimit: -10, rightLimit: 110 }
, cloudRange_3 = { lowerLimit: 0, upperLimit: 300, leftLimit: -10, rightLimit: 110 }
, cloudRange_4 = { lowerLimit: 80, upperLimit: 100, leftLimit: -10, rightLimit: 110 }
, cCloudSymbol = ["\u25C6", "\u25C7", "\u25C8"]
, cCloudSymbol2 = ["\u25C6", "\u25C7"]
, colors = ["909396", "0C121B", "3A68B2", "48494A"]
, i = new Date().getDay()
, cCloud_1 = CharacterCloud.create( cCloudSymbol2, null, 20, cloudRange_1 )
, cCloud_2a = CharacterCloud.create( cCloudSymbol, null, 20, cloudRange_2a )
, cCloud_2b = CharacterCloud.create( cCloudSymbol, null, 30, cloudRange_2b, 10 )
, cCloud_2c = CharacterCloud.create( cCloudSymbol, null, 80, cloudRange_2c, 5 )
, cCloud_3 = CharacterCloud.create( cCloudSymbol2, null, 20, cloudRange_3 )
, cCloud_4 = CharacterCloud.create( cCloudSymbol2, null, 20, cloudRange_4 );
bg.appendChild( Parallax.cssSlide( cCloud_1, 0, slide_1 ) );
bg.appendChild( Parallax.cssSlide( cCloud_2a, 1, slide_2a ) );
bg.appendChild( Parallax.cssSlide( cCloud_2b, 1, slide_2b ) );
bg.appendChild( Parallax.cssSlide( cCloud_2c, 1, slide_2c ) );
bg.appendChild( Parallax.cssSlide( cCloud_3, 2, slide_3 ) );
bg.appendChild( Parallax.cssSlide( cCloud_4, 3, slide_4 ) );
IDOMElement( bg ).foreach( 1, function(e)
{
e.style.color = "#" + colors[i ++];
if (colors.length < i) i = 0;
});
Parallax.attach( window, wsupp, 0.3 );
};
Bootstrap.regInit( init );
})();

View File

@@ -0,0 +1,11 @@
ol.numlist {
counter-reset: item;
}
ol.numlist > li:before {
display: inline-block;
content: counter(item);
counter-increment: item;
width: 1.2em;
text-align: center;
}

View File

@@ -0,0 +1 @@
// var ns = __namespace( "Astro.Build.Page.About" );

View File

@@ -0,0 +1,24 @@
.site-news { font-family: monospace; }
.site-news > span { display: block; }
.rbuilds > a { display: block; }
.rbuilds > a > span {
padding: 0 0.5em;
}
.bstatus {
color: red;
margin: 0 0.2em;
}
.bstatus[data-ok=true] {
color: green;
}
.bstatus:before {
content: "Failed";
}
.bstatus[data-ok=true]:before {
content: "OK";
}

View File

@@ -0,0 +1 @@
// var ns = __namespace( "Astro.Build.Page.Index" );

View File

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