Skip to content

Commit 47c1c65

Browse files
committed
Better nav
1 parent cd5cc8a commit 47c1c65

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ <h4>Functions:</h4>
122122
<li>No functions available.</li>
123123
{%endif%}
124124
{%each functions as function%}
125-
<li id="{{jsClassName}}/function/{{function.name}}">
125+
<li id="{{jsClassName}}/function/{{function.jsFunctionName}}">
126126
<strong class="{%if not function.ignore%}is{%else%}not{%endif%} added">{{jsClassName}}#</strong><strong class="method">{{function.jsFunctionName}}</strong>
127127
</li>
128128
{%endeach%}

scripts/api.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414

1515
var contentTemplate = combyne($(".api-content script").eq(1).html().trim());
1616

17-
console.log(resp);
18-
1917
resp.forEach(function(ctor) {
2018
// Add nav entry.
2119
var anchor = $("<a href='#" + ctor.jsClassName + "'><li>" + ctor.jsClassName + "</li><ul class='subnav'></ul></a>").appendTo(listApi);
@@ -27,7 +25,7 @@
2725

2826
ctor.functions.forEach(function(func) {
2927
var isPrototype = func.isPrototypeMethod ? "#" : ".";
30-
anchor.find(".subnav").append("<li>" + ctor.jsClassName + isPrototype + func.jsFunctionName + "</li>");
28+
anchor.find(".subnav").append("<a href='#" + ctor.jsClassName + "/function/" + func.jsFunctionName + "'><li>" + ctor.jsClassName + isPrototype + func.jsFunctionName + "</li></a>");
3129
});
3230
});
3331

styles/api.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@
4141
margin-right: 10px;
4242
}
4343

44+
#list-api a.active .subnav a {
45+
padding: 0;
46+
}
47+
4448
#list-api a:hover, #list-api a.active {
4549
background: #353535;
4650
color: #FFF;

0 commit comments

Comments
 (0)