Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #563 - Add breadcrumbs to single method docs. #566

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 20 additions & 6 deletions docs/site/components/docs/docs.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,19 +118,33 @@ <h4>ACLs</h4>
<article
ng-repeat="method in methods"
ng-hide="singleMethod && method.name !== singleMethod">

<h2 ng-if="method.name[0].toUpperCase() === method.name[0]">
{{method.name}}
<span class="view-code-link" docs-code-link></span>
</h2>
<h3
class="method-heading"
ng-if="method.name[0].toUpperCase() !== method.name[0]">
<a
class="permalink"
ng-href="{{activeUrl + '?method=' + method.name}}">
<span>#</span>
{{method.name}}
</a>
<span ng-init="methodLink = activeUrl + '?method=' + method.name">
<a href="{{methodLink}}" class="permalink anchor">#</a>

<!-- Single methods should get breadcrumbs -->
<span ng-if="singleMethod">
<a ng-href="#/docs/{{version}}/{{module}}" class="permalink">
{{module[0].toUpperCase() + module.substring(1)}}
</a>
&raquo;
<span ng-if="method.data.ctx.hasOwnProperty('constructor')"
ng-init="className = method.data.ctx.constructor">
<a ng-href="#/docs/{{version}}/{{module}}/{{className.toLowerCase()}}"
class="permalink">{{className}}</a>
&raquo;
</span>
</span>

<a href="{{methodLink}}" class="permalink">{{method.name}}</a>
</span>
<span class="view-code-link" docs-code-link></span>
</h3>
<p ng-if="method.description" ng-bind-html="method.description"></p>
Expand Down
2 changes: 1 addition & 1 deletion docs/site/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ ul {
color: #4285f4;
}

.permalink span {
.permalink.anchor {
position: absolute;
padding: 0 7px;
left: -24px;
Expand Down