Skip to content

Commit b0443e5

Browse files
move permalink to #.
1 parent 2da7cb4 commit b0443e5

3 files changed

Lines changed: 33 additions & 8 deletions

File tree

docs/components/docs/docs.html

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,14 @@ <h1>{{module[0].toUpperCase() + module.substr(1)}}</h1>
5454
<h2 ng-if="method.name[0].toUpperCase() === method.name[0]">
5555
{{method.name}}
5656
</h2>
57-
<h3 ng-if="method.name[0].toUpperCase() !== method.name[0]">
58-
<span ng-if="noHeadingLink">{{method.name}}</span>
59-
<a ng-if="!noHeadingLink" ng-href="{{activeUrl + '/' + method.name}}">
60-
{{method.name}}
61-
</a>
57+
<h3
58+
class="method-heading"
59+
ng-if="method.name[0].toUpperCase() !== method.name[0]">
60+
<a
61+
class="permalink"
62+
ng-if="!noPermalink"
63+
ng-href="{{activeUrl + '/' + method.name}}">#</a>
64+
{{method.name}}
6265
</h3>
6366
<p ng-if="method.description" ng-bind-html="method.description"></p>
6467
<h4 ng-show="method.params">Parameters</h4>

docs/components/docs/docs.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,9 @@ angular
128128
return $http.get('/gcloud-node/json/index.json')
129129
.then(filterDocJson($sce))
130130
.then(function(methods) {
131-
// Prevent headings from turning into links.
131+
// Prevent displaying permalinks.
132132
// ** Can remove when PubSub api is documented **
133-
methods.noHeadingLink = true;
133+
methods.noPermalink = true;
134134
return methods;
135135
});
136136
}
@@ -200,7 +200,7 @@ angular
200200

201201
$scope.activeUrl = '/gcloud-node/#' + $location.path();
202202
$scope.singleMethod = methods.singleMethod;
203-
$scope.noHeadingLink = methods.singleMethod || methods.noHeadingLink;
203+
$scope.noPermalink = methods.singleMethod || methods.noPermalink;
204204
$scope.methods = methods;
205205
$scope.module = $routeParams.module;
206206
$scope.pages = [

docs/css/main.css

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,28 @@ h1, h2, h3, h4, h5, h6 {
564564
border-bottom: 1px solid rgba(0,0,0,0.05);
565565
}
566566

567+
.method-heading {
568+
position: relative;
569+
}
570+
571+
.permalink {
572+
display: none;
573+
position: absolute;
574+
padding: 0 7px;
575+
left: -24px;
576+
text-decoration: none;
577+
color: #2b70e2;
578+
}
579+
580+
.permalink:hover {
581+
color: #4285f4;
582+
display: block;
583+
}
584+
585+
.method-heading:hover .permalink {
586+
display: block;
587+
}
588+
567589
/*
568590
Page Title
569591
*/

0 commit comments

Comments
 (0)