Skip to content

Commit

Permalink
Merge pull request intel-analytics#13 from Oscilloscope98/refactor-si…
Browse files Browse the repository at this point in the history
…debar

Refactor left sidebar
  • Loading branch information
shane-huang authored Oct 10, 2022
2 parents 38aa2f6 + 7c4f171 commit 65f1b1a
Show file tree
Hide file tree
Showing 9 changed files with 58 additions and 64 deletions.
13 changes: 13 additions & 0 deletions docs/readthedocs/source/_static/css/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/* align items in the left part of header to the ground*/
.bd-header #navbar-start {
align-items: end;
}

/* for version badge, possible for other badges*/
.version-badge{
border: 1px solid var(--pst-color-primary);
border-radius: 0.25rem;
color: var(--pst-color-primary);
padding: 0.1rem 0.25rem;
font-size: var(--pst-font-size-milli);
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions docs/readthedocs/source/_static/js/custom.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
$(document).ready(function(){
// $('.btn.dropdown-toggle.nav-item').text('Libraries'); // change text for dropdown menu in header from More to Libraries
$('.navbar-end-item.navbar-end__search-button-container').remove(); // remove search button from top bar manually
// $('.btn.dropdown-toggle.nav-item').text('Libraries'); // change text for dropdown menu in header from More to Libraries
$('#ethical-ad-placement').css({ //weanken the display effect of ads div
"transform":"scale(0.3)", // make it smaller
"position":"absolute", // modify its position
Expand Down
60 changes: 0 additions & 60 deletions docs/readthedocs/source/_templates/breadcrumbs.html

This file was deleted.

6 changes: 6 additions & 0 deletions docs/readthedocs/source/_templates/sidebar_backbutton.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{% set home_href = pathto(master_doc) %}
<div>
<a href={{ home_href }}>
<strong>Back to Homepage ↵</strong>
</a>
</div>
7 changes: 7 additions & 0 deletions docs/readthedocs/source/_templates/sidebar_handouts.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<div>
<strong>BigDL Handouts</strong>
<br/>
<a href="_static/image/bigdl_handouts.png">
<img src="_static/image/bigdl_handouts.png" alt="BigDL Handouts"/>
</a>
</div>
19 changes: 19 additions & 0 deletions docs/readthedocs/source/_templates/sidebar_releases.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<div>
<strong>Versions</strong>
<div style="display:flex">
<div>
latest:&nbsp;
<br/>
v2.1.0:&nbsp;
<br/>
v2.0.0:&nbsp;
</div>
<div>
<a href="https://bigdl.readthedocs.io/en/latest/">document</a>
<br/>
<a href="https://bigdl.readthedocs.io/en/v2.1.0/">document</a> | <a href="https://github.com/intel-analytics/BigDL/releases/tag/v2.1.0">release notes</a>
<br/>
<a href="https://bigdl.readthedocs.io/en/v2.0.0/">document</a> | <a href="https://github.com/intel-analytics/BigDL/releases/tag/v2.0.0">release notes</a>
</div>
</div>
</div>
3 changes: 3 additions & 0 deletions docs/readthedocs/source/_templates/version_badge.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<div class="version-badge" style="margin-bottom: 2px;">
{{ release }}
</div>
11 changes: 9 additions & 2 deletions docs/readthedocs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,21 @@
"icon": "fa-brands fa-square-github",
"type": "fontawesome",
}
]
],
"navbar_start": ["navbar-logo.html", "version_badge.html"]
}
html_logo = "../image/bigdl_logo.png"

# add search bar to side bar
html_sidebars = {
"**": ["search-field.html", "sidebar-nav-bs.html"]
"index": [
"sidebar_releases.html",
"sidebar_handouts.html"
],
"**": ["sidebar_backbutton.html","sidebar-nav-bs.html"]
}
# hard code it for now, may change it to read from installed bigdl
release = "latest"

# The suffix of source filenames.
from recommonmark.parser import CommonMarkParser
Expand Down

0 comments on commit 65f1b1a

Please sign in to comment.