Skip to content

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

Merged
merged 1 commit into from
Dec 23, 2017
Merged

Conversation

timhoffm
Copy link
Member

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:

grafik

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).

grafik

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.

Copy link
Member

@jklymak jklymak left a 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 jklymak added this to the v2.2 milestone Dec 21, 2017
@timhoffm
Copy link
Member Author

@jklymak Left-where? If you leave the height, but just left-align, long numbers clash with the "p".
grafik

When moving down further, short versions look a bit lost:
grafik

@jklymak
Copy link
Member

jklymak commented Dec 21, 2017

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.

@timhoffm
Copy link
Member Author

With a bit more effort, one could also make the text background opaque, so that it's more readable but cuts the polar plot. Note that long version strings are restricted to development versions anyway.

grafik

@jklymak
Copy link
Member

jklymak commented Dec 21, 2017

I won't merge because I don't think the header is a "minor" documentation change, but I like the change.

@QuLogic
Copy link
Member

QuLogic commented Dec 21, 2017

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.

Copy link
Member

@dstansby dstansby left a comment

Choose a reason for hiding this comment

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

@tacaswell tacaswell modified the milestones: v2.2, v2.1.1-doc Dec 23, 2017
@tacaswell
Copy link
Member

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).

{%- 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>
Copy link
Member

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?

Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants