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