Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove references to some missing files and fix some invalid JavaScript #292

Merged
merged 4 commits into from
May 4, 2023
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
4 changes: 0 additions & 4 deletions qiskit_sphinx_theme/pytorch_base/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,10 @@
{{ js_tag(scriptfile) }}
{%- endfor %}

<script type="text/javascript" src="{{ pathto('_static/js/vendor/popper.min.js', 1) }}"></script>
<script type="text/javascript" src="{{ pathto('_static/js/vendor/bootstrap.min.js', 1) }}"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/list.js/1.5.0/list.min.js"></script>
<script type="text/javascript" src="{{ pathto('_static/js/theme.js', 1) }}"></script>
<script type="text/javascript" src="{{ pathto('_static/js/utils.js', 1) }}"></script>

<script type="text/javascript" src="{{ pathto('_static/js/vendor/anchor.min.js', 1) }}"></script>

<!-- enable language dropdown menu expand -->
<script type="text/javascript">
jQuery(function () {
Expand Down
1 change: 0 additions & 1 deletion qiskit_sphinx_theme/pytorch_base/static/css/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -12757,4 +12757,3 @@ article.pytorch-article .tutorials-callout-container .btn.callout-button a {
text-transform: uppercase;
padding-right: 5px;
}
/*# sourceMappingURL=theme.css.map */
25 changes: 4 additions & 21 deletions qiskit_sphinx_theme/pytorch_base/static/js/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,7 @@ window.utilities = {
},

headersHeight: function() {
if (document.getElementById("pytorch-left-menu").classList.contains("make-fixed")) {
return document.getElementById("pytorch-page-level-bar").offsetHeight;
} else {
return document.getElementById("header-holder").offsetHeight +
document.getElementById("pytorch-page-level-bar").offsetHeight;
}
return document.getElementById("pytorch-page-level-bar").offsetHeight;
},

windowHeight: function() {
Expand Down Expand Up @@ -240,8 +235,7 @@ window.highlightNavigation = {

var scrollPosition = utilities.scrollTop();
var OFFSET_TOP_PADDING = 25;
var offset = document.getElementById("header-holder").offsetHeight +
document.getElementById("pytorch-page-level-bar").offsetHeight +
var offset = document.getElementById("pytorch-page-level-bar").offsetHeight +
OFFSET_TOP_PADDING;

var sections = highlightNavigation.sections;
Expand Down Expand Up @@ -484,9 +478,6 @@ window.sideMenus = {
}

if (rightMenuHasLinks) {
// Don't show the Shortcuts menu title text unless there are menu items
document.getElementById("pytorch-shortcuts-wrapper").style.display = "block";

// We are hiding the titles of the pages in the right side menu but there are a few
// pages that include other pages in the right side menu (see 'torch.nn' in the docs)
// so if we exclude those it looks confusing. Here we add a 'title-link' class to these
Expand Down Expand Up @@ -577,16 +568,8 @@ window.sideMenus = {
},

handleNavBar: function() {
var mainHeaderHeight = document.getElementById('header-holder').offsetHeight;

// If we are scrolled past the main navigation header fix the sub menu bar to top of page
if (utilities.scrollTop() >= mainHeaderHeight) {
document.getElementById("pytorch-left-menu").classList.add("make-fixed");
document.getElementById("pytorch-page-level-bar").classList.add("left-menu-is-fixed");
} else {
document.getElementById("pytorch-left-menu").classList.remove("make-fixed");
document.getElementById("pytorch-page-level-bar").classList.remove("left-menu-is-fixed");
}
document.getElementById("pytorch-left-menu").classList.remove("make-fixed");
document.getElementById("pytorch-page-level-bar").classList.remove("left-menu-is-fixed");
},

expandClosestUnexpandedParentList: function (el) {
Expand Down