Commit 2439b24 1 parent 2af0b34 commit 2439b24 Copy full SHA for 2439b24
File tree 3 files changed +13
-6
lines changed
3 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -49,10 +49,8 @@ body {
49
49
margin : 10px 0 ;
50
50
border-top : none ;
51
51
width : auto ;
52
- display : inline-block ;
53
52
font-weight : 700 ;
54
53
font-size : 2.3rem ;
55
- display : block ;
56
54
}
57
55
58
56
.hapi-family-header {
Original file line number Diff line number Diff line change @@ -110,6 +110,14 @@ export default {
110
110
// Add classes to API nav
111
111
let lis = document .querySelectorAll (" .api-nav-select-wrapper li" );
112
112
let code = document .querySelectorAll (" .api-nav-select-wrapper code" );
113
+ let wrapper = document .querySelector (" .markdown-wrapper" );
114
+ let hapiHeader = document .createElement (" h1" );
115
+ hapiHeader .innerHTML =
116
+ " API <span class='api-version-span'>v" +
117
+ this .version .match (/ . * (?=\. )/ )[0 ] +
118
+ " .x" ;
119
+ hapiHeader .setAttribute (" class" , " hapi-header" );
120
+ wrapper .insertBefore (hapiHeader, wrapper .firstChild );
113
121
const height = document
114
122
.querySelector (" .api-nav-select-wrapper" )
115
123
.getBoundingClientRect ().bottom ;
Original file line number Diff line number Diff line change @@ -277,11 +277,12 @@ export default {
277
277
});
278
278
}
279
279
break ;
280
+ } else if (! this .versions .includes (this .$route .query .v )) {
281
+ this .$router .push ({
282
+ query: { v: this .versions [0 ] },
283
+ hash: this .$route .hash
284
+ });
280
285
}
281
- this .$router .push ({
282
- query: { v: this .versions [0 ] },
283
- hash: this .$route .hash
284
- });
285
286
}
286
287
}
287
288
You can’t perform that action at this time.
0 commit comments