File tree Expand file tree Collapse file tree 3 files changed +26
-10
lines changed Expand file tree Collapse file tree 3 files changed +26
-10
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,15 @@ em code {
9191
9292# gtoc li {
9393 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 ;
94103}
95104
96105li .version-picker {
@@ -118,6 +127,9 @@ ol.version-picker {
118127
119128# gtoc ol .version-picker li {
120129 display : block;
130+ border-right : 0 ;
131+ margin-right : 0 ;
132+ width : 100% ;
121133}
122134
123135ol .version-picker li a {
Original file line number Diff line number Diff line change @@ -25,18 +25,15 @@ <h1>Node.js __VERSION__ Documentation</h1>
2525 < div id ="gtoc ">
2626 < ul >
2727 < li >
28- < a href ="index.html " name ="toc "> Index</ a > |
28+ < a href ="index.html " name ="toc "> Index</ a >
2929 </ li >
3030 < li >
31- < a href ="all.html "> View on single page</ a > |
31+ < a href ="all.html "> View on single page</ a >
3232 </ li >
3333 < 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 >
3935 </ li >
36+ __ALTDOCS__
4037 </ ul >
4138 </ div >
4239 < hr >
Original file line number Diff line number Diff line change @@ -33,7 +33,6 @@ var gtocPath = path.resolve(path.join(
3333var gtocLoading = null ;
3434var gtocData = null ;
3535var docCreated = null ;
36- var nodeVersion = null ;
3736
3837/**
3938 * opts: input, filename, template, nodeVersion.
@@ -211,9 +210,17 @@ function altDocs(filename) {
211210 return html + '</a></li>' ;
212211 }
213212
214- const lis = ( vs ) => vs . filter ( lte ) . map ( li ) . join ( '\n' ) ;
213+ const lis = versions . filter ( lte ) . map ( li ) . join ( '\n' ) ;
215214
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+ ` ;
217224}
218225
219226// handle general body-text replacements
You can’t perform that action at this time.
0 commit comments