closes #30
This commit is contained in:
parent
f9731606cb
commit
452b04c1b3
|
@ -3,3 +3,5 @@ node_modules/
|
|||
*.log
|
||||
src/components/
|
||||
config.json
|
||||
vendor/
|
||||
.build_cache~
|
|
@ -0,0 +1,73 @@
|
|||
module.exports = (grunt) ->
|
||||
grunt.initConfig
|
||||
pkg: grunt.file.readJSON("package.json")
|
||||
|
||||
apps_c:
|
||||
commonjs:
|
||||
src: [ 'src/**/*.{coffee,js,eco}' ]
|
||||
dest: 'build/app.js'
|
||||
options:
|
||||
main: 'src/app.coffee'
|
||||
name: [ 'ghbc', 'ghb', 'github-burndown-chart' ]
|
||||
|
||||
stylus:
|
||||
compile:
|
||||
options:
|
||||
paths: [ 'src/styles/app.styl' ]
|
||||
files:
|
||||
'build/app.css': 'src/styles/app.styl'
|
||||
|
||||
concat:
|
||||
scripts:
|
||||
src: [
|
||||
# Vendor dependencies.
|
||||
'vendor/async/lib/async.js'
|
||||
'vendor/d3/d3.js'
|
||||
'vendor/d3-tip/index.js'
|
||||
'vendor/lodash/dist/lodash.js'
|
||||
'vendor/marked/lib/marked.js'
|
||||
'vendor/superagent/superagent.js'
|
||||
# Our app.
|
||||
'build/app.js'
|
||||
]
|
||||
dest: 'build/app.bundle.js'
|
||||
options:
|
||||
separator: ';' # for minification purposes
|
||||
|
||||
styles:
|
||||
src: [
|
||||
# Vendor dependencies.
|
||||
'vendor/normalize-css/normalize.css'
|
||||
# Our style.
|
||||
'build/app.css'
|
||||
]
|
||||
dest: 'build/app.bundle.css'
|
||||
|
||||
uglify:
|
||||
scripts:
|
||||
files:
|
||||
'build/app.min.js': 'build/app.js'
|
||||
'build/app.bundle.min.js': 'build/app.bundle.js'
|
||||
|
||||
cssmin:
|
||||
combine:
|
||||
files:
|
||||
'build/app.min.css': 'build/app.css'
|
||||
'build/app.bundle.min.css': 'build/app.bundle.css'
|
||||
|
||||
grunt.loadNpmTasks('grunt-apps-c')
|
||||
grunt.loadNpmTasks('grunt-contrib-stylus')
|
||||
grunt.loadNpmTasks('grunt-contrib-concat')
|
||||
grunt.loadNpmTasks('grunt-contrib-uglify')
|
||||
grunt.loadNpmTasks('grunt-contrib-cssmin')
|
||||
|
||||
grunt.registerTask('default', [
|
||||
'apps_c'
|
||||
'stylus'
|
||||
'concat'
|
||||
])
|
||||
|
||||
grunt.registerTask('minify', [
|
||||
'uglify'
|
||||
'cssmin'
|
||||
])
|
22
Makefile
22
Makefile
|
@ -1,13 +1,22 @@
|
|||
test:
|
||||
./node_modules/.bin/mocha --compilers coffee:coffee-script --reporter spec --ui exports --bail
|
||||
install:
|
||||
npm install
|
||||
bower install
|
||||
|
||||
build:
|
||||
./node_modules/.bin/apps-b ./src/ ./build/
|
||||
grunt
|
||||
|
||||
minify:
|
||||
grunt minify
|
||||
|
||||
watch:
|
||||
watch --color -n 1 make build
|
||||
|
||||
publish:
|
||||
build
|
||||
minify
|
||||
git checkout gh-pages
|
||||
git show master:build/build.js > build.js
|
||||
git show master:build/build.css > build.css
|
||||
git show master:build/app.bundle.min.js > app.bundle.min.js
|
||||
git show master:build/app.bundle.min.css > app.bundle.min.css
|
||||
git add .
|
||||
@status=$$(git status --porcelain); \
|
||||
if ! test "x$${status}" = x; then \
|
||||
|
@ -16,4 +25,7 @@ publish:
|
|||
fi
|
||||
git checkout master
|
||||
|
||||
test:
|
||||
./node_modules/.bin/mocha --compilers coffee:coffee-script --reporter spec --ui exports --bail
|
||||
|
||||
.PHONY: build test
|
10
README.md
10
README.md
|
@ -90,15 +90,15 @@ Visit the port in question in the browser and continue as before.
|
|||
|
||||
##Build It
|
||||
|
||||
If you would like to run your own build for a custom version of the app, use the [Apps/B Builder](https://github.com/intermine/apps-b-builder).
|
||||
|
||||
In short:
|
||||
If you would like to build a custom version of your app, edit the `Gruntfile.coffee` and run the following:
|
||||
|
||||
```bash
|
||||
$ npm install -d
|
||||
$ make build
|
||||
$ make install
|
||||
$ make build
|
||||
```
|
||||
|
||||
We are using the [Bower](http://bower.io/) package manager and [Grunt](http://gruntjs.com/) task runner.
|
||||
|
||||
##Publish It
|
||||
|
||||
If you would like to track changes to build files in `gh-pages` branch, execute the following command:
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"name": "github-burndown-chart",
|
||||
"version": "1.0.0-alpha",
|
||||
"dependencies": {
|
||||
"lodash": null,
|
||||
"async": null,
|
||||
"d3": null,
|
||||
"d3-tip": null,
|
||||
"superagent": null,
|
||||
"normalize-css": null,
|
||||
"marked": null
|
||||
}
|
||||
}
|
|
@ -1,8 +1,3 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */
|
||||
|
||||
/* ==========================================================================
|
||||
|
@ -410,294 +405,42 @@ table {
|
|||
border-spacing: 0;
|
||||
}
|
||||
|
||||
|
||||
.tip {
|
||||
position: absolute;
|
||||
padding: 5px;
|
||||
z-index: 1000;
|
||||
/* default offset for edge-cases: https://github.com/component/tip/pull/12 */
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
/* effects */
|
||||
|
||||
.tip.fade {
|
||||
transition: opacity 100ms;
|
||||
-moz-transition: opacity 100ms;
|
||||
-webkit-transition: opacity 100ms;
|
||||
}
|
||||
|
||||
.tip-hide {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.tip {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.tip-inner {
|
||||
background-color: rgba(0,0,0,.75);
|
||||
color: #fff;
|
||||
padding: 8px 10px 7px 10px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.tip-inner {
|
||||
border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
}
|
||||
|
||||
.tip-arrow {
|
||||
position: absolute;
|
||||
width: 0;
|
||||
height: 0;
|
||||
line-height: 0;
|
||||
border: 5px dashed rgba(0,0,0,.75);
|
||||
}
|
||||
|
||||
.tip-arrow-north { border-bottom-color: rgba(0,0,0,.75) }
|
||||
.tip-arrow-south { border-top-color: rgba(0,0,0,.75) }
|
||||
.tip-arrow-east { border-left-color: rgba(0,0,0,.75) }
|
||||
.tip-arrow-west { border-right-color: rgba(0,0,0,.75) }
|
||||
|
||||
.tip-north .tip-arrow,
|
||||
.tip-north-east .tip-arrow,
|
||||
.tip-north-west .tip-arrow {
|
||||
top: 0px;
|
||||
left: 50%;
|
||||
margin-left: -5px;
|
||||
border-bottom-style: solid;
|
||||
border-top: none;
|
||||
border-left-color: transparent;
|
||||
border-right-color: transparent
|
||||
}
|
||||
|
||||
.tip-south .tip-arrow,
|
||||
.tip-south-east .tip-arrow,
|
||||
.tip-south-west .tip-arrow {
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
margin-left: -5px;
|
||||
border-top-style: solid;
|
||||
border-bottom: none;
|
||||
border-left-color: transparent;
|
||||
border-right-color: transparent
|
||||
}
|
||||
|
||||
.tip-east .tip-arrow {
|
||||
right: 0;
|
||||
top: 50%;
|
||||
margin-top: -5px;
|
||||
border-left-style: solid;
|
||||
border-right: none;
|
||||
border-top-color: transparent;
|
||||
border-bottom-color: transparent
|
||||
}
|
||||
|
||||
.tip-west .tip-arrow {
|
||||
left: 0;
|
||||
top: 50%;
|
||||
margin-top: -5px;
|
||||
border-right-style: solid;
|
||||
border-left: none;
|
||||
border-top-color: transparent;
|
||||
border-bottom-color: transparent
|
||||
}
|
||||
|
||||
.tip-north-west .tip-arrow,
|
||||
.tip-south-west .tip-arrow {
|
||||
left: 15px;
|
||||
}
|
||||
|
||||
.tip-north-east .tip-arrow,
|
||||
.tip-south-east .tip-arrow {
|
||||
left: 85%;
|
||||
}
|
||||
|
||||
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local('Source Sans Pro'), local('SourceSansPro-Regular'),
|
||||
url("app/styles/../../fonts/SourceSansPro-Regular.woff") format('woff');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
src: local('Source Sans Pro Semibold'), local('SourceSansPro-Semibold'),
|
||||
url("app/styles/../../fonts/SourceSansPro-Semibold.woff") format('woff');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'),
|
||||
url("app/styles/../../fonts/SourceSansPro-Bold.woff") format('woff');
|
||||
}
|
||||
body {
|
||||
height: 100%;
|
||||
background: #d7bcab;
|
||||
background: -moz-linear-gradient(-45deg, #d7bcab 0%, #cc9485 100%);
|
||||
background: -webkit-gradient(linear, left top, right bottom, color-stop(0%, #d7bcab), color-stop(100%, #cc9485));
|
||||
background: -webkit-linear-gradient(-45deg, #d7bcab 0%, #cc9485 100%);
|
||||
background: -o-linear-gradient(-45deg, #d7bcab 0%, #cc9485 100%);
|
||||
background: -ms-linear-gradient(-45deg, #d7bcab 0%, #cc9485 100%);
|
||||
background: linear-gradient(135deg, #d7bcab 0%, #cc9485 100%);
|
||||
background-repeat: no-repeat;
|
||||
background-attachment: fixed;
|
||||
font-family: 'Source Sans Pro', sans-serif;
|
||||
padding: 100px;
|
||||
color: #64584c;
|
||||
}
|
||||
ul {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
}
|
||||
ul li {
|
||||
padding: 0;
|
||||
}
|
||||
h2 {
|
||||
font-size: 16px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.box {
|
||||
background: #fff;
|
||||
box-shadow: 2px 4px 6px rgba(0,0,0,0.2);
|
||||
}
|
||||
.box.generic,
|
||||
.box.info,
|
||||
.box.error,
|
||||
.box.success {
|
||||
padding: 20px 0;
|
||||
border-top: 4px solid #eac85d;
|
||||
width: 50%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.box.info {
|
||||
border-top-color: #5f90b0;
|
||||
}
|
||||
.box.error {
|
||||
border-top-color: #e45e39;
|
||||
}
|
||||
.box.success {
|
||||
border-top-color: #4db07a;
|
||||
}
|
||||
.box a {
|
||||
color: #64584c;
|
||||
}
|
||||
.box h1 {
|
||||
margin: 0;
|
||||
padding: 20px;
|
||||
color: #64584c;
|
||||
font-size: 20px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.box h2 {
|
||||
margin: 0;
|
||||
padding: 0 20px 20px;
|
||||
}
|
||||
.box p {
|
||||
margin: 5px 0;
|
||||
padding: 0 20px;
|
||||
}
|
||||
.box p.description {
|
||||
margin: -10px 0 0 0;
|
||||
}
|
||||
#graph {
|
||||
height: 200px;
|
||||
position: relative;
|
||||
}
|
||||
#graph #tooltip {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
#graph svg path.line {
|
||||
fill: none;
|
||||
stroke-width: 1px;
|
||||
clip-path: url("app/styles/#clip");
|
||||
}
|
||||
#graph svg path.line.actual {
|
||||
stroke: #64584c;
|
||||
stroke-width: 3px;
|
||||
}
|
||||
#graph svg path.line.ideal {
|
||||
stroke: #cacaca;
|
||||
stroke-width: 3px;
|
||||
}
|
||||
#graph svg path.line.trendline {
|
||||
stroke: #64584c;
|
||||
stroke-width: 1.5px;
|
||||
stroke-dasharray: 5, 5;
|
||||
}
|
||||
#graph svg line.today {
|
||||
stroke: #cacaca;
|
||||
stroke-width: 1px;
|
||||
shape-rendering: crispEdges;
|
||||
stroke-dasharray: 5, 5;
|
||||
}
|
||||
#graph svg circle {
|
||||
fill: #64584c;
|
||||
stroke: transparent;
|
||||
stroke-width: 15px;
|
||||
cursor: pointer;
|
||||
}
|
||||
#graph svg .axis {
|
||||
shape-rendering: crispEdges;
|
||||
}
|
||||
#graph svg .axis line {
|
||||
stroke: rgba(202,202,202,0.25);
|
||||
shape-rendering: crispEdges;
|
||||
}
|
||||
#graph svg .axis text {
|
||||
font-weight: bold;
|
||||
fill: #cacaca;
|
||||
}
|
||||
#graph svg .axis path {
|
||||
display: none;
|
||||
}
|
||||
#progress {
|
||||
padding: 20px;
|
||||
border-radius: 0 0 6px 6px;
|
||||
}
|
||||
#progress:after {
|
||||
clear: both;
|
||||
display: block;
|
||||
content: "";
|
||||
}
|
||||
#progress .bars {
|
||||
position: relative;
|
||||
}
|
||||
#progress .bars div {
|
||||
border-radius: 6px;
|
||||
height: 12px;
|
||||
}
|
||||
#progress .bars div.closed {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background: #4daf7c;
|
||||
}
|
||||
#progress .bars div.closed:not(.done) {
|
||||
border-radius: 6px 0 0 6px;
|
||||
}
|
||||
#progress .bars div.opened {
|
||||
width: 100%;
|
||||
background: #e55f3a;
|
||||
}
|
||||
#progress h2 {
|
||||
margin: 10px 0 0 0;
|
||||
padding: 0;
|
||||
}
|
||||
#progress h2.closed {
|
||||
float: left;
|
||||
color: #4daf7c;
|
||||
}
|
||||
#progress h2.opened {
|
||||
float: right;
|
||||
color: #e55f3a;
|
||||
}
|
||||
body{height:100%;background:#d7bcab;background:-moz--webkit-linear-gradient(135deg, #d7bcab 0%, #cc9485 100%);background:-moz--moz-linear-gradient(135deg, #d7bcab 0%, #cc9485 100%);background:-moz--o-linear-gradient(135deg, #d7bcab 0%, #cc9485 100%);background:-moz--ms-linear-gradient(135deg, #d7bcab 0%, #cc9485 100%);background:-moz-linear-gradient(-45deg, #d7bcab 0%, #cc9485 100%);background:-webkit-gradient(linear, left top, right bottom, color-stop(0%, #d7bcab), color-stop(100%, #cc9485));background:-webkit-gradient(linear, left top, right bottom, color-stop(0%, #d7bcab), color-stop(100%, #cc9485));background:-webkit-gradient(linear, left top, right bottom, color-stop(0%, #d7bcab), color-stop(100%, #cc9485));background:-webkit-gradient(linear, left top, right bottom, color-stop(0%, #d7bcab), color-stop(100%, #cc9485));background:-webkit-gradient(linear, left top, right bottom, color-stop(0%, #d7bcab), color-stop(100%, #cc9485));background:-webkit--webkit-linear-gradient(135deg, #d7bcab 0%, #cc9485 100%);background:-webkit--moz-linear-gradient(135deg, #d7bcab 0%, #cc9485 100%);background:-webkit--o-linear-gradient(135deg, #d7bcab 0%, #cc9485 100%);background:-webkit--ms-linear-gradient(135deg, #d7bcab 0%, #cc9485 100%);background:-webkit-linear-gradient(-45deg, #d7bcab 0%, #cc9485 100%);background:-o--webkit-linear-gradient(135deg, #d7bcab 0%, #cc9485 100%);background:-o--moz-linear-gradient(135deg, #d7bcab 0%, #cc9485 100%);background:-o--o-linear-gradient(135deg, #d7bcab 0%, #cc9485 100%);background:-o--ms-linear-gradient(135deg, #d7bcab 0%, #cc9485 100%);background:-o-linear-gradient(-45deg, #d7bcab 0%, #cc9485 100%);background:-ms--webkit-linear-gradient(135deg, #d7bcab 0%, #cc9485 100%);background:-ms--moz-linear-gradient(135deg, #d7bcab 0%, #cc9485 100%);background:-ms--o-linear-gradient(135deg, #d7bcab 0%, #cc9485 100%);background:-ms--ms-linear-gradient(135deg, #d7bcab 0%, #cc9485 100%);background:-ms-linear-gradient(-45deg, #d7bcab 0%, #cc9485 100%);background:-webkit-linear-gradient(315deg, #d7bcab 0%, #cc9485 100%);background:-moz-linear-gradient(315deg, #d7bcab 0%, #cc9485 100%);background:-o-linear-gradient(315deg, #d7bcab 0%, #cc9485 100%);background:-ms-linear-gradient(315deg, #d7bcab 0%, #cc9485 100%);background:linear-gradient(135deg, #d7bcab 0%, #cc9485 100%);background-repeat:no-repeat;background-attachment:fixed;font-family:'Source Sans Pro',sans-serif;padding:100px;color:#64584c}
|
||||
ul{list-style-type:none;padding:0;}
|
||||
ul li{padding:0}
|
||||
h2{font-size:16px;text-transform:uppercase}
|
||||
.box{background:#fff;-webkit-box-shadow:2px 4px 6px rgba(0,0,0,0.2);box-shadow:2px 4px 6px rgba(0,0,0,0.2);}
|
||||
.box.generic,.box.info,.box.error,.box.success{padding:20px 0;border-top:4px solid #eac85d;width:50%;margin:0 auto}
|
||||
.box.info{border-top-color:#5f90b0}
|
||||
.box.error{border-top-color:#e45e39}
|
||||
.box.success{border-top-color:#4db07a}
|
||||
.box a{color:#64584c}
|
||||
.box h1{margin:0;padding:20px;color:#64584c;font-size:20px;text-transform:uppercase}
|
||||
.box h2{margin:0;padding:0 20px 20px}
|
||||
.box p{margin:5px 0;padding:0 20px;}
|
||||
.box p.description{margin:-10px 0 0 0}
|
||||
#graph{height:200px;position:relative;}
|
||||
#graph #tooltip{position:absolute;top:0;left:0}
|
||||
#graph svg path.line{fill:none;stroke-width:1px;clip-path:url("#clip");}
|
||||
#graph svg path.line.actual{stroke:#64584c;stroke-width:3px}
|
||||
#graph svg path.line.ideal{stroke:#cacaca;stroke-width:3px}
|
||||
#graph svg path.line.trendline{stroke:#64584c;stroke-width:1.5px;stroke-dasharray:5,5}
|
||||
#graph svg line.today{stroke:#cacaca;stroke-width:1px;shape-rendering:crispEdges;stroke-dasharray:5,5}
|
||||
#graph svg circle{fill:#64584c;stroke:transparent;stroke-width:15px;cursor:pointer}
|
||||
#graph svg .axis{shape-rendering:crispEdges;}
|
||||
#graph svg .axis line{stroke:rgba(202,202,202,0.25);shape-rendering:crispEdges}
|
||||
#graph svg .axis text{font-weight:bold;fill:#cacaca}
|
||||
#graph svg .axis path{display:none}
|
||||
.d3-tip{margin-top:-10px;font-size:11px;padding:8px 10px 7px 10px;text-align:center;background:rgba(0,0,0,0.75);color:#fff;-webkit-border-radius:3px;border-radius:3px;}
|
||||
.d3-tip:after{width:100%;color:rgba(0,0,0,0.8);content:"\25BC";position:absolute}
|
||||
.d3-tip.n:after{margin:-3px 0 0 0;top:100%;left:0}
|
||||
#progress{padding:20px;-webkit-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;}
|
||||
#progress:after{clear:both;display:block;content:""}
|
||||
#progress .bars{position:relative;}
|
||||
#progress .bars div{-webkit-border-radius:6px;border-radius:6px;height:12px;}
|
||||
#progress .bars div.closed{position:absolute;top:0;left:0;background:#4daf7c;}
|
||||
#progress .bars div.closed:not(.done){-webkit-border-radius:6px 0 0 6px;border-radius:6px 0 0 6px}
|
||||
#progress .bars div.opened{width:100%;background:#e55f3a}
|
||||
#progress h2{margin:10px 0 0 0;padding:0;}
|
||||
#progress h2.closed{float:left;color:#4daf7c}
|
||||
#progress h2.opened{float:right;color:#e55f3a}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,39 @@
|
|||
body{height:100%;background:#d7bcab;background:-moz--webkit-linear-gradient(135deg, #d7bcab 0%, #cc9485 100%);background:-moz--moz-linear-gradient(135deg, #d7bcab 0%, #cc9485 100%);background:-moz--o-linear-gradient(135deg, #d7bcab 0%, #cc9485 100%);background:-moz--ms-linear-gradient(135deg, #d7bcab 0%, #cc9485 100%);background:-moz-linear-gradient(-45deg, #d7bcab 0%, #cc9485 100%);background:-webkit-gradient(linear, left top, right bottom, color-stop(0%, #d7bcab), color-stop(100%, #cc9485));background:-webkit-gradient(linear, left top, right bottom, color-stop(0%, #d7bcab), color-stop(100%, #cc9485));background:-webkit-gradient(linear, left top, right bottom, color-stop(0%, #d7bcab), color-stop(100%, #cc9485));background:-webkit-gradient(linear, left top, right bottom, color-stop(0%, #d7bcab), color-stop(100%, #cc9485));background:-webkit-gradient(linear, left top, right bottom, color-stop(0%, #d7bcab), color-stop(100%, #cc9485));background:-webkit--webkit-linear-gradient(135deg, #d7bcab 0%, #cc9485 100%);background:-webkit--moz-linear-gradient(135deg, #d7bcab 0%, #cc9485 100%);background:-webkit--o-linear-gradient(135deg, #d7bcab 0%, #cc9485 100%);background:-webkit--ms-linear-gradient(135deg, #d7bcab 0%, #cc9485 100%);background:-webkit-linear-gradient(-45deg, #d7bcab 0%, #cc9485 100%);background:-o--webkit-linear-gradient(135deg, #d7bcab 0%, #cc9485 100%);background:-o--moz-linear-gradient(135deg, #d7bcab 0%, #cc9485 100%);background:-o--o-linear-gradient(135deg, #d7bcab 0%, #cc9485 100%);background:-o--ms-linear-gradient(135deg, #d7bcab 0%, #cc9485 100%);background:-o-linear-gradient(-45deg, #d7bcab 0%, #cc9485 100%);background:-ms--webkit-linear-gradient(135deg, #d7bcab 0%, #cc9485 100%);background:-ms--moz-linear-gradient(135deg, #d7bcab 0%, #cc9485 100%);background:-ms--o-linear-gradient(135deg, #d7bcab 0%, #cc9485 100%);background:-ms--ms-linear-gradient(135deg, #d7bcab 0%, #cc9485 100%);background:-ms-linear-gradient(-45deg, #d7bcab 0%, #cc9485 100%);background:-webkit-linear-gradient(315deg, #d7bcab 0%, #cc9485 100%);background:-moz-linear-gradient(315deg, #d7bcab 0%, #cc9485 100%);background:-o-linear-gradient(315deg, #d7bcab 0%, #cc9485 100%);background:-ms-linear-gradient(315deg, #d7bcab 0%, #cc9485 100%);background:linear-gradient(135deg, #d7bcab 0%, #cc9485 100%);background-repeat:no-repeat;background-attachment:fixed;font-family:'Source Sans Pro',sans-serif;padding:100px;color:#64584c}
|
||||
ul{list-style-type:none;padding:0;}
|
||||
ul li{padding:0}
|
||||
h2{font-size:16px;text-transform:uppercase}
|
||||
.box{background:#fff;-webkit-box-shadow:2px 4px 6px rgba(0,0,0,0.2);box-shadow:2px 4px 6px rgba(0,0,0,0.2);}
|
||||
.box.generic,.box.info,.box.error,.box.success{padding:20px 0;border-top:4px solid #eac85d;width:50%;margin:0 auto}
|
||||
.box.info{border-top-color:#5f90b0}
|
||||
.box.error{border-top-color:#e45e39}
|
||||
.box.success{border-top-color:#4db07a}
|
||||
.box a{color:#64584c}
|
||||
.box h1{margin:0;padding:20px;color:#64584c;font-size:20px;text-transform:uppercase}
|
||||
.box h2{margin:0;padding:0 20px 20px}
|
||||
.box p{margin:5px 0;padding:0 20px;}
|
||||
.box p.description{margin:-10px 0 0 0}
|
||||
#graph{height:200px;position:relative;}
|
||||
#graph #tooltip{position:absolute;top:0;left:0}
|
||||
#graph svg path.line{fill:none;stroke-width:1px;clip-path:url("#clip");}
|
||||
#graph svg path.line.actual{stroke:#64584c;stroke-width:3px}
|
||||
#graph svg path.line.ideal{stroke:#cacaca;stroke-width:3px}
|
||||
#graph svg path.line.trendline{stroke:#64584c;stroke-width:1.5px;stroke-dasharray:5,5}
|
||||
#graph svg line.today{stroke:#cacaca;stroke-width:1px;shape-rendering:crispEdges;stroke-dasharray:5,5}
|
||||
#graph svg circle{fill:#64584c;stroke:transparent;stroke-width:15px;cursor:pointer}
|
||||
#graph svg .axis{shape-rendering:crispEdges;}
|
||||
#graph svg .axis line{stroke:rgba(202,202,202,0.25);shape-rendering:crispEdges}
|
||||
#graph svg .axis text{font-weight:bold;fill:#cacaca}
|
||||
#graph svg .axis path{display:none}
|
||||
.d3-tip{margin-top:-10px;font-size:11px;padding:8px 10px 7px 10px;text-align:center;background:rgba(0,0,0,0.75);color:#fff;-webkit-border-radius:3px;border-radius:3px;}
|
||||
.d3-tip:after{width:100%;color:rgba(0,0,0,0.8);content:"\25BC";position:absolute}
|
||||
.d3-tip.n:after{margin:-3px 0 0 0;top:100%;left:0}
|
||||
#progress{padding:20px;-webkit-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;}
|
||||
#progress:after{clear:both;display:block;content:""}
|
||||
#progress .bars{position:relative;}
|
||||
#progress .bars div{-webkit-border-radius:6px;border-radius:6px;height:12px;}
|
||||
#progress .bars div.closed{position:absolute;top:0;left:0;background:#4daf7c;}
|
||||
#progress .bars div.closed:not(.done){-webkit-border-radius:6px 0 0 6px;border-radius:6px 0 0 6px}
|
||||
#progress .bars div.opened{width:100%;background:#e55f3a}
|
||||
#progress h2{margin:10px 0 0 0;padding:0;}
|
||||
#progress h2.closed{float:left;color:#4daf7c}
|
||||
#progress h2.opened{float:right;color:#e55f3a}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1 @@
|
|||
body{height:100%;background:#d7bcab;background:-moz--webkit-linear-gradient(135deg,#d7bcab 0,#cc9485 100%);background:-moz--moz-linear-gradient(135deg,#d7bcab 0,#cc9485 100%);background:-moz--o-linear-gradient(135deg,#d7bcab 0,#cc9485 100%);background:-moz--ms-linear-gradient(135deg,#d7bcab 0,#cc9485 100%);background:-moz-linear-gradient(-45deg,#d7bcab 0,#cc9485 100%);background:-webkit-gradient(linear,left top,right bottom,color-stop(0%,#d7bcab),color-stop(100%,#cc9485));background:-webkit-gradient(linear,left top,right bottom,color-stop(0%,#d7bcab),color-stop(100%,#cc9485));background:-webkit-gradient(linear,left top,right bottom,color-stop(0%,#d7bcab),color-stop(100%,#cc9485));background:-webkit-gradient(linear,left top,right bottom,color-stop(0%,#d7bcab),color-stop(100%,#cc9485));background:-webkit-gradient(linear,left top,right bottom,color-stop(0%,#d7bcab),color-stop(100%,#cc9485));background:-webkit--webkit-linear-gradient(135deg,#d7bcab 0,#cc9485 100%);background:-webkit--moz-linear-gradient(135deg,#d7bcab 0,#cc9485 100%);background:-webkit--o-linear-gradient(135deg,#d7bcab 0,#cc9485 100%);background:-webkit--ms-linear-gradient(135deg,#d7bcab 0,#cc9485 100%);background:-webkit-linear-gradient(-45deg,#d7bcab 0,#cc9485 100%);background:-o--webkit-linear-gradient(135deg,#d7bcab 0,#cc9485 100%);background:-o--moz-linear-gradient(135deg,#d7bcab 0,#cc9485 100%);background:-o--o-linear-gradient(135deg,#d7bcab 0,#cc9485 100%);background:-o--ms-linear-gradient(135deg,#d7bcab 0,#cc9485 100%);background:-o-linear-gradient(-45deg,#d7bcab 0,#cc9485 100%);background:-ms--webkit-linear-gradient(135deg,#d7bcab 0,#cc9485 100%);background:-ms--moz-linear-gradient(135deg,#d7bcab 0,#cc9485 100%);background:-ms--o-linear-gradient(135deg,#d7bcab 0,#cc9485 100%);background:-ms--ms-linear-gradient(135deg,#d7bcab 0,#cc9485 100%);background:-ms-linear-gradient(-45deg,#d7bcab 0,#cc9485 100%);background:-webkit-linear-gradient(315deg,#d7bcab 0,#cc9485 100%);background:-moz-linear-gradient(315deg,#d7bcab 0,#cc9485 100%);background:-o-linear-gradient(315deg,#d7bcab 0,#cc9485 100%);background:-ms-linear-gradient(315deg,#d7bcab 0,#cc9485 100%);background:linear-gradient(135deg,#d7bcab 0,#cc9485 100%);background-repeat:no-repeat;background-attachment:fixed;font-family:'Source Sans Pro',sans-serif;padding:100px;color:#64584c}ul{list-style-type:none;padding:0}ul li{padding:0}h2{font-size:16px;text-transform:uppercase}.box{background:#fff;-webkit-box-shadow:2px 4px 6px rgba(0,0,0,.2);box-shadow:2px 4px 6px rgba(0,0,0,.2)}.box.generic,.box.info,.box.error,.box.success{padding:20px 0;border-top:4px solid #eac85d;width:50%;margin:0 auto}.box.info{border-top-color:#5f90b0}.box.error{border-top-color:#e45e39}.box.success{border-top-color:#4db07a}.box a{color:#64584c}.box h1{margin:0;padding:20px;color:#64584c;font-size:20px;text-transform:uppercase}.box h2{margin:0;padding:0 20px 20px}.box p{margin:5px 0;padding:0 20px}.box p.description{margin:-10px 0 0 0}#graph{height:200px;position:relative}#graph #tooltip{position:absolute;top:0;left:0}#graph svg path.line{fill:none;stroke-width:1px;clip-path:url(#clip)}#graph svg path.line.actual{stroke:#64584c;stroke-width:3px}#graph svg path.line.ideal{stroke:#cacaca;stroke-width:3px}#graph svg path.line.trendline{stroke:#64584c;stroke-width:1.5px;stroke-dasharray:5,5}#graph svg line.today{stroke:#cacaca;stroke-width:1px;shape-rendering:crispEdges;stroke-dasharray:5,5}#graph svg circle{fill:#64584c;stroke:transparent;stroke-width:15px;cursor:pointer}#graph svg .axis{shape-rendering:crispEdges}#graph svg .axis line{stroke:rgba(202,202,202,.25);shape-rendering:crispEdges}#graph svg .axis text{font-weight:700;fill:#cacaca}#graph svg .axis path{display:none}.d3-tip{margin-top:-10px;font-size:11px;padding:8px 10px 7px;text-align:center;background:rgba(0,0,0,.75);color:#fff;-webkit-border-radius:3px;border-radius:3px}.d3-tip:after{width:100%;color:rgba(0,0,0,.8);content:"\25BC";position:absolute}.d3-tip.n:after{margin:-3px 0 0 0;top:100%;left:0}#progress{padding:20px;-webkit-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}#progress:after{clear:both;display:block;content:""}#progress .bars{position:relative}#progress .bars div{-webkit-border-radius:6px;border-radius:6px;height:12px}#progress .bars div.closed{position:absolute;top:0;left:0;background:#4daf7c}#progress .bars div.closed:not(.done){-webkit-border-radius:6px 0 0 6px;border-radius:6px 0 0 6px}#progress .bars div.opened{width:100%;background:#e55f3a}#progress h2{margin:10px 0 0;padding:0}#progress h2.closed{float:left;color:#4daf7c}#progress h2.opened{float:right;color:#e55f3a}
|
File diff suppressed because one or more lines are too long
|
@ -16,7 +16,13 @@
|
|||
"devDependencies": {
|
||||
"mocha": "~1.12.0",
|
||||
"marked": "~0.2.9",
|
||||
"apps-b-builder": "~0.4.0"
|
||||
|
||||
"grunt": "~0.4.1",
|
||||
"grunt-apps-c": "git://github.com/radekstepan/grunt-apps-c.git#master",
|
||||
"grunt-contrib-stylus": "~0.9.0",
|
||||
"grunt-contrib-concat": "~0.3.0",
|
||||
"grunt-contrib-uglify": "~0.2.5",
|
||||
"grunt-contrib-cssmin": "~0.6.2"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "make test"
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
../build/app.bundle.min.css
|
|
@ -0,0 +1 @@
|
|||
../build/app.bundle.min.js
|
|
@ -1 +0,0 @@
|
|||
../build/build.css
|
|
@ -1 +0,0 @@
|
|||
../build/build.js
|
|
@ -4,12 +4,12 @@
|
|||
<meta charset="utf-8">
|
||||
<title>GitHub Burndown Chart</title>
|
||||
|
||||
<link href="build.css" media="all" rel="stylesheet" type="text/css" />
|
||||
<script src="build.js"></script>
|
||||
<link href="app.bundle.min.css" media="all" rel="stylesheet" type="text/css" />
|
||||
<script src="app.bundle.min.js"></script>
|
||||
<script>
|
||||
document.onreadystatechange = function() {
|
||||
if (document.readyState == "complete") {
|
||||
require('app').call(null);
|
||||
require('ghbc').call(null);
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
#!/usr/bin/env coffee
|
||||
async = require 'async'
|
||||
{ _ } = require 'lodash'
|
||||
|
||||
config = require './modules/config'
|
||||
regex = require './modules/regex'
|
||||
render = require './modules/render'
|
||||
|
|
|
@ -1,39 +0,0 @@
|
|||
{
|
||||
"name": "app",
|
||||
"main": "app.js",
|
||||
"version": "1.0.0-alpha",
|
||||
"dependencies": {
|
||||
"lodash/lodash": "*",
|
||||
"caolan/async": "*",
|
||||
"mbostock/d3": "*",
|
||||
"visionmedia/superagent": "*",
|
||||
"necolas/normalize.css": "*",
|
||||
"component/tip": "*",
|
||||
"component/aurora-tip": "*",
|
||||
"component/marked": "*"
|
||||
},
|
||||
"styles": [
|
||||
"styles/fonts.css"
|
||||
],
|
||||
"apps-b": [
|
||||
"app.coffee",
|
||||
|
||||
"modules/config.coffee",
|
||||
"modules/graph.coffee",
|
||||
"modules/issues.coffee",
|
||||
"modules/milestones.coffee",
|
||||
"modules/regex.coffee",
|
||||
"modules/request.coffee",
|
||||
"modules/render.coffee",
|
||||
"modules/repo.coffee",
|
||||
|
||||
"templates/error.eco",
|
||||
"templates/graph.eco",
|
||||
"templates/info.eco",
|
||||
"templates/label.eco",
|
||||
"templates/loading.eco",
|
||||
"templates/progress.eco",
|
||||
|
||||
"styles/app.styl"
|
||||
]
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env coffee
|
||||
{ _ } = require 'lodash'
|
||||
{ _ } = require './require'
|
||||
|
||||
request = require './request'
|
||||
regex = require './regex'
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
#!/usr/bin/env coffee
|
||||
{ _ } = require 'lodash'
|
||||
d3 = require 'd3'
|
||||
Tip = require 'tip'
|
||||
{ _, d3 } = require './require'
|
||||
|
||||
reg = require './regex'
|
||||
|
||||
|
@ -219,7 +217,10 @@ module.exports =
|
|||
.attr("d", line.interpolate("linear").y( (d) -> y(d.points) )(actual))
|
||||
|
||||
# Collect the tooltip here.
|
||||
tooltip = null
|
||||
tooltip = d3.tip().attr('class', 'd3-tip').html ({ number, title }) ->
|
||||
"##{number}: #{title}"
|
||||
|
||||
svg.call(tooltip)
|
||||
|
||||
# Show when we closed an issue.
|
||||
svg.selectAll("a.issue")
|
||||
|
@ -234,19 +235,7 @@ module.exports =
|
|||
.attr("cx", ({ date }) -> x date )
|
||||
.attr("cy", ({ points }) -> y points )
|
||||
.attr("r", ({ radius }) -> 5 ) # fixed for now
|
||||
.on('mouseover', ({ date, points, title, number }) ->
|
||||
# Pass a title string.
|
||||
tooltip = new Tip "##{number}: #{title}"
|
||||
# Absolutely position the div.
|
||||
div = document.querySelector '#tooltip'
|
||||
div.style.left = x(date) + margin.left + 'px'
|
||||
div.style.top = -10 + y(points) + margin.top + 'px'
|
||||
# And now show us on the div.
|
||||
tooltip.show '#tooltip'
|
||||
)
|
||||
.on('mouseout', (d) ->
|
||||
# Hide after a time has passed if exists.
|
||||
tooltip?.hide(200)
|
||||
)
|
||||
.on('mouseover', tooltip.show)
|
||||
.on('mouseout', tooltip.hide)
|
||||
|
||||
cb null
|
|
@ -1,6 +1,5 @@
|
|||
#!/usr/bin/env coffee
|
||||
{ _ } = require 'lodash'
|
||||
async = require 'async'
|
||||
{ _, async } = require './require'
|
||||
|
||||
req = require './request'
|
||||
reg = require './regex'
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#!/usr/bin/env coffee
|
||||
{ _ } = require 'lodash'
|
||||
marked = require 'marked'
|
||||
{ _, marked } = require './require'
|
||||
|
||||
request = require './request'
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#!/usr/bin/env coffee
|
||||
{ _ } = require 'lodash'
|
||||
async = require 'async'
|
||||
{ _, async } = require './require'
|
||||
|
||||
milestones = require './milestones'
|
||||
issues = require './issues'
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
#!/usr/bin/env coffee
|
||||
sa = require 'superagent'
|
||||
{ _ } = require 'lodash'
|
||||
{ superagent, _ } = require './require'
|
||||
|
||||
# Custom JSON parser.
|
||||
sa.parse =
|
||||
superagent.parse =
|
||||
'application/json': (res) ->
|
||||
try
|
||||
JSON.parse res
|
||||
|
@ -29,7 +28,7 @@ module.exports =
|
|||
|
||||
# Get config from our host always.
|
||||
'config': (cb) ->
|
||||
sa
|
||||
superagent
|
||||
.get("http://#{window.location.host + window.location.pathname}config.json")
|
||||
.set('Content-Type', 'application/json')
|
||||
.end _.partialRight respond, cb
|
||||
|
@ -39,7 +38,7 @@ request = ({ protocol, host, token, path }, query, noun, cb) ->
|
|||
# Make the query params.
|
||||
q = ( "#{k}=#{v}" for k, v of query ).join('&')
|
||||
|
||||
req = sa
|
||||
req = superagent
|
||||
# The URI.
|
||||
.get("#{protocol}://#{host}/repos/#{path}/#{noun}?#{q}")
|
||||
# The content type.
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
#!/usr/bin/env coffee
|
||||
# So we can easily stub these.
|
||||
module.exports = {
|
||||
_, superagent, d3, async, marked
|
||||
}
|
|
@ -1,3 +1,5 @@
|
|||
@import 'nib'
|
||||
|
||||
// color definitions
|
||||
$closed = #4DAF7C
|
||||
$opened = #E55F3A
|
||||
|
@ -138,6 +140,27 @@ h2
|
|||
path
|
||||
display: none
|
||||
|
||||
// tooltips
|
||||
.d3-tip
|
||||
margin-top: -10px
|
||||
font-size: 11px
|
||||
padding: 8px 10px 7px 10px
|
||||
text-align: center
|
||||
background: rgba(0,0,0,0.75)
|
||||
color: #fff
|
||||
border-radius: 3px
|
||||
|
||||
&:after
|
||||
width: 100%
|
||||
color: rgba(0,0,0,0.8)
|
||||
content: "\25BC"
|
||||
position: absolute
|
||||
|
||||
&.n:after
|
||||
margin: -3px 0 0 0
|
||||
top: 100%
|
||||
left: 0
|
||||
|
||||
// progression graph
|
||||
#progress
|
||||
padding: 20px
|
||||
|
|
|
@ -7,6 +7,12 @@ req = {}
|
|||
|
||||
config = proxy path.resolve(__dirname, '../src/modules/config.coffee'),
|
||||
'./request': req
|
||||
'./require':
|
||||
'_': require 'lodash'
|
||||
'superagent': null
|
||||
'd3': null
|
||||
'async': null
|
||||
'marked': null
|
||||
|
||||
{ size_label } = require path.resolve __dirname, '../src/modules/regex.coffee'
|
||||
|
||||
|
|
|
@ -9,6 +9,12 @@ regex = require path.resolve(__dirname, '../src/modules/regex.coffee')
|
|||
|
||||
issues = proxy path.resolve(__dirname, '../src/modules/issues.coffee'),
|
||||
'./request': req
|
||||
'./require':
|
||||
'_': require 'lodash'
|
||||
'superagent': null
|
||||
'd3': null
|
||||
'async': require 'async'
|
||||
'marked': null
|
||||
|
||||
repo = { 'milestone': { 'number': no } }
|
||||
|
||||
|
|
|
@ -7,6 +7,12 @@ req = {}
|
|||
|
||||
milestones = proxy path.resolve(__dirname, '../src/modules/milestones.coffee'),
|
||||
'./request': req
|
||||
'./require':
|
||||
'_': require 'lodash'
|
||||
'superagent': null
|
||||
'd3': null
|
||||
'async': null
|
||||
'marked': require 'marked'
|
||||
|
||||
module.exports =
|
||||
|
||||
|
@ -166,8 +172,6 @@ module.exports =
|
|||
do done
|
||||
|
||||
'milestones - has description': (done) ->
|
||||
marked = require 'marked'
|
||||
|
||||
req.all_milestones = (opts, cb) ->
|
||||
cb null, [
|
||||
{
|
||||
|
|
|
@ -10,7 +10,12 @@ class Superagent
|
|||
end: (cb) -> cb @response
|
||||
|
||||
request = proxy path.resolve(__dirname, '../src/modules/request.coffee'),
|
||||
'./require':
|
||||
'_': require 'lodash'
|
||||
'superagent': sa = new Superagent()
|
||||
'd3': null
|
||||
'async': null
|
||||
'marked': null
|
||||
|
||||
module.exports =
|
||||
|
||||
|
|
Loading…
Reference in New Issue