-
Notifications
You must be signed in to change notification settings - Fork 143
feat: add readthedocs javascript search #158
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
Open
ReenigneArcher
wants to merge
8
commits into
jothepro:main
Choose a base branch
from
ReenigneArcher:feat-add-readthedocs-javascript-search
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
76f3def
feat: add readthedocs javascript search
ReenigneArcher 6bd490e
fix(rtd): update version variable
ReenigneArcher 5f72160
fix(rtd): Add live RTD search dropdown and focus fixes
ReenigneArcher 9586d04
refactor(rtd): Replace jQuery calls with native DOM/fetch
ReenigneArcher f8f7031
chore: restore dep groups in package.json
ReenigneArcher d64c33a
fix: apply css styling suggestions from code review
ReenigneArcher 0a74942
fix: Add left-aligned live search and position fixes
ReenigneArcher 13eb0ec
chore: add readthedocs config and build scripts
ReenigneArcher File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| docs/html | ||
| _readthedocs | ||
| .DS_Store | ||
| .idea | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| --- | ||
| # .readthedocs.yaml | ||
| # Read the Docs configuration file | ||
| # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
|
|
||
| version: 2 | ||
|
|
||
| build: | ||
| os: ubuntu-24.04 | ||
| tools: | ||
| python: "miniconda-latest" | ||
| commands: | ||
| - chmod +x readthedocs_build.sh | ||
| - ./readthedocs_build.sh | ||
|
|
||
| # using conda, we can get newer doxygen and graphviz than ubuntu provide | ||
| # https://github.com/readthedocs/readthedocs.org/issues/8151#issuecomment-890359661 | ||
| conda: | ||
| environment: environment.yml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,103 @@ | ||
| /* Highlight text in search results */ | ||
| span.highlighted { | ||
| background-color:var(--warning-color); | ||
| color: var(--page-foreground-color); | ||
| padding: 2px; | ||
| border-radius: 3px; | ||
| } | ||
|
|
||
| /* Remove list bullets for search results */ | ||
| ul.search { | ||
| list-style-type: none; | ||
| padding: 0; | ||
| } | ||
|
|
||
| /* Add horizontal divider for search results */ | ||
| ul.search li.search-result { | ||
| border-bottom: 1px solid var(--separator-color); | ||
| padding-bottom: 10px; | ||
| margin-bottom: 10px; | ||
| } | ||
|
|
||
| /* Live search dropdown */ | ||
| #RTDLiveResults { | ||
| margin-top: var(--spacing-small); | ||
| display: none; | ||
| position: absolute; | ||
| z-index: 10000; | ||
| left: unset; | ||
| background: var(--page-background-color); | ||
| border: 1px solid var(--separator-color); | ||
| border-radius: var(--border-radius-large); | ||
| box-shadow: var(--box-shadow); | ||
| max-height: 420px; | ||
| overflow-y: auto; | ||
| } | ||
|
ReenigneArcher marked this conversation as resolved.
|
||
|
|
||
| @media screen and (max-width: 767px) { | ||
| #RTDLiveResults { | ||
| left: var(--spacing-medium); | ||
| right: var(--spacing-medium); | ||
| } | ||
| } | ||
|
|
||
| #RTDLiveResults .rtd-live-list { | ||
| list-style: none; | ||
| margin: 0; | ||
| padding: var(--spacing-small) 0; | ||
| } | ||
|
|
||
| #RTDLiveResults .rtd-live-list li { | ||
| margin: 0; | ||
| } | ||
|
|
||
| #RTDLiveResults .rtd-live-item { | ||
| display: block; | ||
| padding: var(--spacing-small) var(--spacing-medium); | ||
| margin: var(--spacing-small); | ||
| border-radius: var(--border-radius-small); | ||
| color: var(--page-foreground-color); | ||
| text-decoration: none; | ||
| outline: none; | ||
| } | ||
|
ReenigneArcher marked this conversation as resolved.
|
||
|
|
||
| #RTDLiveResults .rtd-live-item:hover, | ||
| #RTDLiveResults .rtd-live-item:focus { | ||
| background: var(--menu-focus-background); | ||
| } | ||
|
|
||
| #RTDLiveResults .rtd-live-title { | ||
| display: block; | ||
| font-weight: bold; | ||
| font-size: var(--navigation-font-size); | ||
| } | ||
|
|
||
| #RTDLiveResults .rtd-live-snippet { | ||
| display: block; | ||
| font-size: calc(var(--navigation-font-size) * 0.9); | ||
| color: var(--page-secondary-foreground-color); | ||
| white-space: nowrap; | ||
| overflow: hidden; | ||
| text-overflow: ellipsis; | ||
| max-width: 400px; | ||
| } | ||
|
ReenigneArcher marked this conversation as resolved.
|
||
|
|
||
| #RTDLiveResults .rtd-live-item:hover .rtd-live-title, | ||
| #RTDLiveResults .rtd-live-item:hover .rtd-live-snippet, | ||
| #RTDLiveResults .rtd-live-item:focus .rtd-live-title, | ||
| #RTDLiveResults .rtd-live-item:focus .rtd-live-snippet { | ||
| color: var(--menu-focus-foreground); | ||
| } | ||
|
|
||
| #RTDLiveResults .rtd-live-snippet mark { | ||
| background-color: var(--warning-color); | ||
| color: var(--page-foreground-color); | ||
| padding: 0 2px; | ||
| border-radius: 2px; | ||
| } | ||
|
|
||
| #RTDLiveResults .rtd-live-empty { | ||
| padding: var(--spacing-medium); | ||
| color: var(--page-secondary-foreground-color); | ||
| font-size: var(--navigation-font-size); | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.