Skip to content

Commit

Permalink
Update Get Started link; add Anyscale logo to the button. (ray-projec…
Browse files Browse the repository at this point in the history
  • Loading branch information
sijieamoy authored Feb 27, 2023
1 parent 8624273 commit dc8c368
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion doc/source/_static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ pre {
}

.top-nav-content > button.try-anyscale > span {
margin-right: 12px;
margin: 0 12px;
}

.top-nav-content .menu:hover > ul {
Expand Down
11 changes: 7 additions & 4 deletions doc/source/_static/js/top-navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ function getNavURL(url) {
}
}
}

is_get_started = window.location.href.endsWith("ray-overview/index.html")
is_get_started = window.location.href.endsWith("ray-overview/getting-started.html")
is_use_cases = window.location.href.endsWith("ray-overview/use-cases.html")
is_libraries = window.location.href.includes("/ray-core/") ||
window.location.href.includes("/ray-air/") ||
Expand Down Expand Up @@ -50,7 +49,7 @@ topNavContentLeft.append(linkRay)
//-- The Get started link
getStartedLink = document.createElement("a")
getStartedLink.innerText = "Get started"
getStartedLink.setAttribute("href", getNavURL("ray-overview/index.html"))
getStartedLink.setAttribute("href", getNavURL("ray-overview/getting-started.html"))
if (is_get_started) {
getStartedLink.style.borderBottom = "2px solid #007bff"
}
Expand Down Expand Up @@ -118,7 +117,11 @@ topNavContent.append(topNavContentLeft)
// The right part that contains the Anyscale trial button
anyscaleButton = document.createElement("button");
anyscaleButton.setAttribute("class", "try-anyscale");
anyscaleButton.innerHTML = '<span>Managed Ray on Anyscale</span><i class="fas fa-chevron-right" aria-hidden="true" title="Hide"></i>'
anyscaleLogoSvg =
'<svg style="margin-top:-3px" width="20" height="20" viewBox="0 0 48 49" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M29.9599 18.4984H42.2138C43.7544 18.509 45.2281 19.1288 46.3124 20.2223C47.3968 21.3158 48.0036 22.7938 48 24.3332V42.6119C47.9965 44.1512 47.3829 45.6265 46.2935 46.7149C45.2042 47.8034 43.7277 48.4164 42.1871 48.42H32.1915C30.6509 48.4164 29.1745 47.8034 28.0851 46.7149C26.9957 45.6265 26.3821 44.1512 26.3786 42.6119V22.0634H5.81292C4.27233 22.0599 2.79584 21.4468 1.70647 20.3583C0.6171 19.2699 0.00352944 17.7946 0 16.2553V6.26809C0.00352944 4.72878 0.6171 3.25353 1.70647 2.16507C2.79584 1.07661 4.27233 0.463548 5.81292 0.460022H24.147C25.6876 0.463548 27.1641 1.07661 28.2535 2.16507C29.3428 3.25353 29.9564 4.72878 29.9599 6.26809V18.4984ZM4.21603 17.8375C4.63956 18.2607 5.21397 18.4984 5.81292 18.4984H26.392V6.25473C26.392 5.65628 26.1541 5.08234 25.7305 4.65917C25.307 4.236 24.7326 3.9983 24.1336 3.9983H5.81292C5.21397 3.9983 4.63956 4.236 4.21603 4.65917C3.79251 5.08234 3.55457 5.65628 3.55457 6.25473V16.2419C3.55457 16.8404 3.79251 17.4143 4.21603 17.8375ZM43.8107 44.1941C44.2342 43.771 44.4721 43.197 44.4721 42.5985V24.3465C44.4721 23.7481 44.2342 23.1742 43.8107 22.751C43.3872 22.3278 42.8128 22.0901 42.2138 22.0901H29.9599V42.5985C29.9599 43.197 30.1978 43.771 30.6214 44.1941C31.0449 44.6173 31.6193 44.855 32.2183 44.855H42.2138C42.8128 44.855 43.3872 44.6173 43.8107 44.1941ZM5.82633 26.6965H15.9822C17.5228 26.7 18.9993 27.313 20.0887 28.4015C21.1781 29.4899 21.7916 30.9652 21.7952 32.5045V42.6519C21.7916 44.1912 21.1781 45.6665 20.0887 46.755C18.9993 47.8434 17.5228 48.4565 15.9822 48.46H5.82633C4.28574 48.4565 2.80925 47.8434 1.71988 46.755C0.630507 45.6665 0.0169572 44.1912 0.0134277 42.6519V32.5045C0.0169572 30.9652 0.630507 29.4899 1.71988 28.4015C2.80925 27.313 4.28574 26.7 5.82633 26.6965ZM17.5791 44.3143C18.0027 43.8911 18.2406 43.3172 18.2406 42.7187V32.5713C18.2406 31.9728 18.0027 31.3989 17.5791 30.9757C17.1556 30.5526 16.5812 30.3148 15.9822 30.3148H5.82633C5.22738 30.3148 4.65296 30.5526 4.22944 30.9757C3.80592 31.3989 3.56798 31.9728 3.56798 32.5713V42.7187C3.56798 43.3172 3.80592 43.8911 4.22944 44.3143C4.65296 44.7374 5.22738 44.9751 5.82633 44.9751H15.9822C16.5812 44.9751 17.1556 44.7374 17.5791 44.3143Z" fill="#0641AC"/></svg>';
anyscaleButton.innerHTML =
anyscaleLogoSvg +
'<span>Managed Ray on Anyscale</span><i class="fas fa-chevron-right" aria-hidden="true" title="Hide"></i>';
anyscaleButton.onclick = function () {
gtag("event", "try_anyscale", {
"send_to": "UA-110413294-1",
Expand Down

0 comments on commit dc8c368

Please sign in to comment.