-
Notifications
You must be signed in to change notification settings - Fork 356
Standardize template structure in more sections #1184
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| {# This is just used for testing in our documentation #} | ||
| <button>TEST</button> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -100,13 +100,13 @@ function addModeListener() { | |
| */ | ||
| function addTOCInteractivity() { | ||
| window.addEventListener("activate.bs.scrollspy", function () { | ||
| const navLinks = document.querySelectorAll("#bd-toc-nav a"); | ||
| const navLinks = document.querySelectorAll(".bd-toc-nav a"); | ||
|
|
||
| navLinks.forEach((navLink) => { | ||
| navLink.parentElement.classList.remove("active"); | ||
| }); | ||
|
|
||
| const activeNavLinks = document.querySelectorAll("#bd-toc-nav a.active"); | ||
| const activeNavLinks = document.querySelectorAll(".bd-toc-nav a.active"); | ||
| activeNavLinks.forEach((navLink) => { | ||
| navLink.parentElement.classList.add("active"); | ||
| }); | ||
|
|
@@ -122,7 +122,7 @@ function addTOCInteractivity() { | |
| */ | ||
| function scrollToActive() { | ||
| // If the docs nav doesn't exist, do nothing (e.g., on search page) | ||
| if (!document.getElementById("bd-docs-nav")) { | ||
| if (!document.querySelector(".bd-docs-nav")) { | ||
| return; | ||
| } | ||
|
|
||
|
|
@@ -141,7 +141,7 @@ function scrollToActive() { | |
| console.log("[PST]: Scrolled sidebar using stored browser position..."); | ||
| } else { | ||
| // Otherwise, calculate a position to scroll to based on the lowest `active` link | ||
| var sidebarNav = document.getElementById("bd-docs-nav"); | ||
| var sidebarNav = document.querySelector(".bd-docs-nav"); | ||
| var active_pages = sidebarNav.querySelectorAll(".active"); | ||
| if (active_pages.length > 0) { | ||
| // Use the last active page as the offset since it's the page we're on | ||
|
|
@@ -305,7 +305,7 @@ function checkPageExistsAndRedirect(event) { | |
| } | ||
|
|
||
| // Populate the version switcher from the JSON config file | ||
| var themeSwitchBtns = document.querySelectorAll("version-switcher__button"); | ||
| var themeSwitchBtns = document.querySelectorAll(".version-switcher__button"); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this change looks unrelated, is it fixing something else? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It un breaks the version switcher i think. I noticed it while doing the work here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure, I just noticed that in our https://pydata-sphinx-theme.readthedocs.io/en/latest/index.html and this seemed like the obvious thing that was wrong |
||
| if (themeSwitchBtns.length) { | ||
| fetch(DOCUMENTATION_OPTIONS.theme_switcher_json_url) | ||
| .then((res) => { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| /** | ||
| * The list of in-page TOC links | ||
| */ | ||
| .page-toc { | ||
| .section-nav { | ||
| padding-left: 0; | ||
| border-bottom: none; | ||
|
|
||
| ul { | ||
| padding-left: 1rem; | ||
| } | ||
| } | ||
|
|
||
| // override bootstrap settings | ||
| .nav-link { | ||
| font-size: var(--pst-sidebar-font-size-mobile); | ||
| @include media-breakpoint-up($breakpoint-sidebar-secondary) { | ||
| font-size: var(--pst-sidebar-font-size); | ||
| } | ||
| } | ||
|
|
||
| .onthispage { | ||
| color: var(--pst-color-text-base); | ||
| font-weight: var(--pst-sidebar-header-font-weight); | ||
| margin-bottom: 0.5rem; | ||
| } | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.