From f197e391c1148398825bfd1af8d000d351821c97 Mon Sep 17 00:00:00 2001 From: Shyam Seshadri Date: Fri, 15 Mar 2013 22:17:08 +0530 Subject: feat(docs): Add Improve this doc link in each doc page, which links to the edit mode of that file in github --- docs/src/gen-docs.js | 2 +- docs/src/ngdoc.js | 3 ++- docs/src/templates/css/docs.css | 4 ++++ 3 files changed, 7 insertions(+), 2 deletions(-) (limited to 'docs/src') diff --git a/docs/src/gen-docs.js b/docs/src/gen-docs.js index 992c4527..b05569dd 100755 --- a/docs/src/gen-docs.js +++ b/docs/src/gen-docs.js @@ -32,7 +32,7 @@ writer.makeDir('build/docs/', true).then(function() { }); }).then(function printStats() { console.log('DONE. Generated ' + docs.length + ' pages in ' + (now()-start) + 'ms.' ); -}).done(); +}); function writeTheRest(writesFuture) { diff --git a/docs/src/ngdoc.js b/docs/src/ngdoc.js index 37e90a15..f8f6cdf5 100644 --- a/docs/src/ngdoc.js +++ b/docs/src/ngdoc.js @@ -272,8 +272,9 @@ Doc.prototype = { self = this; dom.h(title(this.name), function() { - notice('deprecated', 'Deprecated API', self.deprecated); + notice('deprecated', 'Deprecated API', self.deprecated); + dom.tag('a', {href: 'http://github.com/angular/angular.js/edit/master/' + self.file, class: 'improve-docs btn btn-primary'}, 'Improve this doc'); if (self.ngdoc != 'overview') { dom.h('Description', self.description, dom.html); } diff --git a/docs/src/templates/css/docs.css b/docs/src/templates/css/docs.css index 53478e33..70d98a3c 100644 --- a/docs/src/templates/css/docs.css +++ b/docs/src/templates/css/docs.css @@ -86,6 +86,10 @@ img.AngularJS-small { /* Content */ /* =============================== */ +.improve-docs { + float: right; +} + .hint { font-size: .7em; color: #c0c0c0; -- cgit v1.2.3