mirror of
https://github.com/status-im/burnchart.git
synced 2025-01-27 10:54:59 +00:00
show different page titles
This commit is contained in:
parent
4aa13d6133
commit
5cef4596be
@ -15,15 +15,18 @@ GitHub Burndown Chart as a service. Public repos are free, for private access au
|
||||
|
||||
### The 20%
|
||||
|
||||
- [ ] Handle [404](https://www.firebase.com/docs/hosting/guide/url-redirects-rewrites.html#section-404) on routes; from catch all check if '/' or go 404 controller
|
||||
- [ ] allow `pushState` when [Firebase hosted](https://www.firebase.com/docs/hosting/guide/url-redirects-rewrites.html#section-rewrites)
|
||||
- [ ] progress needs to be calculated based on strategy even on homepage, then sort the milestones based on priority
|
||||
- [ ] calculate left margin based on the total number of points text width
|
||||
- [ ] Do not show login/logged-in state when we are still fetching that information from Firebase
|
||||
- [ ] Handle 404 on routes; from catch all check if '/' or go 404 controller
|
||||
- [ ] Variable document.title on different pages
|
||||
- [ ] local storage is getting reset
|
||||
- [ ] a bit of a freeze when fetching `mbostock/d3`
|
||||
- [ ] Validate repo input and show a loading sign of sorts
|
||||
- [ ] Check that we have not run out of requests to make
|
||||
- [ ] Show loading sign on top of [browser window](https://github.com/buunguyen/topbar) which is unobtrusive enough we can show it immediately.
|
||||
- [ ] show a countdown clock towards the end of the milestone or show overdue
|
||||
- [x] Variable document.title on different pages
|
||||
- [x] be able to go back to homepage
|
||||
- [x] deal with no due date milestones - always on track
|
||||
- [x] show title on the chart page
|
||||
|
@ -39973,7 +39973,7 @@ if (typeof exports === 'object') {
|
||||
// app.coffee
|
||||
root.require.register('burnchart/src/app.js', function(exports, require, module) {
|
||||
|
||||
var App, Header, el, key, mediator, route, router, _i, _len, _ref;
|
||||
var App, Header, Router, key, _i, _len, _ref;
|
||||
|
||||
_ref = ['utils/mixins', 'models/projects'];
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
@ -39981,41 +39981,17 @@ if (typeof exports === 'object') {
|
||||
require("./" + key);
|
||||
}
|
||||
|
||||
Router = require('./modules/router');
|
||||
|
||||
Header = require('./views/header');
|
||||
|
||||
mediator = require('./modules/mediator');
|
||||
|
||||
el = '#page';
|
||||
|
||||
route = function(page, req, evt) {
|
||||
var Page;
|
||||
document.title = 'BurnChart: GitHub Burndown Chart as a Service';
|
||||
Page = require("./views/pages/" + page);
|
||||
return new Page({
|
||||
el: el,
|
||||
'data': {
|
||||
'route': req.params
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
router = {
|
||||
'': _.partial(route, 'index'),
|
||||
'project/add': _.partial(route, 'addProject'),
|
||||
'chart/:owner/:name/:milestone': _.partial(route, 'showChart'),
|
||||
'reset': function() {
|
||||
mediator.fire('!projects/clear');
|
||||
return window.location.hash = '#';
|
||||
}
|
||||
};
|
||||
|
||||
App = Ractive.extend({
|
||||
'template': require('./templates/layout'),
|
||||
'components': {
|
||||
Header: Header
|
||||
},
|
||||
init: function() {
|
||||
return Grapnel.listen(router);
|
||||
return new Router();
|
||||
}
|
||||
});
|
||||
|
||||
@ -40709,6 +40685,43 @@ if (typeof exports === 'object') {
|
||||
|
||||
});
|
||||
|
||||
// router.coffee
|
||||
root.require.register('burnchart/src/modules/router.js', function(exports, require, module) {
|
||||
|
||||
var el, mediator, route, router;
|
||||
|
||||
mediator = require('./mediator');
|
||||
|
||||
el = '#page';
|
||||
|
||||
route = function(page, req, evt) {
|
||||
var Page;
|
||||
Page = require("../views/pages/" + page);
|
||||
return new Page({
|
||||
el: el,
|
||||
'data': {
|
||||
'route': req.params
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
router = {
|
||||
'': _.partial(route, 'index'),
|
||||
'project/add': _.partial(route, 'addProject'),
|
||||
'chart/:owner/:name/:milestone': _.partial(route, 'showChart'),
|
||||
'reset': function() {
|
||||
mediator.fire('!projects/clear');
|
||||
return window.location.hash = '#';
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = function() {
|
||||
Grapnel.listen(router);
|
||||
return router;
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
// header.mustache
|
||||
root.require.register('burnchart/src/templates/header.js', function(exports, require, module) {
|
||||
|
||||
@ -40742,7 +40755,7 @@ if (typeof exports === 'object') {
|
||||
// showChart.mustache
|
||||
root.require.register('burnchart/src/templates/pages/showChart.js', function(exports, require, module) {
|
||||
|
||||
module.exports = ["<div id=\"title\">"," <div class=\"wrap\">"," <h2 class=\"title\">{{ milestone.title }}</h2>"," <span class=\"sub\">{{ format.due(milestone.due_on) }}</span>"," <p class=\"description\">{{{ format.markdown(milestone.description) }}}</p>"," </div>","</div>","","<div id=\"content\" class=\"wrap\">"," <div id=\"chart\">"," <div id=\"svg\"></div>"," </div>","</div>"].join("\n");
|
||||
module.exports = ["<div id=\"title\">"," <div class=\"wrap\">"," <h2 class=\"title\">{{ milestone.title }}</h2>"," <span class=\"sub\">{{{ format.due(milestone.due_on) }}}</span>"," <p class=\"description\">{{{ format.markdown(milestone.description) }}}</p>"," </div>","</div>","","<div id=\"content\" class=\"wrap\">"," <div id=\"chart\">"," <div id=\"svg\"></div>"," </div>","</div>"].join("\n");
|
||||
});
|
||||
|
||||
// projects.mustache
|
||||
@ -40904,6 +40917,7 @@ if (typeof exports === 'object') {
|
||||
'adapt': [Ractive.adaptors.Ractive],
|
||||
init: function() {
|
||||
var autocomplete;
|
||||
document.title = 'Add a new project';
|
||||
autocomplete = function(value) {};
|
||||
this.observe('value', _.debounce(autocomplete, 200), {
|
||||
'init': false
|
||||
@ -40942,6 +40956,9 @@ if (typeof exports === 'object') {
|
||||
},
|
||||
'data': {
|
||||
format: format
|
||||
},
|
||||
init: function() {
|
||||
return document.title = 'BurnChart: GitHub Burndown Chart as a Service';
|
||||
}
|
||||
});
|
||||
|
||||
@ -40968,6 +40985,7 @@ if (typeof exports === 'object') {
|
||||
var route,
|
||||
_this = this;
|
||||
route = this.get('route');
|
||||
document.title = "" + route.owner + "/" + route.name;
|
||||
return milestone.get(route, function(err, warn, obj) {
|
||||
if (err) {
|
||||
throw err;
|
||||
|
@ -7,7 +7,7 @@
|
||||
// app.coffee
|
||||
root.require.register('burnchart/src/app.js', function(exports, require, module) {
|
||||
|
||||
var App, Header, el, key, mediator, route, router, _i, _len, _ref;
|
||||
var App, Header, Router, key, _i, _len, _ref;
|
||||
|
||||
_ref = ['utils/mixins', 'models/projects'];
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
@ -15,41 +15,17 @@
|
||||
require("./" + key);
|
||||
}
|
||||
|
||||
Router = require('./modules/router');
|
||||
|
||||
Header = require('./views/header');
|
||||
|
||||
mediator = require('./modules/mediator');
|
||||
|
||||
el = '#page';
|
||||
|
||||
route = function(page, req, evt) {
|
||||
var Page;
|
||||
document.title = 'BurnChart: GitHub Burndown Chart as a Service';
|
||||
Page = require("./views/pages/" + page);
|
||||
return new Page({
|
||||
el: el,
|
||||
'data': {
|
||||
'route': req.params
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
router = {
|
||||
'': _.partial(route, 'index'),
|
||||
'project/add': _.partial(route, 'addProject'),
|
||||
'chart/:owner/:name/:milestone': _.partial(route, 'showChart'),
|
||||
'reset': function() {
|
||||
mediator.fire('!projects/clear');
|
||||
return window.location.hash = '#';
|
||||
}
|
||||
};
|
||||
|
||||
App = Ractive.extend({
|
||||
'template': require('./templates/layout'),
|
||||
'components': {
|
||||
Header: Header
|
||||
},
|
||||
init: function() {
|
||||
return Grapnel.listen(router);
|
||||
return new Router();
|
||||
}
|
||||
});
|
||||
|
||||
@ -743,6 +719,43 @@
|
||||
|
||||
});
|
||||
|
||||
// router.coffee
|
||||
root.require.register('burnchart/src/modules/router.js', function(exports, require, module) {
|
||||
|
||||
var el, mediator, route, router;
|
||||
|
||||
mediator = require('./mediator');
|
||||
|
||||
el = '#page';
|
||||
|
||||
route = function(page, req, evt) {
|
||||
var Page;
|
||||
Page = require("../views/pages/" + page);
|
||||
return new Page({
|
||||
el: el,
|
||||
'data': {
|
||||
'route': req.params
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
router = {
|
||||
'': _.partial(route, 'index'),
|
||||
'project/add': _.partial(route, 'addProject'),
|
||||
'chart/:owner/:name/:milestone': _.partial(route, 'showChart'),
|
||||
'reset': function() {
|
||||
mediator.fire('!projects/clear');
|
||||
return window.location.hash = '#';
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = function() {
|
||||
Grapnel.listen(router);
|
||||
return router;
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
// header.mustache
|
||||
root.require.register('burnchart/src/templates/header.js', function(exports, require, module) {
|
||||
|
||||
@ -776,7 +789,7 @@
|
||||
// showChart.mustache
|
||||
root.require.register('burnchart/src/templates/pages/showChart.js', function(exports, require, module) {
|
||||
|
||||
module.exports = ["<div id=\"title\">"," <div class=\"wrap\">"," <h2 class=\"title\">{{ milestone.title }}</h2>"," <span class=\"sub\">{{ format.due(milestone.due_on) }}</span>"," <p class=\"description\">{{{ format.markdown(milestone.description) }}}</p>"," </div>","</div>","","<div id=\"content\" class=\"wrap\">"," <div id=\"chart\">"," <div id=\"svg\"></div>"," </div>","</div>"].join("\n");
|
||||
module.exports = ["<div id=\"title\">"," <div class=\"wrap\">"," <h2 class=\"title\">{{ milestone.title }}</h2>"," <span class=\"sub\">{{{ format.due(milestone.due_on) }}}</span>"," <p class=\"description\">{{{ format.markdown(milestone.description) }}}</p>"," </div>","</div>","","<div id=\"content\" class=\"wrap\">"," <div id=\"chart\">"," <div id=\"svg\"></div>"," </div>","</div>"].join("\n");
|
||||
});
|
||||
|
||||
// projects.mustache
|
||||
@ -938,6 +951,7 @@
|
||||
'adapt': [Ractive.adaptors.Ractive],
|
||||
init: function() {
|
||||
var autocomplete;
|
||||
document.title = 'Add a new project';
|
||||
autocomplete = function(value) {};
|
||||
this.observe('value', _.debounce(autocomplete, 200), {
|
||||
'init': false
|
||||
@ -976,6 +990,9 @@
|
||||
},
|
||||
'data': {
|
||||
format: format
|
||||
},
|
||||
init: function() {
|
||||
return document.title = 'BurnChart: GitHub Burndown Chart as a Service';
|
||||
}
|
||||
});
|
||||
|
||||
@ -1002,6 +1019,7 @@
|
||||
var route,
|
||||
_this = this;
|
||||
route = this.get('route');
|
||||
document.title = "" + route.owner + "/" + route.name;
|
||||
return milestone.get(route, function(err, warn, obj) {
|
||||
if (err) {
|
||||
throw err;
|
||||
|
@ -3,26 +3,10 @@
|
||||
'models/projects'
|
||||
] )
|
||||
|
||||
|
||||
Router = require './modules/router'
|
||||
Header = require './views/header'
|
||||
|
||||
mediator = require './modules/mediator'
|
||||
|
||||
el = '#page'
|
||||
|
||||
route = (page, req, evt) ->
|
||||
document.title = 'BurnChart: GitHub Burndown Chart as a Service'
|
||||
Page = require "./views/pages/#{page}"
|
||||
new Page { el, 'data': { 'route': req.params } }
|
||||
|
||||
router =
|
||||
'': _.partial route, 'index'
|
||||
'project/add': _.partial route, 'addProject'
|
||||
'chart/:owner/:name/:milestone': _.partial route, 'showChart'
|
||||
# TODO: remove in production.
|
||||
'reset': ->
|
||||
mediator.fire '!projects/clear'
|
||||
window.location.hash = '#'
|
||||
|
||||
App = Ractive.extend
|
||||
|
||||
'template': require './templates/layout'
|
||||
@ -30,7 +14,6 @@ App = Ractive.extend
|
||||
'components': { Header }
|
||||
|
||||
init: ->
|
||||
# Init the routes.
|
||||
Grapnel.listen router
|
||||
new Router()
|
||||
|
||||
module.exports = new App()
|
22
src/modules/router.coffee
Normal file
22
src/modules/router.coffee
Normal file
@ -0,0 +1,22 @@
|
||||
mediator = require './mediator'
|
||||
|
||||
el = '#page'
|
||||
|
||||
route = (page, req, evt) ->
|
||||
Page = require "../views/pages/#{page}"
|
||||
new Page { el, 'data': { 'route': req.params } }
|
||||
|
||||
router =
|
||||
'': _.partial route, 'index'
|
||||
'project/add': _.partial route, 'addProject'
|
||||
'chart/:owner/:name/:milestone': _.partial route, 'showChart'
|
||||
# TODO: remove in production.
|
||||
'reset': ->
|
||||
mediator.fire '!projects/clear'
|
||||
window.location.hash = '#'
|
||||
|
||||
module.exports = ->
|
||||
# Init the routes.
|
||||
Grapnel.listen router
|
||||
|
||||
router
|
@ -1,7 +1,7 @@
|
||||
<div id="title">
|
||||
<div class="wrap">
|
||||
<h2 class="title">{{ milestone.title }}</h2>
|
||||
<span class="sub">{{ format.due(milestone.due_on) }}</span>
|
||||
<span class="sub">{{{ format.due(milestone.due_on) }}}</span>
|
||||
<p class="description">{{{ format.markdown(milestone.description) }}}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -10,6 +10,8 @@ module.exports = Ractive.extend
|
||||
'adapt': [ Ractive.adaptors.Ractive ]
|
||||
|
||||
init: ->
|
||||
document.title = 'Add a new project'
|
||||
|
||||
# TODO: autocomplete on our username if we are logged in or based
|
||||
# on repos we already have.
|
||||
autocomplete = (value) ->
|
||||
|
@ -8,4 +8,7 @@ module.exports = Ractive.extend
|
||||
|
||||
'components': { Hero, Projects }
|
||||
|
||||
'data': { format }
|
||||
'data': { format }
|
||||
|
||||
init: ->
|
||||
document.title = 'BurnChart: GitHub Burndown Chart as a Service'
|
@ -12,6 +12,9 @@ module.exports = Ractive.extend
|
||||
|
||||
init: ->
|
||||
route = @get 'route'
|
||||
|
||||
document.title = "#{route.owner}/#{route.name}"
|
||||
|
||||
milestone.get route, (err, warn, obj) =>
|
||||
throw err if err
|
||||
throw warn if warn
|
||||
|
Loading…
x
Reference in New Issue
Block a user