File tree 2 files changed +10
-3
lines changed
2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ overflow: inherit;
18
18
/* The container <div> - needed to position the dropdown content */
19
19
.dropdown {
20
20
position : absolute;
21
- display : flex ;
21
+ display : inline-block ;
22
22
}
23
23
24
24
/* Dropdown Content (Hidden by Default) */
Original file line number Diff line number Diff line change 1
1
window . addEventListener ( "DOMContentLoaded" , function ( ) {
2
2
var windowPathNameSplits = window . location . pathname . split ( "/" ) ;
3
3
var majorVersionRegex = new RegExp ( "(\\d+[.]\\d+)" )
4
+ var latestRegex = new RegExp ( "latest" )
4
5
if ( majorVersionRegex . test ( windowPathNameSplits [ 1 ] ) ) { // On landing page docs.hopsworks.api/3.0 - URL contains major version
5
6
// Version API dropdown
6
7
document . getElementById ( "hopsworks_api_link" ) . href = "https://docs.hopsworks.ai/hopsworks-api/" + windowPathNameSplits [ 1 ] + "/generated/api/login/" ;
7
8
document . getElementById ( "hsfs_api_link" ) . href = "https://docs.hopsworks.ai/feature-store-api/" + windowPathNameSplits [ 1 ] + "/generated/api/connection_api/" ;
9
+ document . getElementById ( "hsfs_javadoc_link" ) . href = "https://docs.hopsworks.ai/feature-store-api/" + windowPathNameSplits [ 1 ] + "/javadoc" ;
8
10
document . getElementById ( "hsml_api_link" ) . href = "https://docs.hopsworks.ai/machine-learning-api/" + windowPathNameSplits [ 1 ] + "/generated/connection_api/" ;
9
11
} else { // on docs.hopsworks.api/feature-store-api/3.0 / docs.hopsworks.api/hopsworks-api/3.0 / docs.hopsworks.api/machine-learning-api/3.0
10
- var apiVersion = windowPathNameSplits [ 2 ] ;
11
- var majorVersion = apiVersion . match ( majorVersionRegex ) [ 0 ] ;
12
+
13
+ if ( latestRegex . test ( windowPathNameSplits [ 2 ] ) || latestRegex . test ( windowPathNameSplits [ 1 ] ) ) {
14
+ var majorVersion = "latest" ;
15
+ } else {
16
+ var apiVersion = windowPathNameSplits [ 2 ] ;
17
+ var majorVersion = apiVersion . match ( majorVersionRegex ) [ 0 ] ;
18
+ }
12
19
// Version main navigation
13
20
document . getElementsByClassName ( "md-tabs__link" ) [ 0 ] . href = "https://docs.hopsworks.ai/" + majorVersion ;
14
21
document . getElementsByClassName ( "md-tabs__link" ) [ 1 ] . href = "https://colab.research.google.com/github/logicalclocks/hopsworks-tutorials/blob/master/quickstart.ipynb" ;
You can’t perform that action at this time.
0 commit comments