Skip to content

Commit

Permalink
Add links to GitHub
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanseys committed May 1, 2015
1 parent 686fe62 commit b530bd1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docs/site/components/docs/docs.html
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ <h4 ng-show="method.returns">Returns</h4>
<h4 ng-show="method.example">Example</h4>
<div docs-example ng-repeat-end
ng-show="method.example" ng-bind-html="method.example"></div>
<div class="view-code-link">View the code
<a href="https://github.com/GoogleCloudPlatform/gcloud-node/blob/{{version}}/lib/{{module ? module + '/' : ''}}{{class}}.js{{method.lineNumLink}}">on GitHub</a>.</div>
<hr ng-if="$index < methods.length - 1">
</article>
</article>
Expand Down
5 changes: 4 additions & 1 deletion docs/site/components/docs/docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ angular
if (alias && alias.string.indexOf('module:') !== 0) {
alias = alias.string;
} else {
alias = false
alias = false;
}

return {
Expand All @@ -149,6 +149,8 @@ angular
}),
description: $sce.trustAsHtml(
formatHtml(detectLinks(detectModules(obj.description.full)))),
lineNum: obj.codeStart,
lineNumLink: obj.codeStart ? '#L' + obj.codeStart : '',
params: obj.tags.filter(function(tag) {
return tag.type === 'param';
})
Expand Down Expand Up @@ -334,6 +336,7 @@ angular
$scope.activeUrl = '#' + $location.path();
$scope.singleMethod = methods.singleMethod;
$scope.module = $routeParams.module;
$scope.class = $routeParams.class || 'index';
$scope.methods = methods;
$scope.version = $routeParams.version;
$scope.versions = versions;
Expand Down
4 changes: 4 additions & 0 deletions docs/site/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,10 @@ ul {
background: #F8F8F8;
}

.view-code-link {
color: #888;
}

/*
Page Title
*/
Expand Down

0 comments on commit b530bd1

Please sign in to comment.