Commit a5d0cc8 Chris Young
committed
1 parent b8d532c commit a5d0cc8 Copy full SHA for a5d0cc8
File tree 3 files changed +25
-9
lines changed
3 files changed +25
-9
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,8 @@ ol.version-picker {
118
127
119
128
# gtoc ol .version-picker li {
120
129
display : block;
130
+ border-right : 0 ;
131
+ margin-right : 0 ;
121
132
}
122
133
123
134
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 @@ -232,9 +232,17 @@ function altDocs(filename) {
232
232
return html + '</a></li>' ;
233
233
}
234
234
235
- const lis = ( vs ) => vs . filter ( lte ) . map ( li ) . join ( '\n' ) ;
235
+ const lis = versions . filter ( lte ) . map ( li ) . join ( '\n' ) ;
236
236
237
- return `<ol class="version-picker">${ lis ( versions ) } </ol>` ;
237
+ if ( ! lis . length )
238
+ return '' ;
239
+
240
+ return `
241
+ <li class="version-picker">
242
+ <a href="#">View another version <span>▼</span></a>
243
+ <ol class="version-picker">${ lis } </ol>
244
+ </li>
245
+ ` ;
238
246
}
239
247
240
248
// handle general body-text replacements
You can’t perform that action at this time.
0 commit comments