jupyter-book / mystmd.org

The website theme and landing content for mystmd.org
https://mystmd.org
Apache License 2.0
2 stars 5 forks source link

MyST website toolbar should switch colors with the dark / light theme #13

Open choldgraf opened 1 year ago

choldgraf commented 1 year ago

I noticed some visual elements don't change their colors with dark / light mode. Just noting here for future reference:

Attribution icons

image

Social media and theme button itself

image

rowanc1 commented 1 year ago

Ah, perfect, thanks for catching these!!

I switched over to/created scienceicon system a few weeks ago: https://www.npmjs.com/package/scienceicons

Must have missed a few dark mode flags!

rowanc1 commented 1 year ago

Fixed the license icons, the other ones need the nav to change in our custom theme (and have a dark-mode logo for myst!).

eurunuela commented 1 year ago

On a related note, is it possible to have two logos in the myst.yaml file? One for light mode, the other one for dark mode.

rowanc1 commented 1 year ago

Nice, I like it, it would be pretty easy to add I think!

There is an existing react code example of doing this here. Happy to help with the various PRs if you are up for it!

choldgraf commented 1 year ago

For what it's worth, here's the configuration structure and behavior around logos and site titles in the pydata theme

https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/branding.html#different-logos-for-light-and-dark-mode

eurunuela commented 1 year ago

I just opened myst-theme PR executablebooks/mystmd#130.

I still haven't had the chance to test it but I believe it should work (or be very close to working).

rowanc1 commented 1 year ago

So cool! Thank you for the PR @eurunuela, it looks great and I will test it out soon -- and thanks @choldgraf for the links over to the pydata theme!

rowanc1 commented 1 year ago

Merged in your logo_dark work, it should be deployed in the next few days! Thanks again @eurunuela for your help with this. 🚀

I am excited that actually it was (I think) pretty easy to customize the themes. I think there needs to be easier ways to share various parts of the configuration between themes (right now I just copied the bit of YAML you wrote to the article theme). @fwkoch was giving some thoughts to this as well in sharing frontmatter (e.g. math macros) for projects, so hopefully we can align there as well. Before we get too much further we should probably circle back to more mature theme customizations like what @choldgraf shared to make sure we are moving towards supporting those types of options.

choldgraf commented 7 months ago

I'm gonna move this one over to mystmd.org since the remaining actions are needed in that theme-specific repo (and we can now transfer since the repo is in executablebooks!)