-
Notifications
You must be signed in to change notification settings - Fork 23
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
Implement dark mode #233
Implement dark mode #233
Conversation
✅ Deploy Preview for scientific-python-hugo-theme ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
26cfe71
to
85b9c88
Compare
Here are screenshots of the current state of this branch: I went with an almost-black background for the dark-mode theme, rather than simply "inverting" the light theme directly. If preferred, though, the dark blue color used in the top and bottom bars could be used for the main content, and those bars could be the almost-black color instead. This is currently implemented using the CSS Please let me know what you think about the visual design, color choices, etc. Thanks. |
85b9c88
to
b5cf42a
Compare
Thanks @alphapapa! As long as the color mapping is easy to change (which it is), we can always tweak that later. I'd probably do away with the glow, but everything else looks good. A very simple switcher is implemented in https://github.com/scientific-python/scientific-python-hugo-theme/pull/157/files, in case that's useful to look at. |
Many sites (GitHub, e.g.) choose a very dark shade of gray instead of pitch black as the background. Worth playing with? |
@henryiii Jarrod mentioned that this is a needed feature for porting the dev guide to Hugo. Did you want to take a look to see whether this implementation would be sufficient? There's no widget for switching, but it does switch based on the theme preference. See: |
Yes, this is the main drawback that I'm aware of for moving over.
That's fine by me. FWIW, the shadows on the boxes look bad in the preview, both in dark and especially in light mode. |
b5cf42a
to
9d573fc
Compare
I updated the theme for all the websites. We are merging this and will fix it up in follow-up PRs. We won't update the websites until we are ready. |
@jarrodmillman I think the preview is looking pretty good in dark mode now: https://deploy-preview-233--scientific-python-hugo-theme.netlify.app/ If you agree, feel free to merge. And please let me know if you see any other changes that should be made. Thanks. |
Also the glowy boxes on the frontpage, and the mermaid diagrams (in dark mode). |
5e5a0f2
to
923cad2
Compare
8413318
to
6321b6b
Compare
Rebased on |
Thanks, this looks good. The only thing I spotted is that I think it's just more visible in dark mode, but we can adjust in both light/dark mode (no need to tweak it in only dark mode). Then, re: the top banner: in light mode, the top menu and the background (behind Scientific Python) are the same color. By changing it, it creates a visual barrier. I prefer the two to be the same, as in this edited example: |
The failure looks like a network issue on netlify. I restarted it and will see if it works. |
I spotted one more issue: there's a transition at the bottom of the page which shouldn't be there. The footer color should go to the bottom of the page: (Compare with existing https://scientific-python.org/ footer for an example.) |
And then just the |
This doubled-up with padding applied to PRE elements.
Hm, this appears to be a matter of how much the page's footer element contains. For example, the https://theme.scientific-python.org/ page, at full width, looks like this right now: While the https://scientific-python.org/ page looks like this right now: Fixing that in the theme itself, so that it applies regardless of how large the footer is on the site the theme is applied to, may require some more substantial changes to the CSS or the HTML elements. |
Good work, thanks! |
This fixes the appearance of the .spec-meta class's background color in dark mode. This should be merged when the theme submodule is updated to include <scientific-python/scientific-python-hugo-theme#233>.
This fixes the appearance of the .spec-meta class's background color in dark mode. This should be merged when the theme submodule is updated to include <scientific-python/scientific-python-hugo-theme#233>.
This fixes the appearance of the .spec-meta class's background color in dark mode. This should be merged when the theme submodule is updated to include <scientific-python/scientific-python-hugo-theme#233>.
This fixes the appearance of the .spec-meta class's background color in dark mode. This should be merged when the theme submodule is updated to include <scientific-python/scientific-python-hugo-theme#233>.
See #229.
For better or worse, this branch is based on #230.
This is at an early stage of development.