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

ENH: add the theme version in the footer #1000

Merged
merged 6 commits into from Oct 12, 2022
Merged

Conversation

12rambau
Copy link
Collaborator

@12rambau 12rambau commented Oct 8, 2022

Fix #990

I looked at what other themes were doing and as suggested in the issue, a lot of them are using

Created using Sphinx 5.3.2 and PyData Sphinx Theme 0.11.0.

To do that I should have overwritten the sphinx-version component entirely which is not the route taken by the theme where all the components displayed in the footer are independent. So I created a specific component that can be added to the footer.

it displays as such and can be set independently from the Sphinx version:
Capture d’écran 2022-10-08 à 10 52 44

Copy link
Collaborator

@choldgraf choldgraf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is nice, thanks! A couple quick thoughts but it generally looks good

<a href="https://pydata-sphinx-theme.readthedocs.io/en/stable/index.html">
Pydata-sphinx-theme
</a>
{{ theme_version }}.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we put this in a little span element in case people want to style it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the whole thing is encapsulated in a p element with the theme-version class isn't it sufficient?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you prefer not to have the span, it's fine w me. I tend to wrap everything that is "semantically different" from anything else in its own class but that is maybe overkill 😅

In the future if somebody really wants it they will ask for it and we can consider adding it in

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a strong opinion on this one, I simply copied the structure of the sphinx-version.html template.
If you want I can add a span to both or keep it as it is

@12rambau 12rambau marked this pull request as ready for review October 9, 2022 05:49
Copy link
Collaborator

@choldgraf choldgraf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops - noticed one more thing

…heme-version.html

Co-authored-by: Chris Holdgraf <choldgraf@gmail.com>
@12rambau 12rambau changed the title FIX: add the theme version in the footer ENH: add the theme version in the footer Oct 10, 2022
Copy link
Collaborator

@choldgraf choldgraf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should just merge it in and iterate from there - thanks for this improvement!

@choldgraf choldgraf merged commit 94a0ec9 into pydata:main Oct 12, 2022
@12rambau 12rambau deleted the footer branch October 12, 2022 09:38
@jarrodmillman jarrodmillman added this to the 0.12 milestone Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show theme version in footer
3 participants