-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
MRG, MAINT: new website theme [skip github][skip azp][circle front] #8757
Conversation
here's the artifact link showing the new theme: https://24568-1301584-gh.circle-artifacts.com/0/dev/index.html |
This comment has been minimized.
This comment has been minimized.
👍 for removing the gap! |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Not in this PR. The switch to a well supported theme seems high priority in light of how our search functionality just broke unexpectedly, but dark mode is further down the list for me. |
I haven't looked at the CSS, but sometimes a quick-and-dirty method is adding |
I find the fonts a bit too small.
also when you look on a phone the first thing you see is the funding
support. It should be at the bottom.
… |
Things that others have not mentioned:
|
Good thing you mention this. I always thought it’s just me. I’ve always found it confusing, too. If we’re already struggling with this, how must (new) users feel? |
Yep, I was surprised that it didn't work.
Great idea
There is a small "try it ->" link on each one. I'll see about making the whole image clickable
Agree, there are a few page titles that look weird as next/prev links
Not yet addressed because CSS cascading not working (see above). I think this might be a theme issue... Maybe style sheets added in conf.py are getting added before the theme default rules instead of after? Will look into it.
That is an issue I've been trying to chip away at for a while now, but progress is slow. My general intent is to make the tutorials long-form explanatory narratives that cover the most common use cases and are targeted at learners, and to make the examples into short-form how-to recipes that each demo only one thing (IMO these should be much fewer in number, and should focus on fairly specific advanced use cases like using blender to fix meshes, inverse imaging EEG with no MRI, etc). |
26ef265
to
7b0e57b
Compare
latest rendering of the new website theme: https://24648-1301584-gh.circle-artifacts.com/0/dev/index.html |
https://pandas.pydata.org/docs/ is using larger fonts and full page width.
Is it an option?
… |
I was also thinking that we should set the base size to 16px (currently 15px), and the ordinary text should be scaled to 1.25rem: Also the text should be justified and hyphenation enabled. You'll want to use sth like: word-break: break-word; /* Chrome */
-webkit-hyphens: auto;
-moz-hyphens: auto;
-ms-hyphens: auto;
-o-hyphens: auto;
hyphens: auto; to make it work in ~all browsers. |
Actually, the text on the front page could also be simply centered. |
I would like to stay as close as possible to the default theme, so things like justification + hyphenation would fit better in the upstream repo. Also in this sense I agree that our devations from |
Sorry to enter your discussion like, but I was checking this out to investigate the navbar bug report that @drammock opened (pydata/pydata-sphinx-theme#302, it's a bug in the theme, but there is an easy workaround, see the issue report). So thought I could directly give some comments/replies here as well :) (and it's cool to see that you are trying this out)
There is WIP PR to add dark mode to the theme: pydata/pydata-sphinx-theme#273 (but it's certainly not yet ready, contributions are welcome!)
Looking in the browser dev tools, the custom css gets loaded after the theme css, so that shouldn't be the problem normally (also in geopandas we have some custom css which is working there)
In the master version of the theme, we removed some padding around the logo, so it should appear larger now. If you still want to have it larger, there is now a
I think this is something we inherit from sphinx itself, and I agree it can look a bit off (also for other sites where we are using this theme, so it might be a welcome change upstream in the pydata-sphinx-theme as well)
In the development version of the theme, we are adding CSS variables so that it should be easy to make the font size larger
Note that with the CSS variables (I see that for the font @drammock already used it here), it's very easy to customize this a bit, and those variables are added exactly so downstream users can do this (without needing the know the exact CSS classes etc that need to be overridden). Now, of course, you are for sure free to also follow the base theme ;), I only want to mention that those variables are meant to be overridden in a robust way. Related to this, we are also planning to drop the custom fonts we now include in the base theme (eg OpenSans and Lato), and use the system font stack instead as default (pydata/pydata-sphinx-theme#285). But with the CSS variable it should be easy to still use another font if desired. On another note, if you would like to keep the navbar with a dark color, like the current mne website, that should also be possible. Eg MetPy recently did this, see eg https://unidata.github.io/MetPy/latest/userguide/startingguide.html Also, if for some pages you don't want to have a left sidebar (right now if there are no toctree entries, it only gives a strange white empty space), this is also possible to do on a page-by-page level, see https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_sidebars (you can specify an empty list for certain pages such as the home page) |
Thanks for the feedback @jorisvandenbossche ! To me the goal is to deviate as little as possible from the base theme. Do you know offhand how much custom CSS pandas for example uses? Based on looking at doc/source/_static/css it looks like the answer is "for most pages, little to none" |
Yes, in pandas we don't override much, but that's probably also because we initially started the theme for pandas. Eg for geopandas we override some color elements: https://github.com/geopandas/geopandas/pull/1666/files (and the PR shows how using CSS variables makes this much cleaner) |
7b75c04
to
67225f0
Compare
Looks like great progress, and +1k/-3.9k is awesome! Minor list of things that I think would get it MRG+1 from me:
Restructuring so that we can get the left-content-right pattern more consistent would be good, like: https://pandas.pydata.org/docs/getting_started/index.html vs places we only have a left bar (no https://24674-1301584-gh.circle-artifacts.com/0/dev/install/index.html and places we have no left bar (not part of a toctree or whatever presumably): https://24674-1301584-gh.circle-artifacts.com/0/dev/auto_tutorials/index.html or neither even though we could probably have both https://24674-1301584-gh.circle-artifacts.com/0/dev/overview/index.html I think this would potentially be a big usability / nav benefit! I think this could be done in subsequent PRs if you want, though. |
+1.2k -4.1k 😍 I'll merge with |
76fced5
to
e957233
Compare
Latest rendering here. This is ready for a thorough look from the devs, and suggestions on how to deal with the remaining issues:
Already fixed locally, not yet pushed:
|
Indeed I see this as a blocker. But this also gave me an idea -- put funding sources in the left column (or right maybe?), and give it this property that it disappears below some size (maybe sm-something). I don't think we need to show those on mobile. Basically if you solve the disappearing-right-column problem you might have the solution to the funding-sources-too-prominent problem.
I would put "How to cite" in bottom of the left bar of Documentation, and then add this as "Papers citing MNE" beneath that. Then both are in some toctree, and how-to-cite is both on the landing page and documentation page.
This is a regression so should be fixable with appropriate CSS/JS somehow. Let me know if you want me to look, I think I had a hand in implementing the collapasing ones on
Did you try some variant of https://stackoverflow.com/questions/10336194/top-nav-bar-blocking-top-content-of-the-page#answer-10336221? I think I tried this with our current theme at some point but maybe using Bootstrap 4 will make it more fixable.
Can you For everything else I see them as minor issues we can fix in subsequent PRs. |
25eb8e8
to
601a1a5
Compare
|
Looking very good @drammock! I like it! Only some minor points should be addressed, but this could also happen in another PR:
|
One more thing that keeps annoying me: Often, searching for a particular answer on Google takes me to the dev version of our website. If I switch to the stable version, it always takes me to the homepage instead of the corresponding page in stable. Is this something that could be solved? |
Thanks @drammock !!! |
🎈 |
I've been poking away at the sphinx_pydata_theme off and on for the last few days. Here's a WIP pull request that makes the switch. All of you should feel free to jump in and push a commit or two if you see something I haven't fixed yet and know what the fix should be (if you don't know what the fix is, at least add it to the list below it so it doesn't get missed).
Once the circle build finishes you'll see there are some obvious remaining issues, but so far nothing that seems insurmountable. Here's a partial list:
some CSS properties I've tried to override but aren't working (e.g., our "sidebar" callout boxes need a bgcolor or border to distinguish them from the main text)this turned out to be an issue with dev vs stable version of the theme: the CSS color variable names had changedonly available in dev version of themenavbar_align
property in conf.py isn't working.. contents::
directive should have it removed, since the theme includes page contents in the right sidebarhaven't yet tried to incorporate sphinx_multiversion, so currently our version dropdown is missing.sphinx-multiversion is for building multiple versions all at once (which I don't think we want?) and in my local tests it failed to build anything older than 0.17.closes #8184
closes #8785