Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,019 changes: 150 additions & 869 deletions doc/source/_static/css/custom.css

Large diffs are not rendered by default.

Binary file removed doc/source/_static/img/LandingPageBG.jpg
Binary file not shown.
132 changes: 14 additions & 118 deletions doc/source/_static/js/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,128 +28,11 @@ window.addEventListener("scroll", loadVisibleTermynals);
createTermynals();
loadVisibleTermynals();

// Reintroduce dropdown icons on the sidebar. This is a hack, as we can't
// programmatically figure out which nav items have children anymore.
// Send GA events any time a code block is copied
document.addEventListener("DOMContentLoaded", function() {
let navItems = document.querySelectorAll(".bd-sidenav li");

const defaultStyle = {"fontWeight": "bold"}

const stringList = [
{"text": "User Guides"},
{"text": "Examples"},
// Ray Core
{"text": "Ray Core"},
{"text": "Ray Core API"},
// Ray Cluster
{"text": "Ray Clusters"},
{"text": "Deploying on Kubernetes"},
{"text": "Deploying on VMs"},
{"text": "Applications Guide"},
{"text": "Ray Cluster Management API"},
{"text": "Getting Started with KubeRay"},
{"text": "KubeRay Ecosystem"},
{"text": "KubeRay Benchmarks"},
{"text": "KubeRay Troubleshooting"},
// Ray Data
{"text": "Ray Data"},
{"text": "Ray Data API"},
{"text": "Integrations"},
// Ray Train
{"text": "Ray Train"},
{"text": "More Frameworks"},
{"text": "Advanced Topics"},
{"text": "Internals"},
{"text": "Ray Train API"},
// Ray Tune
{"text": "Ray Tune"},
{"text": "Ray Tune Examples"},
{"text": "Ray Tune API"},
// Ray Serve
{"text": "Ray Serve"},
{"text": "Ray Serve API"},
{"text": "Production Guide"},
{"text": "Advanced Guides"},
{"text": "Deploy Many Models"},
// Ray RLlib
{"text": "Ray RLlib"},
{"text": "Ray RLlib API"},
// More libraries
{"text": "More Libraries"},
{"text": "Ray Workflows (Alpha)"},
// Monitoring/debugging
{"text": "Monitoring and Debugging"},
// References
{"text": "References"},
{"text": "Use Cases", "style": {}}, // Don't use default style: https://github.com/ray-project/ray/issues/39172
// Developer guides
{"text": "Developer Guides"},
{"text": "Getting Involved / Contributing"},
];

Array.from(navItems).filter(
item => stringList.some(({text}) => item.innerText === text) && ! item.classList.contains('current')
).forEach((item, i) => {
if (item.classList.contains('toctree-l1')) {
const { style } = stringList.find(({text}) => item.innerText == text)

// Set the style on the menu items
Object.entries(style ?? defaultStyle).forEach(([key, value]) => {
item.style[key] = value
})

}
item.innerHTML +=
`<a href="${item.querySelector("a").getAttribute("href")}" style="display: none">`
+ '<input checked="" class="toctree-checkbox" id="toctree-checkbox-'
+ i + '" name="toctree-checkbox-' + i + '" type="button"></a>'
+ '<label for="toctree-checkbox-' + i + '">' +
'<i class="fas fa-chevron-down"></i></label>'
})
});

// Dynamically adjust the height of all panel elements in a gallery to be the same as
// that of the max-height element.
document.addEventListener("DOMContentLoaded", function() {
let images = document.getElementsByClassName("fixed-height-img");
let maxHeight = 0;

for (let i = 0; i < images.length; i++) {
if (images[i].height > maxHeight) {
maxHeight = images[i].height;
}
}

for (let i = 0; i < images.length; i++) {
let margin = Math.floor((maxHeight - images[i].height) / 2);
images[i].style.cssText = "margin-top: " + margin + "px !important;" +
"margin-bottom: " + margin + "px !important;"
}
});

// Remember the scroll position when the page is unloaded.
window.onload = function() {
let sidebar = document.querySelector("#site-navigation");

window.onbeforeunload = function() {
let scroll = sidebar.scrollTop;
localStorage.setItem("scroll", scroll);
}

let storedScrollPosition = localStorage.getItem("scroll");
if (storedScrollPosition) {
sidebar.scrollTop = storedScrollPosition;
localStorage.removeItem("scroll");
}
};

// When the document is fully loaded
document.addEventListener("DOMContentLoaded", function() {
// find all the code blocks' copy buttons
let codeButtons = document.querySelectorAll(".copybtn");
for (let i = 0; i < codeButtons.length; i++) {
const button = codeButtons[i];
// and add a click event listener to each one for Google Analytics.
button.addEventListener("click", function() {
gtag("event", "code_copy_click", {
"send_to": "UA-110413294-1",
Expand All @@ -161,3 +44,16 @@ document.addEventListener("DOMContentLoaded", function() {
});
}
});

document.addEventListener("DOMContentLoaded", function() {
let anyscaleButton = document.getElementById("try-anyscale")
anyscaleButton.onclick = () => {
gtag("event", "try_anyscale", {
"send_to": "UA-110413294-1",
"event_category": "TryAnyscale",
"event_label": "TryAnyscale",
"value": 1,
});
window.open('https://www.anyscale.com', '_blank');
}
});
35 changes: 0 additions & 35 deletions doc/source/_static/js/docsearch.js

This file was deleted.

148 changes: 0 additions & 148 deletions doc/source/_static/js/top-navigation.js

This file was deleted.

Loading