-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
DOC: adding main nav to site #15489
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
DOC: adding main nav to site #15489
Conversation
Added a main nav to sperate nav links from breadcrumb links This should make navigating matplotlib.org easier
When I bring it up on my Mac with Firefox, I get the magnifier cursor, and I can't seem to get rid of it while on that page. |
The logo and h1 are a cobalt blue. Making this band darker blue looks jarring to me. |
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 also agree that a hover would be nice. I can take or leave the all-caps.
|
||
/* new main nav */ | ||
nav.main-nav{ | ||
background-color: #002b47; |
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.
Background color should be same as h1 color? #11557C
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 like that the color is somewhat darker than the logo and headings. It gives some additional separation. With the same color, logo nav and headings would blend too much into each other.
Might be a tiny bit lighter though (in between current and the headings color).
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.
Its already light on dark, so I bet that would stand out more than adequately. I think limiting your color palette and fonts is something most web design tips will suggest...
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 did try making the nav the same color as the logo, and it made the page look very flat. Tim is correct that the darker nav creates visual separation between the elements. I don't recommend making the logo and the nav the same color.
Limiting a designs color palette is usually a good plan. However, the site color scheme currently only has two colors (logo blue and orange) and, unfortunately, it's pretty much impossible to build a meaningful site hierarchy with only two colors.
Many websites have formal guidelines about how to apply color (see https://material.io/design/color/ for Google, https://primer.style/css/utilities/colors for Github). It might be nice to re-think the site color palette using the colors in Viridis in the future, but this would be a much larger and more complex project.
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.
doc/_static/mpl.css
Outdated
/* new main nav */ | ||
nav.main-nav{ | ||
background-color: #002b47; | ||
font-family: Calibri, 'Gill Sans', 'Gill Sans MT', 'Trebuchet MS', sans-serif; |
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 don't see that we use Calibri anywhere else. Is there a reason for this choice? Just like colors, I find the diversity of fonts on the front-page impressive enough already without adding more.
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.
Calibri is the font used by the logo text. Which means my screenshot above is actually using Calibri and the screenshot in the original post is falling back to some other font.
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.
Sure, but then lets make a lot more of the header text Calibri
if thats what we want. I'm not too fussed if the logo (or plots) is a different font because it is quite distinctive, but I'd prefer we minimize the html fonts.
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.
Calibri has a proprietary license. While I think that's not an issue as long as we just reference it in CSS but don't distribute it, it might be nice to use a font with an open license for an open source project. Also, it's usually only available on Windows, so many users will fall back to something else anyway.
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.
Yup, Calibri is the font used in the logo and it is a licensed font (though many people have it installed on their computers via microsoft products). The font family
property will load Calibri if visitors already have it already installed on their computers. Otherwise, browsers will go down the list until it finds a font that matches. There are open source alternatives that we could load with the webpage, but this would be a bigger projects thats best handled in a different conversation about branding (and maybe sticker budgets)
Helvetica is the only font currently used as browser rendered text on the site–Here's the font stack:
matplotlib/doc/_static/mpl.css
Lines 6 to 7 in 349e2e9
body { | |
font-family: "Helvetica Neue", Helvetica, 'Lucida Grande', 'Lucida Sans Unicode', 'Geneva', 'Verdana', sans-serif; |
I usually design slightly different treatments for header navigation text, since it serves a different purpose on a webpage from text or headers in the main content (a nav helps site visitors find a page and text is for absorbing content). I did try doing something with Helvetica, but it only contributed to the page looking like a wall of text.
doc/_static/mpl.css
Outdated
font-family: Calibri, 'Gill Sans', 'Gill Sans MT', 'Trebuchet MS', sans-serif; | ||
text-transform: uppercase; | ||
letter-spacing: 2px; | ||
font-size: 11px; |
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.
Elsewhere font sizes are specified as ems. That makes it easier to re-size the whole page if we want. Any reason to hard-code the sizes 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.
Modern web browsers will zoom in on pixel-sized text correctly these days (especially since we're all looking at the web with devices with different screen resolutions). Ems are more useful these days when building layouts that scale with parent containers.
I do appreciate that you're thinking about website accessibility though.
FWIW, I don't have any weird issues w/ this page on Firefox. |
This looks awesome! Thanks! ETA: I like the dark blue, think it grounds the menu & makes it easy to spot. |
More responses to your feedback -
We don't want the nav to overwhelm the rest of page content, but I'm happy to make the font larger.
The internet has been around long enough that people usually intuitively know the to click on the logo to get back to the homepage. Though it might make sense to put the home link back in the breadcrumb.
Yup. I forgot to do this...
We put Installation at the end since it would be easier to find. Whats the best way to come to consensus about the link order? What does everyone think about changing "Examples" to "Sample Plots"?
This is my most favorite suggestion I've ever heard about how to order links on a site, though I'd recommend focusing on user needs first |
I've added Carlito to the font stack. Adding the font to the site later to replace Calibri might be a good idea |
I think this should be reviewed under the same criteria as docs changes ("is it better", single reviewer merge) however, I'm going to recuse my self from merging @dorafc 's PRs. latest build: https://circleci.com/gh/matplotlib/matplotlib/25898/artifacts/0//home/circleci/project/doc/build/html/index.html |
I think @ImportanceOfBeingErnest & I put it first because that's where we kinda expect to find installation/it's kind of the default location:
In all seriousness, it follows the convention shown above: install, then documentation, keeping examples & tutorials next to each other since they're two sides of the same coin, then contribute 'cause it's usually at the end. I'm +-0 on sample plots since its two words but mostly 'cause visualizations and plots aren't 100% interchangeable as much as we tend to use 'em as such. Example gallery maybe? |
12px is definitely a better size than 11px now. My only other suggestion is |
I prefer just plain "Gallery" or "Examples". |
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.
Looks great, thanks for the quick turn around on the suggested changes!
Thanks for all the feedback. FWIW, I'm looking into if we can add Carlito onto the site easily (@QuLogic -- it does look a lot better). It would make accomodating the font stack fallbacks easier. At initial glance, it looks like its an older license that doesn't take the web into consideration... |
…489-on-v3.1.1-doc Backport PR #15489 on branch v3.1.1-doc (DOC: adding main nav to site)
…489-on-v3.1.x Backport PR #15489 on branch v3.1.x (DOC: adding main nav to site)
…489-on-v3.2.x Backport PR #15489 on branch v3.2.x (DOC: adding main nav to site)
PR SUMMARY
Added a main nav to separate nav links from breadcrumb links

This should make navigating matplotlib.org easier
Questions
Next step will be to replace the "fork me on GitHub" ribbon. I figure this is better handled in a separate PR.
@story645 @efiring @timhoffm @tacaswell