-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Add version to documentation header #10065
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
Conversation
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.
I'd left align. Looks funky for long version numbers.
https://4722-1385122-gh.circle-artifacts.com/0/home/circleci/project/doc/build/html/index.html
But otherwise I really like this! 👍
@jklymak Left-where? If you leave the height, but just left-align, long numbers clash with the "p". |
Oops, sorry, I didn't see how you were anchoring. If at all humanly possible I'd anchor below the second "t" or second "l". If thats too hard (sorry my css/html is a bit rusty), what you have is fine. After all folks can expect a few rough edges if they look at the Master version of the docs. |
I won't merge because I don't think the header is a "minor" documentation change, but I like the change. |
I agree with right alignment, though maybe 0.5 or even 0.25 em lower just to make the dot of the i not overlap the circle. I don't really think there's any reason for the given header height. When I CSS-ified the GitHub banner, that's just the size that came out of the generator and matched the old image. I'm not sure one or the other is "right" in that regard. |
e68bc68
to
1855b14
Compare
1855b14
to
4ad7d68
Compare
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.
Nice! https://circleci.com/gh/matplotlib/matplotlib/4734/artifacts/0//home/circleci/project/doc/build/html/index.html for anyone else who wants to review
If we do this we should probably regenerate old versions of the docs as well (at least 2.0 and 1.5) and re-publish those as well (I'll take care of that and all of the backporting and rebuilding). |
Backport PR #10065 on branch v2.1.1-doc
{%- else %} | ||
<a href="{{ pathto('index') }}"><img src="{{pathto("_static/logo2.svg", 1) }}" width="540px" border="0" alt="matplotlib"/></a> | ||
<a href="{{ pathto('index') }}"> | ||
<div style="float: left; position: absolute; width: 496px; bottom: 0; padding-bottom: 24px"><span style="float: right; color: #789; background: white">Version {{ version|e }}</span></div> |
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.
Was the change from svg -> png intentional here?
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.
Um. uh, no! Must have been a copy-paste error. 🐑
Not knowing the above, the png was annoying me on hi-res screens for a couple of months now and I already wanted to switch it out for a svg. Turns out I broke it in the first place. 🤦♂️
Will provide a patch.
PR Summary
Version number
This adds a version number to the header section of the documentation. The motivation is to make it always obvious, which version of the documentation one is using:
Minor header height correction
While working on this, I realized that the header is probably slightly higher than intended (compare the white pixels below the github badge in the current docs).
The reason was a fixed-width logo, which takes slightly too much height (129px instead of 125px). I've changed this for a fixed height. As a result, the logo is slightly smaller, but I assume this is the actually desired layout.