-
-
Notifications
You must be signed in to change notification settings - Fork 20
Add New Astropy Theme #48
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
Cadair
wants to merge
9
commits into
astropy:main
Choose a base branch
from
Cadair:sunpy-astropy-theme
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
9 commits
Select commit
Hold shift + click to select a range
2f82375
Add second theme
Cadair b4dbfca
dep on sunpy theme
Cadair ea83e4c
Default some more stuff for new theme
Cadair 82d1496
TMP: use build preview for main site
Cadair 6b1b595
Add CoC to footer
Cadair 9ec3869
Deprecate old function
Cadair e71c421
wtaf
Cadair 65ee549
Update circleci status job
Cadair 482da03
more pre-commit
Cadair 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
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 |
|---|---|---|
| @@ -1,16 +1,13 @@ | ||
| """Astropy Sphinx Theme""" | ||
| import warnings | ||
|
|
||
| import os | ||
| from .bootstrap_astropy import get_html_theme_path as _old_theme_path | ||
|
|
||
|
|
||
| def get_html_theme_path(): | ||
| """Return list of HTML theme paths.""" | ||
| cur_dir = os.path.abspath(os.path.dirname(__file__)) | ||
| return [cur_dir] | ||
|
|
||
|
|
||
| def setup(app): | ||
| app.add_html_theme( | ||
| "bootstrap-astropy", | ||
| os.path.abspath(os.path.join(os.path.dirname(__file__), "bootstrap-astropy")), | ||
| warnings.warn( | ||
| "astropy_sphinx_theme.get_html_theme_path is deprecated, you shouldn't" | ||
| " need to manually specify the theme path as the theme is registered with sphinx", | ||
| DeprecationWarning, | ||
| stacklevel=2, | ||
| ) | ||
| return _old_theme_path() |
11 changes: 11 additions & 0 deletions
11
astropy_sphinx_theme/astropy-unified/static/css/astropy.css
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,11 @@ | ||
| :root { | ||
| /* SunPy Theme Colors */ | ||
| --sst-accent-color-bright: #ff5000; | ||
| --sst-accent-color-muted: #fc9468; | ||
| --sst-dark-color: #404040; | ||
| --sst-darker-color: #333333; | ||
| --sst-darkest-color: #222222; | ||
| --sst-light-color: rgb(206, 206, 206); | ||
| --sst-lighter-color: rgb(231, 231, 231); | ||
| --sst-lightest-color: rgb(251, 251, 251); | ||
| } |
252 changes: 252 additions & 0 deletions
252
astropy_sphinx_theme/astropy-unified/static/img/astropy_logo_notext.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
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,38 @@ | ||
| [theme] | ||
| inherit = "sunpy" | ||
|
|
||
| [options] | ||
| sst_project_name = "Astropy" | ||
| # We use the RTD build preview of the new website here so the top nav works | ||
| # sst_site_root = "https://astropy.org" | ||
| sst_site_root = "https://astropy-org-test.readthedocs.io" | ||
| navbar_links = [ | ||
| ["About", | ||
| [ | ||
| ["About Astropy", "about.html", 2], | ||
| ["Code of Conduct", "code_of_conduct.html", 2], | ||
| ["Acknowledging & Citing", "acknowledging.html", 2], | ||
| ["History", "history.html", 2], | ||
| ] | ||
| ], | ||
| ["Documentation", | ||
| [ | ||
| ["astropy", "https://docs.astropy.org", 3], | ||
| ["asdf-astropy", "https://asdf-astropy.readthedocs.io", 3], | ||
| ["astropy-healpix", "https://astropy-healpix.readthedocs.io", 3], | ||
| ["astroquery", "https://astroquery.readthedocs.io", 3], | ||
| ["ccdproc", "https://ccdproc.readthedocs.io", 3], | ||
| ["photutils", "https://photutils.readthedocs.io", 3], | ||
| ["regions", "https://astropy-regions.readthedocs.io", 3], | ||
| ["reproject", "https://reproject.readthedocs.io", 3], | ||
| ["specreduce", "https://specreduce.readthedocs.io", 3], | ||
| ["specutils", "https://specutils.readthedocs.io", 3], | ||
| ] | ||
| ], | ||
|
Member
Author
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. docs.astropy.org has a learn link in the header, would we like to add one here? |
||
| ["Get Help", "help.html", 2], | ||
| ["Contribute", "contribute.html", 2], | ||
| ["Affiliated Packages", "affiliated/index.html", 2], | ||
| ["Team", "team.html", 2], | ||
| ] | ||
| rtd_extra_search_projects = [["astropy-org-test", "https://astropy-org-test.readthedocs.io"]] | ||
| footer_links = [["Code of Conduct", "code_of_conduct.html", 2]] | ||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the moment I have just linked the coordinated packages here. We need to decide if we want to list all affiliated packages or not.
As you can see on https://sunpy.org it's possible to have collapsible sections here, so we could choose to put all the affiliated packages under a click to reveal list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should also be noted that by default if we list all the affiliated packages here they will also be included in the unified search results (as long as they are hosted on RTD).