Repository navigation
Update layout.html file in sphinx to add top menubar to astropy docs - #4
Conversation
|
cc @astrofrog |
|
Thanks, @pllim! Appreciate it |
|
Hi! I just found out some issues with my PR and need more time to debug. But any suggestions or ideas would be appreciated. |
|
Looking at the changes, I think most of these are specific to the core package, so I think we should customize the layout template there, not in this theme package (which is used by many packages) |
|
@astrofrog - good point, it's my bad to forget about the packages that use the template but are not coordinated packages (for those this could be useful, too I think). |
|
Yup @astrofrog, no problems! It is my first time so I did not check carefully enough before opening this PR, will effect the changes in my astropy/astropy repo then. Cheers! |
|
Reopened this PR to follow up as suggested in astropy/astropy#8440 (review). |
|
Hi @astrofrog, I have added an |
|
And give me a brief moment to undo the previous commits regarding the |
|
Think I have cleaned up every unnecessary change made in this PR prior to the last commit. Please review and confirm. Thanks! |
|
And just to make sure, if I have changed the |
|
I think I have managed to add the proposed menubar by configuring the theme at the astropy/astropy repo without having to resort to change the theme here. Therefore, I am closing this PR. |
|
Hi, I have reopened this PR, and have added in items in the top menubar that would only be on if the sphinx variable astropy_project_menubar is set to True, so that people can opt out say by setting it to False. The PR is ready for a review now, as I was able to use a version of it on an affiliated repo to check locally, and obtained the desired effects. For a screenshot please see the following: |
astrofrog
left a comment
There was a problem hiding this comment.
Thanks! This is on the right track, but at the moment the custom.css file duplicates a lot of what's in bootstrap-astropy.css - do we really need to have two separate CSS files? Either we should just have one file, or if we really need to override some CSS in the case where there is a toolbar, we can just override the styles from bootstrap-astropy.css. Ideally we'd just have one file.
|
You are welcome @astrofrog! Yes, the |
|
Replacement of |
| <link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:200,600' rel='stylesheet' type='text/css'/> | ||
| {% if astropy_project_menubar == true %} | ||
| <link type='text/css' href='_static/custom.css' /> | ||
| {% endif %} |
There was a problem hiding this comment.
Yup, it is need, for people to opt in or out of the astropy_project_menubar as an option.
There was a problem hiding this comment.
Sorry, I confused this with something else. It is indeed not needed any more and has been removed.
|
In addition to the small comment above, can you also rebase this? |
|
Yup, rebased and squashed all commits into one and resolved one conflict in the layout.html file. |
|
@kakirastern - there was an issue with the rebase, and a residual merge commit, so I've rebased it again and pushed to your branch. I think this should then be good to go. |
|
@kakirastern - the option couldn't currently be set from the |
|
I've also removed the |

Addresses Issue astropy/astropy#8320. Am in the process of implementing changes to add top menubar to astropy docs. Might need help in debugging.