Commit 7cd60e0 Chris Young
committed
1 parent abc4272 commit 7cd60e0 Copy full SHA for 7cd60e0
File tree 3 files changed +26
-10
lines changed
3 files changed +26
-10
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,15 @@ em code {
91
91
92
92
# gtoc li {
93
93
display : inline;
94
+ border-right : 1px # 000 solid;
95
+ margin-right : 0.4em ;
96
+ padding-right : 0.4em ;
97
+ }
98
+
99
+ # gtoc li : last-child {
100
+ border-right : none;
101
+ margin-right : 0 ;
102
+ padding-right : 0 ;
94
103
}
95
104
96
105
li .version-picker {
@@ -118,6 +127,9 @@ ol.version-picker {
118
127
119
128
# gtoc ol .version-picker li {
120
129
display : block;
130
+ border-right : 0 ;
131
+ margin-right : 0 ;
132
+ width : 100% ;
121
133
}
122
134
123
135
ol .version-picker li a {
Original file line number Diff line number Diff line change @@ -25,18 +25,15 @@ <h1>Node.js __VERSION__ Documentation</h1>
25
25
< div id ="gtoc ">
26
26
< ul >
27
27
< li >
28
- < a href ="index.html " name ="toc "> Index</ a > |
28
+ < a href ="index.html " name ="toc "> Index</ a >
29
29
</ li >
30
30
< li >
31
- < a href ="all.html "> View on single page</ a > |
31
+ < a href ="all.html "> View on single page</ a >
32
32
</ li >
33
33
< li >
34
- < a href ="__FILENAME__.json "> View as JSON</ a > |
35
- </ li >
36
- < li class ="version-picker ">
37
- < a href ="# "> View another version < span > ▼</ span > </ a >
38
- __ALTDOCS__
34
+ < a href ="__FILENAME__.json "> View as JSON</ a >
39
35
</ li >
36
+ __ALTDOCS__
40
37
</ ul >
41
38
</ div >
42
39
< hr >
Original file line number Diff line number Diff line change @@ -33,7 +33,6 @@ var gtocPath = path.resolve(path.join(
33
33
var gtocLoading = null ;
34
34
var gtocData = null ;
35
35
var docCreated = null ;
36
- var nodeVersion = null ;
37
36
38
37
/**
39
38
* opts: input, filename, template, nodeVersion.
@@ -211,9 +210,17 @@ function altDocs(filename) {
211
210
return html + '</a></li>' ;
212
211
}
213
212
214
- const lis = ( vs ) => vs . filter ( lte ) . map ( li ) . join ( '\n' ) ;
213
+ const lis = versions . filter ( lte ) . map ( li ) . join ( '\n' ) ;
215
214
216
- return `<ol class="version-picker">${ lis ( versions ) } </ol>` ;
215
+ if ( ! lis . length )
216
+ return '' ;
217
+
218
+ return `
219
+ <li class="version-picker">
220
+ <a href="#">View another version <span>▼</span></a>
221
+ <ol class="version-picker">${ lis } </ol>
222
+ </li>
223
+ ` ;
217
224
}
218
225
219
226
// handle general body-text replacements
You can’t perform that action at this time.
0 commit comments