Skip to content

Commit 9fec664

Browse files
committed
Reverting messy fixes
1 parent 575036d commit 9fec664

9 files changed

+42
-92
lines changed

README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
This is the source of the landing page for https://docs.hopsworks.ai
44

5-
65
## Build instructions
76

87
### Step 1: Setup python environment
@@ -64,4 +63,4 @@ linkchecker http://127.0.0.1:8000/
6463

6564
# If ok just kill the server
6665
kill -9 $SERVER_PID
67-
```
66+
```

docs/stylesheets/custom-bis.css docs/css/custom.css

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[data-md-color-scheme="hopsworks"] {
1+
:root {
22
--md-primary-fg-color: #1eb382;
33
--md-secondary-fg-color: #188a64;
44
--md-tertiary-fg-color: #0d493550;
@@ -29,10 +29,6 @@
2929
transition: background-color 450ms;
3030
}
3131

32-
.md-tabs__item {
33-
min-width: 2.5rem;
34-
}
35-
3632
.md-sidebar__scrollwrap {
3733
background-color: var(--md-quaternary-fg-color);
3834
padding: 15px 5px 5px 5px;

docs/stylesheets/dropdown-bis.css docs/css/dropdown.css

+2-3
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ overflow: inherit;
1717

1818
/* The container <div> - needed to position the dropdown content */
1919
.dropdown {
20-
position: absolute;
21-
display: flex;
20+
position: relative;
21+
display: inline-block;
2222
}
2323

2424
/* Dropdown Content (Hidden by Default) */
@@ -31,7 +31,6 @@ overflow: inherit;
3131
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
3232
z-index: 1000;
3333
border-radius: 2px;
34-
top:32px;
3534
left:-15px;
3635
}
3736

File renamed without changes.

docs/javascripts/inject-api-links.js

-68
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
document.getElementsByClassName("md-tabs__link")[7].style.display = "none";
22
document.getElementsByClassName("md-tabs__link")[9].style.display = "none";
3+

docs/js/inject-api-links.js

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
window.addEventListener("DOMContentLoaded", function () {
2+
var windowPathNameSplits = window.location.pathname.split("/");
3+
var majorVersionRegex = new RegExp("(\\d+[.]\\d+)")
4+
if (majorVersionRegex.test(windowPathNameSplits[1])) { // On landing page docs.hopsworks.api/3.0 - URL contains major version
5+
// Version API dropdown
6+
document.getElementById("hopsworks_api_link").href = "https://docs.hopsworks.ai/hopsworks-api/" + windowPathNameSplits[1] + "/generated/api/login/";
7+
document.getElementById("hsfs_api_link").href = "https://docs.hopsworks.ai/feature-store-api/" + windowPathNameSplits[1] + "/generated/api/connection_api/";
8+
document.getElementById("hsml_api_link").href = "https://docs.hopsworks.ai/machine-learning-api/" + windowPathNameSplits[1] + "/generated/connection_api/";
9+
document.getElementById("hsfs_javadoc_link").href = "https://docs.hopsworks.ai/feature-store-api/" + windowPathNameSplits[1] + "/javadoc";
10+
} 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
11+
var apiVersion = windowPathNameSplits[2];
12+
var majorVersion = apiVersion.match(majorVersionRegex)[0];
13+
// Version main navigation
14+
document.getElementsByClassName("md-tabs__link")[0].href = "https://docs.hopsworks.ai/" + majorVersion;
15+
document.getElementsByClassName("md-tabs__link")[1].href = "https://docs.hopsworks.ai/" + majorVersion + "/getting_started/quickstart/";
16+
document.getElementsByClassName("md-tabs__link")[2].href = "https://docs.hopsworks.ai/" + majorVersion + "/tutorials/fraud_batch/1_feature_groups/";
17+
document.getElementsByClassName("md-tabs__link")[3].href = "https://docs.hopsworks.ai/" + majorVersion + "/concepts/hopsworks/";
18+
document.getElementsByClassName("md-tabs__link")[4].href = "https://docs.hopsworks.ai/" + majorVersion + "/user_guides/";
19+
document.getElementsByClassName("md-tabs__link")[5].href = "https://docs.hopsworks.ai/" + majorVersion + "/setup_installation/aws/getting_started/";
20+
document.getElementsByClassName("md-tabs__link")[6].href = "https://docs.hopsworks.ai/" + majorVersion + "/admin/";
21+
// Version API dropdown
22+
document.getElementById("hopsworks_api_link").href = "https://docs.hopsworks.ai/hopsworks-api/" + majorVersion + "/generated/api/login/";
23+
document.getElementById("hsfs_api_link").href = "https://docs.hopsworks.ai/feature-store-api/" + majorVersion + "/generated/api/connection_api/";
24+
document.getElementById("hsfs_javadoc_link").href = "https://docs.hopsworks.ai/feature-store-api/" + majorVersion + "/javadoc";
25+
document.getElementById("hsml_api_link").href = "https://docs.hopsworks.ai/machine-learning-api/" + majorVersion + "/generated/connection_api/";
26+
}
27+
});

docs/javascripts/quickstart-fullscreen.js docs/js/quickstart-fullscreen.js

+3-6
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
*/
44

55
//https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent for recommended approach to test if device is mobile
6-
if (
7-
window.location.pathname.endsWith("hopsworks-tutorials/quickstart/") &&
8-
!/Mobi|Android/i.test(navigator.userAgent)
9-
) {
10-
document.getElementsByClassName("md-sidebar--primary")[0].remove();
11-
}
6+
if(window.location.pathname.endsWith('hopsworks-tutorials/quickstart/') && !/Mobi|Android/i.test(navigator.userAgent)) {
7+
document.getElementsByClassName("md-sidebar--primary")[0].remove()
8+
}

mkdocs.yml

+7-8
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ nav:
276276
- Audit:
277277
- Access Audit Logs: admin/audit/audit-logs.md
278278
- Export Audit Logs: admin/audit/export-audit-logs.md
279-
- API<div class="dropdown"><button class="dropbtn">API</button><div id="myDropdown" class="dropdown-content"> <a id="hopsworks_api_link" href="https://docs.hopsworks.ai/hopsworks-api/dev">Hopsworks API</a> <a id="hsfs_api_link" href="https://docs.hopsworks.ai/feature-store-api/dev">Feature Store API</a> <a id="hsfs_javadoc_link" href="https://docs.hopsworks.ai/feature-store-api/dev/javadoc">Feature Store JavaDoc</a> <a id="hsml_api_link" href="https://docs.hopsworks.ai/machine-learning-api/dev">MLOps API</a> </div></div>: https://docs.hopsworks.ai
279+
- <div class="dropdown"><button class="dropbtn"> API </button> <div id="myDropdown" class="dropdown-content"> <a id="hopsworks_api_link" href="https://docs.hopsworks.ai/hopsworks-api/dev">Hopsworks API</a> <a id="hsfs_api_link" href="https://docs.hopsworks.ai/feature-store-api/dev">Feature Store API</a> <a id="hsfs_javadoc_link" href="https://docs.hopsworks.ai/feature-store-api/dev/javadoc">Feature Store JavaDoc</a> <a id="hsml_api_link" href="https://docs.hopsworks.ai/machine-learning-api/dev">MLOps API</a> </div></div>: https://docs.hopsworks.ai
280280
- Community ↗: https://community.hopsworks.ai/
281281

282282
theme:
@@ -291,7 +291,6 @@ theme:
291291
code: "IBM Plex Mono"
292292
palette:
293293
accent: teal
294-
scheme: hopsworks
295294
features:
296295
- navigation.tabs
297296
- navigation.tabs.sticky
@@ -320,14 +319,14 @@ extra:
320319
property: G-64FEEXPSDN
321320

322321
extra_css:
323-
- stylesheets/custom-bis.css
324-
- stylesheets/marctech.css
325-
- stylesheets/dropdown-bis.css
322+
- css/custom.css
323+
- css/marctech.css
324+
- css/dropdown.css
326325

327326
extra_javascript:
328-
- javascripts/inject-api-links.js
329-
- javascripts/hide-dropdown.js
330-
- javascripts/quickstart-fullscreen.js
327+
- js/inject-api-links.js
328+
- js/dropdown.js
329+
- js/quickstart-fullscreen.js
331330

332331
plugins:
333332
- search

0 commit comments

Comments
 (0)